The legacy LoopUnswitch pass is only used in the legacy pass manager
pipeline, which is deprecated.
The NewPM replacement is SimpleLoopUnswitch and I think it is time to
remove the legacy LoopUnswitch code.
Fixes #31000.
Paths
| Differential D124376
[Passes] Remove legacy LoopUnswitch pass. ClosedPublic Authored by fhahn on Apr 25 2022, 3:49 AM.
Details Summary The legacy LoopUnswitch pass is only used in the legacy pass manager The NewPM replacement is SimpleLoopUnswitch and I think it is time to Fixes #31000.
Diff Detail
Event TimelineComment Actions
From the FileCheck output, it looks like the change is just that the name of the basic block is different? polly debug output depends on LLVM IR names. Just updating the test should be fine. This revision is now accepted and ready to land.Apr 25 2022, 9:05 AM Comment Actions Fix for Polly: diff --git a/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp b/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp index 7aca971b868f..0030356f7990 100644 --- a/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp +++ b/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp @@ -397,7 +397,7 @@ void PassManagerBuilder::addFunctionSimplificationPasses( // TODO: Investigate promotion cap for O1. MPM.add(createLICMPass(LicmMssaOptCap, LicmMssaNoAccForPromotionCap, /*AllowSpeculation=*/true)); - MPM.add(createSimpleLoopUnswitchLegacyPass()); + MPM.add(createSimpleLoopUnswitchLegacyPass(OptLevel == 3)); // FIXME: We break the loop pass pipeline here in order to do full // simplifycfg. Eventually loop-simplifycfg should be enhanced to replace the // need for this. This is what the NPM pipeline builder does (minus -enable-npm-O3-nontrivial-unswitch) This revision now requires changes to proceed.Apr 25 2022, 9:58 AM Comment Actions I've removed the failing opt-pipeline.ll test in 6f73bd781305266a747055875ce8352e5a36c809 since that's a legacy PM test Comment Actions Thank you for the cleanup! Comment Actions i>>! In D124376#3472273, @Meinersbur wrote:
Thanks, applied!
I'll updated the description, thanks! Comment Actions @Meinersbur It would be great if you could take another quick look and remove the change request :) This revision is now accepted and ready to land.Apr 28 2022, 8:00 AM This revision was landed with ongoing or failed builds.Apr 29 2022, 2:31 AM Closed by commit rGfb4113ef0c8b: [Passes] Remove legacy LoopUnswitch pass. (authored by fhahn). · Explain Why This revision was automatically updated to reflect the committed changes. Comment Actions Note Julia was still using the old PM with LoopUnswitch and when we switched to SimpleLoopUnswitch we found a case that significantly regressed https://discourse.llvm.org/t/newpm-loop-unswitch-regression-from-legacy-pm-to-new-pm/69823?u=vchuravy Herald added subscribers: kmitropoulou, kosarev, StephenFan. · View Herald TranscriptApr 15 2023, 1:24 PM
Revision Contents
Diff 426000 llvm/include/llvm-c/Transforms/Scalar.h
llvm/include/llvm/LinkAllPasses.h
llvm/include/llvm/Transforms/Scalar.h
llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
llvm/lib/Transforms/Scalar/CMakeLists.txt
llvm/lib/Transforms/Scalar/LoopUnswitch.cpp
llvm/lib/Transforms/Scalar/Scalar.cpp
llvm/test/Analysis/MemorySSA/pr40038.ll
llvm/test/Feature/optnone-opt.ll
llvm/test/Transforms/LoopUnswitch/2006-06-13-SingleEntryPHI.ll
llvm/test/Transforms/LoopUnswitch/2006-06-27-DeadSwitchCase.ll
llvm/test/Transforms/LoopUnswitch/2007-05-09-Unreachable.ll
llvm/test/Transforms/LoopUnswitch/2007-05-09-tl.ll
llvm/test/Transforms/LoopUnswitch/2007-07-12-ExitDomInfo.ll
llvm/test/Transforms/LoopUnswitch/2007-07-13-DomInfo.ll
llvm/test/Transforms/LoopUnswitch/2007-07-18-DomInfo.ll
llvm/test/Transforms/LoopUnswitch/2007-08-01-Dom.ll
llvm/test/Transforms/LoopUnswitch/2007-08-01-LCSSA.ll
llvm/test/Transforms/LoopUnswitch/2007-10-04-DomFrontier.ll
llvm/test/Transforms/LoopUnswitch/2008-06-02-DomInfo.ll
llvm/test/Transforms/LoopUnswitch/2008-06-17-DomFrontier.ll
llvm/test/Transforms/LoopUnswitch/2008-11-03-Invariant.ll
llvm/test/Transforms/LoopUnswitch/2010-11-18-LCSSA.ll
llvm/test/Transforms/LoopUnswitch/2011-06-02-CritSwitch.ll
llvm/test/Transforms/LoopUnswitch/2011-09-26-EHCrash.ll
llvm/test/Transforms/LoopUnswitch/2011-11-18-SimpleSwitch.ll
llvm/test/Transforms/LoopUnswitch/2011-11-18-TwoSwitches-Threshold.ll
llvm/test/Transforms/LoopUnswitch/2011-11-18-TwoSwitches.ll
llvm/test/Transforms/LoopUnswitch/2012-04-02-IndirectBr.ll
llvm/test/Transforms/LoopUnswitch/2012-04-30-LoopUnswitch-LPad-Crash.ll
llvm/test/Transforms/LoopUnswitch/2012-05-20-Phi.ll
llvm/test/Transforms/LoopUnswitch/2015-06-17-Metadata.ll
llvm/test/Transforms/LoopUnswitch/2015-09-18-Addrspace.ll
llvm/test/Transforms/LoopUnswitch/AMDGPU/divergent-unswitch.ll
llvm/test/Transforms/LoopUnswitch/AMDGPU/lit.local.cfg
llvm/test/Transforms/LoopUnswitch/AMDGPU/uniform-unswitch.ll
llvm/test/Transforms/LoopUnswitch/LIV-loop-condtion.ll
llvm/test/Transforms/LoopUnswitch/basictest.ll
llvm/test/Transforms/LoopUnswitch/callbr.ll
llvm/test/Transforms/LoopUnswitch/cleanuppad.ll
llvm/test/Transforms/LoopUnswitch/convergent-hoist-modified.ll
llvm/test/Transforms/LoopUnswitch/copy-metadata.ll
llvm/test/Transforms/LoopUnswitch/crash.ll
llvm/test/Transforms/LoopUnswitch/elseif-non-exponential-behavior.ll
llvm/test/Transforms/LoopUnswitch/exponential-behavior.ll
llvm/test/Transforms/LoopUnswitch/guards.ll
llvm/test/Transforms/LoopUnswitch/infinite-loop.ll
llvm/test/Transforms/LoopUnswitch/invalidate-scev.ll
llvm/test/Transforms/LoopUnswitch/invoke-hoist-modified.ll
llvm/test/Transforms/LoopUnswitch/msan.ll
llvm/test/Transforms/LoopUnswitch/optsize-hoist-modified.ll
llvm/test/Transforms/LoopUnswitch/partial-unswitch-cost.ll
llvm/test/Transforms/LoopUnswitch/partial-unswitch-mssa-threshold.ll
llvm/test/Transforms/LoopUnswitch/partial-unswitch-update-memoryssa.ll
llvm/test/Transforms/LoopUnswitch/partial-unswitch.ll
llvm/test/Transforms/LoopUnswitch/pr32818.ll
llvm/test/Transforms/LoopUnswitch/preserve-analyses.ll
llvm/test/Transforms/LoopUnswitch/simplify-with-nonvalness.ll
llvm/test/Transforms/LoopUnswitch/trivial-unswitch.ll
llvm/test/Transforms/LoopUnswitch/unswitch-equality-undef.ll
llvm/test/Transforms/LoopUnswitch/unswitch-select.ll
polly/lib/CodeGen/CodegenCleanup.cpp
|