From: Hongbin Zheng Date: Wed, 25 Apr 2012 09:34:33 +0000 (+0000) Subject: ScopStmt: Provide a function to allow users look up the corresponding X-Git-Tag: llvmorg-3.2.0-rc1~10593 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=39645abf4ca1b972d2b2c6e449ca70e063e8783c;p=platform%2Fupstream%2Fllvm.git 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 --- diff --git a/polly/include/polly/ScopInfo.h b/polly/include/polly/ScopInfo.h index 3d7ff725e0ee..4eb1ece2d553 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;