diff options
Diffstat (limited to 'polly/lib/CodeGen/CodeGeneration.cpp')
-rw-r--r-- | polly/lib/CodeGen/CodeGeneration.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/polly/lib/CodeGen/CodeGeneration.cpp b/polly/lib/CodeGen/CodeGeneration.cpp index aef65613f16..5f50ab40e9e 100644 --- a/polly/lib/CodeGen/CodeGeneration.cpp +++ b/polly/lib/CodeGen/CodeGeneration.cpp @@ -53,6 +53,7 @@ public: IslAstInfo *AI; DominatorTree *DT; ScalarEvolution *SE; + RegionInfo *RI; ///} /// @brief The loop annotator to generate llvm.loop metadata. @@ -103,13 +104,16 @@ public: DT = &getAnalysis<DominatorTreeWrapperPass>().getDomTree(); SE = &getAnalysis<ScalarEvolution>(); DL = &S.getRegion().getEntry()->getParent()->getParent()->getDataLayout(); - - assert(!S.getRegion().isTopLevelRegion() && - "Top level regions are not supported"); + RI = &getAnalysis<RegionInfoPass>().getRegionInfo(); + Region *R = &S.getRegion(); + assert(!R->isTopLevelRegion() && "Top level regions are not supported"); Annotator.buildAliasScopes(S); - BasicBlock *EnteringBB = simplifyRegion(&S, this); + simplifyRegion(R, DT, LI, RI); + assert(R->isSimple()); + BasicBlock *EnteringBB = S.getRegion().getEnteringBlock(); + assert(EnteringBB); PollyIRBuilder Builder = createPollyIRBuilder(EnteringBB, Annotator); IslNodeBuilder NodeBuilder(Builder, Annotator, this, *DL, *LI, *SE, *DT, S); |