[llvm-commits] CVS: llvm/include/llvm/Instructions.h
Reid Spencer
reid at x10sys.com
Sat Apr 21 11:37:00 PDT 2007
Changes in directory llvm/include/llvm:
Instructions.h updated: 1.68 -> 1.69
---
Log message:
Revert Christopher Lamb's load/store alignment changes.
---
Diffs of the changes: (+7 -33)
Instructions.h | 40 +++++++---------------------------------
1 files changed, 7 insertions(+), 33 deletions(-)
Index: llvm/include/llvm/Instructions.h
diff -u llvm/include/llvm/Instructions.h:1.68 llvm/include/llvm/Instructions.h:1.69
--- llvm/include/llvm/Instructions.h:1.68 Sat Apr 21 09:32:59 2007
+++ llvm/include/llvm/Instructions.h Sat Apr 21 13:36:27 2007
@@ -211,11 +211,9 @@
/// SubclassData field in Value to store whether or not the load is volatile.
///
class LoadInst : public UnaryInstruction {
-
LoadInst(const LoadInst &LI)
: UnaryInstruction(LI.getType(), Load, LI.getOperand(0)) {
setVolatile(LI.isVolatile());
- setAlignment(LI.getAlignment());
#ifndef NDEBUG
AssertOK();
@@ -225,16 +223,14 @@
public:
LoadInst(Value *Ptr, const std::string &Name, Instruction *InsertBefore);
LoadInst(Value *Ptr, const std::string &Name, BasicBlock *InsertAtEnd);
- LoadInst(Value *Ptr, const std::string &Name, bool isVolatile = false,
- Instruction *InsertBefore = 0);
- LoadInst(Value *Ptr, const std::string &Name, bool isVolatile, unsigned Align,
+ LoadInst(Value *Ptr, const std::string &Name, bool isVolatile = false,
Instruction *InsertBefore = 0);
LoadInst(Value *Ptr, const std::string &Name, bool isVolatile,
BasicBlock *InsertAtEnd);
LoadInst(Value *Ptr, const char *Name, Instruction *InsertBefore);
LoadInst(Value *Ptr, const char *Name, BasicBlock *InsertAtEnd);
- explicit LoadInst(Value *Ptr, const char *Name = 0, bool isVolatile = false,
+ explicit LoadInst(Value *Ptr, const char *Name = 0, bool isVolatile = false,
Instruction *InsertBefore = 0);
LoadInst(Value *Ptr, const char *Name, bool isVolatile,
BasicBlock *InsertAtEnd);
@@ -242,23 +238,14 @@
/// isVolatile - Return true if this is a load from a volatile memory
/// location.
///
- bool isVolatile() const { return SubclassData & 1; }
+ bool isVolatile() const { return SubclassData; }
/// setVolatile - Specify whether this is a volatile load or not.
///
- void setVolatile(bool V) { SubclassData = (SubclassData & ~1) | unsigned(V); }
+ void setVolatile(bool V) { SubclassData = V; }
virtual LoadInst *clone() const;
- /// getAlignment - Return the alignment of the access that is being performed
- ///
- unsigned getAlignment() const {
- signed Log2AlignVal = ((SubclassData>>1)-1);
- return ((Log2AlignVal < 0) ? 0 : 1<<Log2AlignVal);
- }
-
- void setAlignment(unsigned Align);
-
Value *getPointerOperand() { return getOperand(0); }
const Value *getPointerOperand() const { return getOperand(0); }
static unsigned getPointerOperandIndex() { return 0U; }
@@ -282,13 +269,10 @@
///
class StoreInst : public Instruction {
Use Ops[2];
-
StoreInst(const StoreInst &SI) : Instruction(SI.getType(), Store, Ops, 2) {
Ops[0].init(SI.Ops[0], this);
Ops[1].init(SI.Ops[1], this);
setVolatile(SI.isVolatile());
- setAlignment(SI.getAlignment());
-
#ifndef NDEBUG
AssertOK();
#endif
@@ -299,19 +283,17 @@
StoreInst(Value *Val, Value *Ptr, BasicBlock *InsertAtEnd);
StoreInst(Value *Val, Value *Ptr, bool isVolatile = false,
Instruction *InsertBefore = 0);
- StoreInst(Value *Val, Value *Ptr, bool isVolatile,
- unsigned Align, Instruction *InsertBefore = 0);
StoreInst(Value *Val, Value *Ptr, bool isVolatile, BasicBlock *InsertAtEnd);
/// isVolatile - Return true if this is a load from a volatile memory
/// location.
///
- bool isVolatile() const { return SubclassData & 1; }
+ bool isVolatile() const { return SubclassData; }
/// setVolatile - Specify whether this is a volatile load or not.
///
- void setVolatile(bool V) { SubclassData = (SubclassData & ~1) | unsigned(V); }
+ void setVolatile(bool V) { SubclassData = V; }
/// Transparently provide more efficient getOperand methods.
Value *getOperand(unsigned i) const {
@@ -324,15 +306,7 @@
}
unsigned getNumOperands() const { return 2; }
- /// getAlignment - Return the alignment of the access that is being performed
- ///
- unsigned getAlignment() const {
- signed Log2AlignVal = ((SubclassData>>1)-1);
- return ((Log2AlignVal < 0) ? 0 : 1<<Log2AlignVal);
- }
-
- void setAlignment(unsigned Align);
-
+
virtual StoreInst *clone() const;
Value *getPointerOperand() { return getOperand(1); }
More information about the llvm-commits
mailing list