X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FiMemory.h;h=e42f5b993b85c924a66abf00169ae3ae2e76c81f;hb=87944916a4764dabc2f89cbec0a6c7e439c28530;hp=c198aebd70c6d958bcc32de35d741e41b94ffb45;hpb=e87e1c9aa947e6558412b6517308410cd0f5aea4;p=oota-llvm.git diff --git a/include/llvm/iMemory.h b/include/llvm/iMemory.h index c198aebd70c..e42f5b993b8 100644 --- a/include/llvm/iMemory.h +++ b/include/llvm/iMemory.h @@ -150,6 +150,7 @@ public: Value *getPointerOperand() { return getOperand(0); } const Value *getPointerOperand() const { return getOperand(0); } + static unsigned getPointerOperandIndex() { return 0U; } // Methods for support type inquiry through isa, cast, and dyn_cast: static inline bool classof(const LoadInst *) { return true; } @@ -180,6 +181,7 @@ public: Value *getPointerOperand() { return getOperand(1); } const Value *getPointerOperand() const { return getOperand(1); } + static unsigned getPointerOperandIndex() { return 1U; } // Methods for support type inquiry through isa, cast, and dyn_cast: static inline bool classof(const StoreInst *) { return true; } @@ -238,7 +240,10 @@ public: const Value *getPointerOperand() const { return getOperand(0); } - + static unsigned getPointerOperandIndex() { + return 0U; // get index for modifying correct operand + } + inline unsigned getNumIndices() const { // Note: always non-negative return getNumOperands() - 1; }