[llvm-commits] CVS: llvm/include/llvm/Instruction.h iMemory.h iOther.h iTerminators.h
Chris Lattner
lattner at cs.uiuc.edu
Mon Feb 24 14:49:01 PST 2003
Changes in directory llvm/include/llvm:
Instruction.h updated: 1.36 -> 1.37
iMemory.h updated: 1.37 -> 1.38
iOther.h updated: 1.31 -> 1.32
iTerminators.h updated: 1.24 -> 1.25
---
Log message:
Rename Instruction::hasSideEffects() -> mayWriteToMemory()
---
Diffs of the changes:
Index: llvm/include/llvm/Instruction.h
diff -u llvm/include/llvm/Instruction.h:1.36 llvm/include/llvm/Instruction.h:1.37
--- llvm/include/llvm/Instruction.h:1.36 Wed Oct 30 22:13:59 2002
+++ llvm/include/llvm/Instruction.h Mon Feb 24 14:48:28 2003
@@ -55,7 +55,9 @@
Instruction *getPrev() { return Prev; }
const Instruction *getPrev() const { return Prev; }
- virtual bool hasSideEffects() const { return false; } // Memory & Call insts
+ /// mayWriteToMemory - Return true if this instruction may modify memory.
+ ///
+ virtual bool mayWriteToMemory() const { return false; }
// ---------------------------------------------------------------------------
/// Subclass classification... getOpcode() returns a member of
Index: llvm/include/llvm/iMemory.h
diff -u llvm/include/llvm/iMemory.h:1.37 llvm/include/llvm/iMemory.h:1.38
--- llvm/include/llvm/iMemory.h:1.37 Mon Sep 16 11:06:12 2002
+++ llvm/include/llvm/iMemory.h Mon Feb 24 14:48:28 2003
@@ -120,7 +120,7 @@
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; }
@@ -177,7 +177,7 @@
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); }
Index: llvm/include/llvm/iOther.h
diff -u llvm/include/llvm/iOther.h:1.31 llvm/include/llvm/iOther.h:1.32
--- llvm/include/llvm/iOther.h:1.31 Fri Jan 31 18:41:27 2003
+++ llvm/include/llvm/iOther.h Mon Feb 24 14:48:28 2003
@@ -60,7 +60,7 @@
Instruction* InsertBefore = 0);
virtual Instruction *clone() const { return new CallInst(*this); }
- bool hasSideEffects() const { return true; }
+ bool mayWriteToMemory() const { return true; }
const Function *getCalledFunction() const {
return dyn_cast<Function>(Operands[0].get());
Index: llvm/include/llvm/iTerminators.h
diff -u llvm/include/llvm/iTerminators.h:1.24 llvm/include/llvm/iTerminators.h:1.25
--- llvm/include/llvm/iTerminators.h:1.24 Tue Sep 10 18:54:56 2002
+++ llvm/include/llvm/iTerminators.h Mon Feb 24 14:48:28 2003
@@ -196,7 +196,7 @@
virtual Instruction *clone() const { return new InvokeInst(*this); }
- bool hasSideEffects() const { return true; }
+ bool mayWriteToMemory() const { return true; }
// getCalledFunction - Return the function called, or null if this is an
// indirect function invocation...
More information about the llvm-commits
mailing list