[LLVMdev] mayload and maystore?

reed kotler rkotler at mips.com
Fri Sep 30 22:29:52 PDT 2011


these are supposed for any instruction which could possible read/write 
memory?

(btw, should be canload or canstore in that case :)  )

this does not seem to be consistent with their use in TD files.


  /// mayLoad - Return true if this instruction could possibly read memory.
   /// Instructions with this flag set are not necessarily simple load
   /// instructions, they may load a value and modify it, for example.
   bool mayLoad() const {
     return Flags & (1 << MCID::MayLoad);
   }


   /// mayStore - Return true if this instruction could possibly modify 
memory.
   /// Instructions with this flag set are not necessarily simple store
   /// instructions, they may store a modified value based on their 
operands, or
   /// may not actually modify anything, for example.
   bool mayStore() const {
     return Flags & (1 << MCID::MayStore);
   }




More information about the llvm-dev mailing list