virtual Instruction *clone() const { return new FreeInst(Operands[0]); }
- virtual bool hasSideEffects() const { return true; }
+ virtual bool mayWriteToMemory() const { return true; }
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const FreeInst *) { return true; }
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; }
StoreInst(Value *Val, Value *Ptr, Instruction *InsertBefore = 0);
virtual Instruction *clone() const { return new StoreInst(*this); }
- virtual bool hasSideEffects() const { return true; }
+ virtual bool mayWriteToMemory() const { return true; }
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; }
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;
}