You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a performance regression from rust-lang/rust#132636. I haven’t created a C or LLVM IR example yet, but I believe this issue is mainly due to LICM hoisting numerous invariants, which causes register spills.
Currently, LICM hoists all invariants, regardless of whether it increases register pressure or if the code always executes. MachineSink (formerly in MachineLICM) then attempts to sink these invariants to mitigate register pressure. After reading the related code, it appears that MachineSink doesn’t handle this well; it doesn’t even enable -sink-insts-to-avoid-spills. Some of the test cases also don’t seem to work as expected, such as machine-licm-sink-instr.ll.
I don’t think the patch requires an RFC, but I would still like to get some feedback. I purpose to move this code back into MachineLICM and modify it to a new process:
LICM still hoists all invariants.
MachineLICM sinks all invariants as a preprocessing step.
MachineLICM considers factors like register pressure and conditional execution re-hoists invariants, aiming to improve runtime performance.
This way, we won’t need to maintain a separate set of code in MachineSink that opposite MachineLICM.
The text was updated successfully, but these errors were encountered:
There is a performance regression from rust-lang/rust#132636. I haven’t created a C or LLVM IR example yet, but I believe this issue is mainly due to LICM hoisting numerous invariants, which causes register spills.
Currently, LICM hoists all invariants, regardless of whether it increases register pressure or if the code always executes. MachineSink (formerly in MachineLICM) then attempts to sink these invariants to mitigate register pressure. After reading the related code, it appears that MachineSink doesn’t handle this well; it doesn’t even enable
-sink-insts-to-avoid-spills
. Some of the test cases also don’t seem to work as expected, such as machine-licm-sink-instr.ll.I don’t think the patch requires an RFC, but I would still like to get some feedback. I purpose to move this code back into MachineLICM and modify it to a new process:
This way, we won’t need to maintain a separate set of code in MachineSink that opposite MachineLICM.
The text was updated successfully, but these errors were encountered: