[llvm] r226457 - [PM] Cleanup a dead option to critical edge splitting that I noticed
Chandler Carruth
chandlerc at gmail.com
Mon Jan 19 04:12:00 PST 2015
Author: chandlerc
Date: Mon Jan 19 06:12:00 2015
New Revision: 226457
URL: http://llvm.org/viewvc/llvm-project?rev=226457&view=rev
Log:
[PM] Cleanup a dead option to critical edge splitting that I noticed
while refactoring this API for the new pass manager.
No functionality changed here, the code didn't actually support this
option.
Modified:
llvm/trunk/include/llvm/Transforms/Utils/BasicBlockUtils.h
llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp
Modified: llvm/trunk/include/llvm/Transforms/Utils/BasicBlockUtils.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/Utils/BasicBlockUtils.h?rev=226457&r1=226456&r2=226457&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Transforms/Utils/BasicBlockUtils.h (original)
+++ llvm/trunk/include/llvm/Transforms/Utils/BasicBlockUtils.h Mon Jan 19 06:12:00 2015
@@ -86,27 +86,23 @@ struct CriticalEdgeSplittingOptions {
LoopInfo *LI;
bool MergeIdenticalEdges;
bool DontDeleteUselessPHIs;
- bool SplitLandingPads;
bool PreserveLCSSA;
CriticalEdgeSplittingOptions()
: AA(nullptr), DT(nullptr), LI(nullptr), MergeIdenticalEdges(false),
- DontDeleteUselessPHIs(false), SplitLandingPads(false),
- PreserveLCSSA(false) {}
+ DontDeleteUselessPHIs(false), PreserveLCSSA(false) {}
/// \brief Basic case of setting up all the analysis.
CriticalEdgeSplittingOptions(AliasAnalysis *AA, DominatorTree *DT = nullptr,
LoopInfo *LI = nullptr)
: AA(AA), DT(DT), LI(LI), MergeIdenticalEdges(false),
- DontDeleteUselessPHIs(false), SplitLandingPads(false),
- PreserveLCSSA(false) {}
+ DontDeleteUselessPHIs(false), PreserveLCSSA(false) {}
/// \brief A common pattern is to preserve the dominator tree and loop
/// info but not care about AA.
CriticalEdgeSplittingOptions(DominatorTree *DT, LoopInfo *LI)
: AA(nullptr), DT(DT), LI(LI), MergeIdenticalEdges(false),
- DontDeleteUselessPHIs(false), SplitLandingPads(false),
- PreserveLCSSA(false) {}
+ DontDeleteUselessPHIs(false), PreserveLCSSA(false) {}
CriticalEdgeSplittingOptions &setMergeIdenticalEdges() {
MergeIdenticalEdges = true;
@@ -118,11 +114,6 @@ struct CriticalEdgeSplittingOptions {
return *this;
}
- CriticalEdgeSplittingOptions &setSplitLandingPads() {
- SplitLandingPads = true;
- return *this;
- }
-
CriticalEdgeSplittingOptions &setPreserveLCSSA() {
PreserveLCSSA = true;
return *this;
Modified: llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp?rev=226457&r1=226456&r2=226457&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp Mon Jan 19 06:12:00 2015
@@ -706,9 +706,7 @@ void LoopUnswitch::EmitPreheaderBranchOn
// If either edge is critical, split it. This helps preserve LoopSimplify
// form for enclosing loops.
- auto Options = CriticalEdgeSplittingOptions(DT, LI)
- .setPreserveLCSSA()
- .setSplitLandingPads();
+ auto Options = CriticalEdgeSplittingOptions(DT, LI).setPreserveLCSSA();
SplitCriticalEdge(BI, 0, Options);
SplitCriticalEdge(BI, 1, Options);
}
More information about the llvm-commits
mailing list