summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHongbin Zheng <etherzhhb@gmail.com>2012-04-25 09:34:33 +0000
committerHongbin Zheng <etherzhhb@gmail.com>2012-04-25 09:34:33 +0000
commit39645abf4ca1b972d2b2c6e449ca70e063e8783c (patch)
tree6f2b5f287cb7290b444040e34045b37cb28e915d
parent0a0655affa2d4f88d24d3b6be3821c865f7c7b88 (diff)
downloadbcm5719-llvm-39645abf4ca1b972d2b2c6e449ca70e063e8783c.tar.gz
bcm5719-llvm-39645abf4ca1b972d2b2c6e449ca70e063e8783c.zip
ScopStmt: Provide a function to allow users look up the corresponding
memory access of a particular instruction, the function will return null if no such memory access. llvm-svn: 155544
-rwxr-xr-xpolly/include/polly/ScopInfo.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/polly/include/polly/ScopInfo.h b/polly/include/polly/ScopInfo.h
index 3d7ff725e0e..4eb1ece2d55 100755
--- a/polly/include/polly/ScopInfo.h
+++ b/polly/include/polly/ScopInfo.h
@@ -321,6 +321,12 @@ public:
return *InstructionToAccess[Inst];
}
+ MemoryAccess *lookupAccessFor(const Instruction *Inst) const {
+ std::map<const Instruction*, MemoryAccess*>::const_iterator at
+ = InstructionToAccess.find(Inst);
+ return at == InstructionToAccess.end() ? NULL : at->second;
+ }
+
void setBasicBlock(BasicBlock *Block) { BB = Block; }
typedef MemoryAccessVec::iterator memacc_iterator;
OpenPOWER on IntegriCloud