[llvm-commits] [polly] r155544 - /polly/trunk/include/polly/ScopInfo.h

Hongbin Zheng etherzhhb at gmail.com
Wed Apr 25 02:34:33 PDT 2012


Author: ether
Date: Wed Apr 25 04:34:33 2012
New Revision: 155544

URL: http://llvm.org/viewvc/llvm-project?rev=155544&view=rev
Log:
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.

Modified:
    polly/trunk/include/polly/ScopInfo.h

Modified: polly/trunk/include/polly/ScopInfo.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/include/polly/ScopInfo.h?rev=155544&r1=155543&r2=155544&view=diff
==============================================================================
--- polly/trunk/include/polly/ScopInfo.h (original)
+++ polly/trunk/include/polly/ScopInfo.h Wed Apr 25 04:34:33 2012
@@ -321,6 +321,12 @@
     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;





More information about the llvm-commits mailing list