summaryrefslogtreecommitdiffstats
path: root/polly/lib/CodeGen/LoopGenerators.cpp
diff options
context:
space:
mode:
authorJohannes Doerfert <jdoerfert@codeaurora.org>2014-08-07 17:14:54 +0000
committerJohannes Doerfert <jdoerfert@codeaurora.org>2014-08-07 17:14:54 +0000
commit2ef3f4fd2378c6b1f6acbb18a9332d58f3d8b2cc (patch)
treedf92903527f0cd5247b25fbc2b9f6e3adfff843c /polly/lib/CodeGen/LoopGenerators.cpp
parentcadc603e9154e607fa090b2f07ecc16465d36ebb (diff)
downloadbcm5719-llvm-2ef3f4fd2378c6b1f6acbb18a9332d58f3d8b2cc.tar.gz
bcm5719-llvm-2ef3f4fd2378c6b1f6acbb18a9332d58f3d8b2cc.zip
Make used analysis passes explicit
Use the explicit analysis if possible, only for splitBlock we will continue to use the Pass * argument. This change allows us to remove the getAnalysis calls from the code generation. llvm-svn: 215121
Diffstat (limited to 'polly/lib/CodeGen/LoopGenerators.cpp')
-rw-r--r--polly/lib/CodeGen/LoopGenerators.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/polly/lib/CodeGen/LoopGenerators.cpp b/polly/lib/CodeGen/LoopGenerators.cpp
index 432960d2b85..4eaaac0bc6d 100644
--- a/polly/lib/CodeGen/LoopGenerators.cpp
+++ b/polly/lib/CodeGen/LoopGenerators.cpp
@@ -47,11 +47,10 @@ using namespace polly;
// TODO: We currently always create the GuardBB. If we can prove the loop is
// always executed at least once, we can get rid of this branch.
Value *polly::createLoop(Value *LB, Value *UB, Value *Stride,
- PollyIRBuilder &Builder, Pass *P, BasicBlock *&ExitBB,
+ PollyIRBuilder &Builder, Pass *P, LoopInfo &LI,
+ DominatorTree &DT, BasicBlock *&ExitBB,
ICmpInst::Predicate Predicate,
LoopAnnotator *Annotator, bool Parallel) {
- DominatorTree &DT = P->getAnalysis<DominatorTreeWrapperPass>().getDomTree();
- LoopInfo &LI = P->getAnalysis<LoopInfo>();
Function *F = Builder.GetInsertBlock()->getParent();
LLVMContext &Context = F->getContext();
@@ -321,7 +320,8 @@ Value *OMPGenerator::createSubfunction(Value *Stride, Value *StructData,
Builder.CreateBr(CheckNextBB);
Builder.SetInsertPoint(--Builder.GetInsertPoint());
- IV = createLoop(LowerBound, UpperBound, Stride, Builder, P, AfterBB,
+ LoopInfo &LI = P->getAnalysis<LoopInfo>();
+ IV = createLoop(LowerBound, UpperBound, Stride, Builder, P, LI, DT, AfterBB,
ICmpInst::ICMP_SLE);
BasicBlock::iterator LoopBody = Builder.GetInsertPoint();
OpenPOWER on IntegriCloud