diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2015-01-19 12:36:53 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2015-01-19 12:36:53 +0000 |
commit | d450056c781d37a48ebc788af09d2465bafb9f88 (patch) | |
tree | 84a31d8424c228d2dc917975728e43df8a5ac958 /llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp | |
parent | a2edd9159a991b07d180969dbb08812c679ad5b0 (diff) | |
download | bcm5719-llvm-d450056c781d37a48ebc788af09d2465bafb9f88.tar.gz bcm5719-llvm-d450056c781d37a48ebc788af09d2465bafb9f88.zip |
[PM] Replace the Pass argument to SplitEdge with specific analyses used
and updated.
This may appear to remove handling for things like alias analysis when
splitting critical edges here, but in fact no callers of SplitEdge
relied on this. Similarly, all of them wanted to preserve LCSSA if there
was any update of the loop info. That makes the interface much simpler.
With this, all of BasicBlockUtils.h is free of Pass arguments and
prepared for the new pass manager. This is tho majority of utilities
that relied on pass arguments.
llvm-svn: 226459
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp b/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp index 2a8c20d6b1f..d4d61f2dba7 100644 --- a/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp +++ b/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp @@ -323,7 +323,6 @@ bool llvm::UnrollRuntimeLoopProlog(Loop *L, unsigned Count, LoopInfo *LI, SE->forgetLoop(ParentLoop); // Grab analyses that we preserve. - auto *AA = LPM->getAnalysisIfAvailable<AliasAnalysis>(); auto *DTWP = LPM->getAnalysisIfAvailable<DominatorTreeWrapperPass>(); auto *DT = DTWP ? &DTWP->getDomTree() : nullptr; @@ -332,7 +331,7 @@ bool llvm::UnrollRuntimeLoopProlog(Loop *L, unsigned Count, LoopInfo *LI, BasicBlock *Latch = L->getLoopLatch(); // It helps to splits the original preheader twice, one for the end of the // prolog code and one for a new loop preheader - BasicBlock *PEnd = SplitEdge(PH, Header, LPM->getAsPass()); + BasicBlock *PEnd = SplitEdge(PH, Header, DT, LI); BasicBlock *NewPH = SplitBlock(PEnd, PEnd->getTerminator(), DT, LI); BranchInst *PreHeaderBR = cast<BranchInst>(PH->getTerminator()); @@ -403,7 +402,7 @@ bool llvm::UnrollRuntimeLoopProlog(Loop *L, unsigned Count, LoopInfo *LI, // PHI functions. BasicBlock *LastLoopBB = cast<BasicBlock>(VMap[Latch]); ConnectProlog(L, TripCount, Count, LastLoopBB, PEnd, PH, NewPH, VMap, - AA, DT, LI, LPM->getAsPass()); + /*AliasAnalysis*/ nullptr, DT, LI, LPM->getAsPass()); NumRuntimeUnrolled++; return true; } |