[polly] r226460 - [PM] Update Polly for LLVM r226459 which removed another pass argument
Chandler Carruth
chandlerc at gmail.com
Mon Jan 19 04:37:34 PST 2015
Author: chandlerc
Date: Mon Jan 19 06:37:33 2015
New Revision: 226460
URL: http://llvm.org/viewvc/llvm-project?rev=226460&view=rev
Log:
[PM] Update Polly for LLVM r226459 which removed another pass argument
from an API in the process of preparing for the new pass manager.
Modified:
polly/trunk/lib/CodeGen/Utils.cpp
polly/trunk/lib/Support/ScopHelper.cpp
Modified: polly/trunk/lib/CodeGen/Utils.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/Utils.cpp?rev=226460&r1=226459&r2=226460&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/Utils.cpp (original)
+++ polly/trunk/lib/CodeGen/Utils.cpp Mon Jan 19 06:37:33 2015
@@ -30,7 +30,7 @@ BasicBlock *polly::executeScopConditiona
// Split the entry edge of the region and generate a new basic block on this
// edge. This function also updates ScopInfo and RegionInfo.
- NewBlock = SplitEdge(R.getEnteringBlock(), R.getEntry(), P);
+ NewBlock = SplitEdge(R.getEnteringBlock(), R.getEntry(), &DT, &LI);
if (DT.dominates(R.getEntry(), NewBlock)) {
BasicBlock *OldBlock = R.getEntry();
std::string OldName = OldBlock->getName();
@@ -71,7 +71,7 @@ BasicBlock *polly::executeScopConditiona
// PHI nodes that would complicate life.
MergeBlock = R.getExit();
else {
- MergeBlock = SplitEdge(R.getExitingBlock(), R.getExit(), P);
+ MergeBlock = SplitEdge(R.getExitingBlock(), R.getExit(), &DT, &LI);
// SplitEdge will never split R.getExit(), as R.getExit() has more than
// one predecessor. Hence, mergeBlock is always a newly generated block.
R.replaceExitRecursive(MergeBlock);
Modified: polly/trunk/lib/Support/ScopHelper.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Support/ScopHelper.cpp?rev=226460&r1=226459&r2=226460&view=diff
==============================================================================
--- polly/trunk/lib/Support/ScopHelper.cpp (original)
+++ polly/trunk/lib/Support/ScopHelper.cpp Mon Jan 19 06:37:33 2015
@@ -115,13 +115,13 @@ BasicBlock *polly::simplifyRegion(Scop *
BasicBlock *OldEntry = R->getEntry();
BasicBlock *NewEntry = nullptr;
+ auto *DTWP = P->getAnalysisIfAvailable<DominatorTreeWrapperPass>();
+ auto *DT = DTWP ? &DTWP->getDomTree() : nullptr;
+ auto *LIWP = P->getAnalysisIfAvailable<LoopInfoWrapperPass>();
+ auto *LI = LIWP ? &LIWP->getLoopInfo() : nullptr;
+
// Create single entry edge if the region has multiple entry edges.
if (!EnteringBB) {
- auto *DTWP = P->getAnalysisIfAvailable<DominatorTreeWrapperPass>();
- auto *DT = DTWP ? &DTWP->getDomTree() : nullptr;
- auto *LIWP = P->getAnalysisIfAvailable<LoopInfoWrapperPass>();
- auto *LI = LIWP ? &LIWP->getLoopInfo() : nullptr;
-
NewEntry = SplitBlock(OldEntry, OldEntry->begin(), DT, LI);
EnteringBB = OldEntry;
}
@@ -129,7 +129,7 @@ BasicBlock *polly::simplifyRegion(Scop *
// Create an unconditional entry edge.
if (EnteringBB->getTerminator()->getNumSuccessors() != 1) {
BasicBlock *EntryBB = NewEntry ? NewEntry : OldEntry;
- BasicBlock *SplitEdgeBB = SplitEdge(EnteringBB, EntryBB, P);
+ BasicBlock *SplitEdgeBB = SplitEdge(EnteringBB, EntryBB, DT, LI);
// Once the edge between EnteringBB and EntryBB is split, two cases arise.
// The first is simple. The new block is inserted between EnteringBB and
More information about the llvm-commits
mailing list