diff options
Diffstat (limited to 'polly/lib/CodeGen')
-rw-r--r-- | polly/lib/CodeGen/BlockGenerators.cpp | 20 | ||||
-rw-r--r-- | polly/lib/CodeGen/IslNodeBuilder.cpp | 8 |
2 files changed, 14 insertions, 14 deletions
diff --git a/polly/lib/CodeGen/BlockGenerators.cpp b/polly/lib/CodeGen/BlockGenerators.cpp index 67d2e2260c9..43fec9a9e39 100644 --- a/polly/lib/CodeGen/BlockGenerators.cpp +++ b/polly/lib/CodeGen/BlockGenerators.cpp @@ -332,14 +332,14 @@ Value *BlockGenerator::getOrCreateAlloca(Value *ScalarBase, } Value *BlockGenerator::getOrCreateAlloca(MemoryAccess &Access) { - if (Access.isPHI()) + if (Access.isPHIKind()) return getOrCreatePHIAlloca(Access.getBaseAddr()); else return getOrCreateScalarAlloca(Access.getBaseAddr()); } Value *BlockGenerator::getOrCreateAlloca(const ScopArrayInfo *Array) { - if (Array->isPHI()) + if (Array->isPHIKind()) return getOrCreatePHIAlloca(Array->getBasePtr()); else return getOrCreateScalarAlloca(Array->getBasePtr()); @@ -388,7 +388,7 @@ void BlockGenerator::handleOutsideUsers(const Region &R, Instruction *Inst, void BlockGenerator::generateScalarLoads(ScopStmt &Stmt, ValueMapT &BBMap) { for (MemoryAccess *MA : Stmt) { - if (MA->isExplicit() || MA->isWrite()) + if (MA->isArrayKind() || MA->isWrite()) continue; auto *Address = getOrCreateAlloca(*MA); @@ -453,7 +453,7 @@ void BlockGenerator::generateScalarStores(ScopStmt &Stmt, LoopToScevMapT <S, "RegionGenerator"); for (MemoryAccess *MA : Stmt) { - if (MA->isExplicit() || MA->isRead()) + if (MA->isArrayKind() || MA->isRead()) continue; Value *Val = MA->getAccessValue(); @@ -484,7 +484,7 @@ void BlockGenerator::createScalarInitialization(Scop &S) { auto &Array = Pair.second; if (Array->getNumberOfDimensions() != 0) continue; - if (Array->isPHI()) { + if (Array->isPHIKind()) { // For PHI nodes, the only values we need to store are the ones that // reach the PHI node from outside the region. In general there should // only be one such incoming edge and this edge should enter through @@ -578,7 +578,7 @@ void BlockGenerator::findOutsideUsers(Scop &S) { if (Array->getNumberOfDimensions() != 0) continue; - if (Array->isPHI()) + if (Array->isPHIKind()) continue; auto *Inst = dyn_cast<Instruction>(Array->getBasePtr()); @@ -1188,7 +1188,7 @@ void RegionGenerator::generateScalarStores(ScopStmt &Stmt, LoopToScevMapT <S, "function in the BlockGenerator"); for (MemoryAccess *MA : Stmt) { - if (MA->isExplicit() || MA->isRead()) + if (MA->isArrayKind() || MA->isRead()) continue; Instruction *ScalarInst = MA->getAccessInstruction(); @@ -1200,8 +1200,8 @@ void RegionGenerator::generateScalarStores(ScopStmt &Stmt, LoopToScevMapT <S, auto SavedInsertionPoint = Builder.GetInsertPoint(); ValueMapT *LocalBBMap = &BBMap; - // Implicit writes induced by PHIs must be written in the incoming blocks. - if (MA->isPHI() || MA->isExitPHI()) { + // Scalar writes induced by PHIs must be written in the incoming blocks. + if (MA->isPHIKind() || MA->isExitPHIKind()) { BasicBlock *ExitingBB = ScalarInst->getParent(); BasicBlock *ExitingBBCopy = BlockMap[ExitingBB]; Builder.SetInsertPoint(ExitingBBCopy->getTerminator()); @@ -1217,7 +1217,7 @@ void RegionGenerator::generateScalarStores(ScopStmt &Stmt, LoopToScevMapT <S, Builder.CreateStore(Val, Address); // Restore the insertion point if necessary. - if (MA->isPHI() || MA->isExitPHI()) + if (MA->isPHIKind() || MA->isExitPHIKind()) Builder.SetInsertPoint(SavedInsertBB, SavedInsertionPoint); } } diff --git a/polly/lib/CodeGen/IslNodeBuilder.cpp b/polly/lib/CodeGen/IslNodeBuilder.cpp index 71ef9c5c569..f75a304d07b 100644 --- a/polly/lib/CodeGen/IslNodeBuilder.cpp +++ b/polly/lib/CodeGen/IslNodeBuilder.cpp @@ -219,7 +219,7 @@ static isl_stat addReferencesFromStmt(const ScopStmt *Stmt, void *UserPtr) { } for (auto &Access : *Stmt) { - if (Access->isExplicit()) { + if (Access->isArrayKind()) { auto *BasePtr = Access->getScopArrayInfo()->getBasePtr(); if (Instruction *OpInst = dyn_cast<Instruction>(BasePtr)) if (Stmt->getParent()->getRegion().contains(OpInst)) @@ -1008,7 +1008,7 @@ bool IslNodeBuilder::preloadInvariantEquivClass( return true; MemoryAccess *MA = MAs.front(); - assert(MA->isExplicit() && MA->isRead()); + assert(MA->isArrayKind() && MA->isRead()); // If the access function was already mapped, the preload of this equivalence // class was triggered earlier already and doesn't need to be done again. @@ -1023,7 +1023,7 @@ bool IslNodeBuilder::preloadInvariantEquivClass( // If the base pointer of this class is dependent on another one we have to // make sure it was preloaded already. - auto *SAI = S.getScopArrayInfo(MA->getBaseAddr(), ScopArrayInfo::KIND_ARRAY); + auto *SAI = S.getScopArrayInfo(MA->getBaseAddr(), ScopArrayInfo::MK_Array); if (const auto *BaseIAClass = S.lookupInvariantEquivClass(SAI->getBasePtr())) if (!preloadInvariantEquivClass(*BaseIAClass)) return false; @@ -1075,7 +1075,7 @@ bool IslNodeBuilder::preloadInvariantEquivClass( // For scalar derived SAIs we remap the alloca used for the derived value. if (BasePtr == MA->getAccessInstruction()) { - if (DerivedSAI->isPHI()) + if (DerivedSAI->isPHIKind()) PHIOpMap[BasePtr] = Alloca; else ScalarMap[BasePtr] = Alloca; |