Details
- Reviewers
ychen asbirlea - Commits
- rGd3f6972abb9c: [LoopReroll][NewPM] Port -loop-reroll to NPM
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Transforms/Scalar/LoopRerollPass.cpp | ||
---|---|---|
1726 | Isn't anything preserved? LCSSA and AA perhaps? |
llvm/lib/Transforms/Scalar/LoopRerollPass.cpp | ||
---|---|---|
1726 | Sorry, I didn't notice that the legacy PM's getLoopAnalysisUsage() preserved some analyses. I'm not super familiar with loop passes, but getLoopPassPreservedAnalyses() says /// Returns the minimum set of Analyses that all loop passes must preserve. so why wouldn't that apply here? |
llvm/lib/Transforms/Scalar/LoopRerollPass.cpp | ||
---|---|---|
1726 | Good point, reading the code it looked like certain changes would affect the CFG and there were no DT or LI updates. Looking further, it looks like only instructions are added/updated, and not the BB, so it looks like we should use getLoopPassPreservedAnalyses here. For the LPM, the above mustPreserveAnalysisID doesn't make sense to me if the pass already requires LCSSA in the getLoopAnalysisUsage call. It should always be true. |
Isn't anything preserved? LCSSA and AA perhaps?
AFAICT, getLoopPassPreservedAnalyses() does not apply; DT, LI and ScEv are not preserved.