dubiousconst282 / DistIL

Post-build IL optimizer and intermediate representation for .NET programs
MIT License
116 stars 1 forks source link

Excessive critical-edge splitting for phis with multiple constant args #16

Closed dubiousconst282 closed 10 months ago

dubiousconst282 commented 1 year ago

This is more common in phis with constants and arguments, as they have no associated node in the interference graph and thus will always need critical edges to be split.

Repro:

static int SSA_MultiPreds1(int x, int y) {
    int r = 1;
    if (x > 0 && y < 100 && x * 3 < y) {
        r = 2;
    }
    return r;
}

Reg allocated CFG: redundant_critedges