From cfca06d7963fa0909f90483b42a6d7d194d01e08 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sun, 26 Jul 2020 19:36:28 +0000 Subject: Vendor import of llvm-project master 2e10b7a39b9, the last commit before the llvmorg-12-init tag, from which release/11.x was branched. --- llvm/lib/Transforms/Utils/LCSSA.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'llvm/lib/Transforms/Utils/LCSSA.cpp') diff --git a/llvm/lib/Transforms/Utils/LCSSA.cpp b/llvm/lib/Transforms/Utils/LCSSA.cpp index 5746d69260d5..b1a1c564d217 100644 --- a/llvm/lib/Transforms/Utils/LCSSA.cpp +++ b/llvm/lib/Transforms/Utils/LCSSA.cpp @@ -76,7 +76,7 @@ static bool isExitBlock(BasicBlock *BB, /// that are outside the current loop. If so, insert LCSSA PHI nodes and /// rewrite the uses. bool llvm::formLCSSAForInstructions(SmallVectorImpl &Worklist, - DominatorTree &DT, LoopInfo &LI, + const DominatorTree &DT, const LoopInfo &LI, ScalarEvolution *SE) { SmallVector UsesToRewrite; SmallSetVector PHIsToRemove; @@ -128,7 +128,7 @@ bool llvm::formLCSSAForInstructions(SmallVectorImpl &Worklist, if (auto *Inv = dyn_cast(I)) DomBB = Inv->getNormalDest(); - DomTreeNode *DomNode = DT.getNode(DomBB); + const DomTreeNode *DomNode = DT.getNode(DomBB); SmallVector AddedPHIs; SmallVector PostProcessPHIs; @@ -274,7 +274,7 @@ bool llvm::formLCSSAForInstructions(SmallVectorImpl &Worklist, // Compute the set of BasicBlocks in the loop `L` dominating at least one exit. static void computeBlocksDominatingExits( - Loop &L, DominatorTree &DT, SmallVector &ExitBlocks, + Loop &L, const DominatorTree &DT, SmallVector &ExitBlocks, SmallSetVector &BlocksDominatingExits) { SmallVector BBWorklist; @@ -318,7 +318,7 @@ static void computeBlocksDominatingExits( } } -bool llvm::formLCSSA(Loop &L, DominatorTree &DT, LoopInfo *LI, +bool llvm::formLCSSA(Loop &L, const DominatorTree &DT, const LoopInfo *LI, ScalarEvolution *SE) { bool Changed = false; @@ -383,8 +383,8 @@ bool llvm::formLCSSA(Loop &L, DominatorTree &DT, LoopInfo *LI, } /// Process a loop nest depth first. -bool llvm::formLCSSARecursively(Loop &L, DominatorTree &DT, LoopInfo *LI, - ScalarEvolution *SE) { +bool llvm::formLCSSARecursively(Loop &L, const DominatorTree &DT, + const LoopInfo *LI, ScalarEvolution *SE) { bool Changed = false; // Recurse depth-first through inner loops. @@ -396,7 +396,7 @@ bool llvm::formLCSSARecursively(Loop &L, DominatorTree &DT, LoopInfo *LI, } /// Process all loops in the function, inner-most out. -static bool formLCSSAOnAllLoops(LoopInfo *LI, DominatorTree &DT, +static bool formLCSSAOnAllLoops(const LoopInfo *LI, const DominatorTree &DT, ScalarEvolution *SE) { bool Changed = false; for (auto &L : *LI) -- cgit v1.2.3