I’ve noticed PreRA MachineSinking is largely blocked on the arch I’m on due to most instructions writing to an implicit flags register.
MachineSinking is allowed to move instructions where all physregs are dead, but at the point where it’s called in default pass order, liveness hasn’t been computed yet. Assuming I haven’t missed a pass somewhere, this must be a feature of SelectionDAG that is not yet implemented?
I believe they could be precomputed per pattern and set in the selector vm, partly wondering if that is the plan.
For now I’ve changed the two lines required to make recomputeLivenessFlags work when in SSA form (or at least I can’t see why it won’t work, which makes me wonder why the asserts were there in the first place…) and added a custom pass, just wanted to make sure I’m on the right path here and haven’t missed something obvious. Thank you.