From 39645abf4ca1b972d2b2c6e449ca70e063e8783c Mon Sep 17 00:00:00 2001 From: Hongbin Zheng Date: Wed, 25 Apr 2012 09:34:33 +0000 Subject: [PATCH] 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 --- polly/include/polly/ScopInfo.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/polly/include/polly/ScopInfo.h b/polly/include/polly/ScopInfo.h index 3d7ff72..4eb1ece 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_iterator at + = InstructionToAccess.find(Inst); + return at == InstructionToAccess.end() ? NULL : at->second; + } + void setBasicBlock(BasicBlock *Block) { BB = Block; } typedef MemoryAccessVec::iterator memacc_iterator; -- 2.7.4