From adf74a6403f357b5cf244ee97d5c999cfa9eb459 Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Mon, 19 Jan 2015 12:12:00 +0000 Subject: [PATCH] [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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226457 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Transforms/Utils/BasicBlockUtils.h | 15 +++------------ lib/Transforms/Scalar/LoopUnswitch.cpp | 4 +--- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/include/llvm/Transforms/Utils/BasicBlockUtils.h b/include/llvm/Transforms/Utils/BasicBlockUtils.h index 6a35aae01e3..f5d0ae8016c 100644 --- a/include/llvm/Transforms/Utils/BasicBlockUtils.h +++ b/include/llvm/Transforms/Utils/BasicBlockUtils.h @@ -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; diff --git a/lib/Transforms/Scalar/LoopUnswitch.cpp b/lib/Transforms/Scalar/LoopUnswitch.cpp index e809a5ccc84..276af27f2fb 100644 --- a/lib/Transforms/Scalar/LoopUnswitch.cpp +++ b/lib/Transforms/Scalar/LoopUnswitch.cpp @@ -706,9 +706,7 @@ void LoopUnswitch::EmitPreheaderBranchOnCondition(Value *LIC, Constant *Val, // 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); } -- 2.34.1