We're now defaulting to preserving LCSSA, with the NPM, so a couple of tests have changed slightly.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/CodeGen/HardwareLoops.cpp | ||
---|---|---|
287 | Seems this is an issue from LPM, but hardware loop insertion pass should preserve some other analysis as well, like ScalarEvolutionAnalysis, BranchProbabilityAnalysis, DependenceAnalysis and MemorySSAAnalysis (although there is no handling for it now, we may need pass it to InsertPreheaderForLoop if want to preserve this analysis)? I saw some other pass that calls InsertPreheaderForLoop but declare to preserve these analysis. |
llvm/lib/CodeGen/HardwareLoops.cpp | ||
---|---|---|
287 | I can't say I understand the LPM, but we're not using it here, nor are we using MemorySSA or BranchProbability. So could you please explain why/what you'd like to see change here? |
llvm/lib/CodeGen/HardwareLoops.cpp | ||
---|---|---|
287 | I think the pass should try its best to declare the preservation of analysis passes to avoid the analysis passes are run again unnecessarily. If we don't change BranchProbability or some other analysis pass results, we should better to declare it as preserved, otherwise later pass that depends on this analysis will have to rerun the analysis pass again? I think this is the reason why we return PreservedAnalyses::all() if the pass does not do any transformation. I said the LPM because in the legacy pass implementation of hardware loop pass, it also preserves these two analysis DominatorTreeAnalysis and LoopAnalysis, so I thought you were implementing the same thing in NPM with the LPM? |
llvm/lib/CodeGen/HardwareLoops.cpp | ||
---|---|---|
287 | Ah, sorry, for some reason I've always thought we can only 'preserve' anything that we directly use! As for the LPM, I guess my ignorance continues... I don't think I'm using it? I thought this is just a port of a function pass into another function pass. |
@samparker Good morning/afternoon from the UK :)
I believe this patch may have caused this following build bot to start failing:
https://lab.llvm.org/buildbot/#/builders/168/builds/11878
The test is CodeGen/ARM/O3-pileline.ll
Are you able to take a look at it?
much appreciated.
Thank you so much, this has been fixed mid-investigation, apologies for the unnecessary ping.
Seems this is an issue from LPM, but hardware loop insertion pass should preserve some other analysis as well, like ScalarEvolutionAnalysis, BranchProbabilityAnalysis, DependenceAnalysis and MemorySSAAnalysis (although there is no handling for it now, we may need pass it to InsertPreheaderForLoop if want to preserve this analysis)? I saw some other pass that calls InsertPreheaderForLoop but declare to preserve these analysis.