[llvm-branch-commits] [llvm] [AMDGPU][NewPM] Port SILowerControlFlow pass into NPM. (PR #123045)
Jay Foad via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Jan 15 04:44:41 PST 2025
jayfoad wrote:
> I observed something while porting this pass. The analysis LiveIntervals (LIS) uses the SlotIndexes (SI). There is no explicit use of SI in this pass. If we have to preserve LIS, it required us to preserve SI as well. When I initially failed to preserve SI, the following lit test went into an infinite loop (the cleanup phase hung). llvm/test/CodeGen/AMDGPU/lower-control-flow-live-intervals.mir. Then I realized that the Legacy pass flow preserved SI in getAnalysisUsage(). Is it expected to preserve all the dependent analyses alongside a parent analysis?
In the old pass manager this is kind of an unwritten rule, and if you break the rule you tend to get assertion failures in the pass manager itself. See: See https://discourse.llvm.org/t/legacypm-preserving-passes-and-addrequiredtransitive/57043
I don't know what the rules are for the new pass manager.
https://github.com/llvm/llvm-project/pull/123045
More information about the llvm-branch-commits
mailing list