[llvm-commits] CVS: llvm/lib/VMCore/AsmWriter.cpp Instructions.cpp
Reid Spencer
reid at x10sys.com
Sat Apr 21 11:37:02 PDT 2007
Changes in directory llvm/lib/VMCore:
AsmWriter.cpp updated: 1.271 -> 1.272
Instructions.cpp updated: 1.86 -> 1.87
---
Log message:
Revert Christopher Lamb's load/store alignment changes.
---
Diffs of the changes: (+0 -49)
AsmWriter.cpp | 7 -------
Instructions.cpp | 42 ------------------------------------------
2 files changed, 49 deletions(-)
Index: llvm/lib/VMCore/AsmWriter.cpp
diff -u llvm/lib/VMCore/AsmWriter.cpp:1.271 llvm/lib/VMCore/AsmWriter.cpp:1.272
--- llvm/lib/VMCore/AsmWriter.cpp:1.271 Sat Apr 21 03:16:25 2007
+++ llvm/lib/VMCore/AsmWriter.cpp Sat Apr 21 13:36:27 2007
@@ -1307,13 +1307,6 @@
writeOperand(I.getOperand(i), PrintAllTypes);
}
}
-
- // Print post operand alignment for load/store
- if (isa<LoadInst>(I) && cast<LoadInst>(I).getAlignment()) {
- Out << ", align " << cast<LoadInst>(I).getAlignment();
- } else if (isa<StoreInst>(I) && cast<StoreInst>(I).getAlignment()) {
- Out << ", align " << cast<StoreInst>(I).getAlignment();
- }
printInfoComment(I);
Out << "\n";
Index: llvm/lib/VMCore/Instructions.cpp
diff -u llvm/lib/VMCore/Instructions.cpp:1.86 llvm/lib/VMCore/Instructions.cpp:1.87
--- llvm/lib/VMCore/Instructions.cpp:1.86 Sat Apr 21 03:16:25 2007
+++ llvm/lib/VMCore/Instructions.cpp Sat Apr 21 13:36:27 2007
@@ -20,7 +20,6 @@
#include "llvm/ParameterAttributes.h"
#include "llvm/Support/CallSite.h"
#include "llvm/Support/ConstantRange.h"
-#include "llvm/Support/MathExtras.h"
using namespace llvm;
unsigned CallSite::getCallingConv() const {
@@ -686,7 +685,6 @@
: UnaryInstruction(cast<PointerType>(Ptr->getType())->getElementType(),
Load, Ptr, InsertBef) {
setVolatile(false);
- setAlignment(0);
AssertOK();
setName(Name);
}
@@ -695,7 +693,6 @@
: UnaryInstruction(cast<PointerType>(Ptr->getType())->getElementType(),
Load, Ptr, InsertAE) {
setVolatile(false);
- setAlignment(0);
AssertOK();
setName(Name);
}
@@ -705,17 +702,6 @@
: UnaryInstruction(cast<PointerType>(Ptr->getType())->getElementType(),
Load, Ptr, InsertBef) {
setVolatile(isVolatile);
- setAlignment(0);
- AssertOK();
- setName(Name);
-}
-
-LoadInst::LoadInst(Value *Ptr, const std::string &Name, bool isVolatile,
- unsigned Align, Instruction *InsertBef)
- : UnaryInstruction(cast<PointerType>(Ptr->getType())->getElementType(),
- Load, Ptr, InsertBef) {
- setVolatile(isVolatile);
- setAlignment(Align);
AssertOK();
setName(Name);
}
@@ -725,7 +711,6 @@
: UnaryInstruction(cast<PointerType>(Ptr->getType())->getElementType(),
Load, Ptr, InsertAE) {
setVolatile(isVolatile);
- setAlignment(0);
AssertOK();
setName(Name);
}
@@ -736,7 +721,6 @@
: UnaryInstruction(cast<PointerType>(Ptr->getType())->getElementType(),
Load, Ptr, InsertBef) {
setVolatile(false);
- setAlignment(0);
AssertOK();
if (Name && Name[0]) setName(Name);
}
@@ -745,7 +729,6 @@
: UnaryInstruction(cast<PointerType>(Ptr->getType())->getElementType(),
Load, Ptr, InsertAE) {
setVolatile(false);
- setAlignment(0);
AssertOK();
if (Name && Name[0]) setName(Name);
}
@@ -755,7 +738,6 @@
: UnaryInstruction(cast<PointerType>(Ptr->getType())->getElementType(),
Load, Ptr, InsertBef) {
setVolatile(isVolatile);
- setAlignment(0);
AssertOK();
if (Name && Name[0]) setName(Name);
}
@@ -765,15 +747,10 @@
: UnaryInstruction(cast<PointerType>(Ptr->getType())->getElementType(),
Load, Ptr, InsertAE) {
setVolatile(isVolatile);
- setAlignment(0);
AssertOK();
if (Name && Name[0]) setName(Name);
}
-void LoadInst::setAlignment(unsigned Align) {
- assert((Align & (Align-1)) == 0 && "Alignment is not a power of 2!");
- SubclassData = (SubclassData & 1) | ((Log2_32(Align)+1)<<1);
-}
//===----------------------------------------------------------------------===//
// StoreInst Implementation
@@ -793,7 +770,6 @@
Ops[0].init(val, this);
Ops[1].init(addr, this);
setVolatile(false);
- setAlignment(0);
AssertOK();
}
@@ -802,7 +778,6 @@
Ops[0].init(val, this);
Ops[1].init(addr, this);
setVolatile(false);
- setAlignment(0);
AssertOK();
}
@@ -812,17 +787,6 @@
Ops[0].init(val, this);
Ops[1].init(addr, this);
setVolatile(isVolatile);
- setAlignment(0);
- AssertOK();
-}
-
-StoreInst::StoreInst(Value *val, Value *addr, bool isVolatile,
- unsigned Align, Instruction *InsertBefore)
- : Instruction(Type::VoidTy, Store, Ops, 2, InsertBefore) {
- Ops[0].init(val, this);
- Ops[1].init(addr, this);
- setVolatile(isVolatile);
- setAlignment(Align);
AssertOK();
}
@@ -832,15 +796,9 @@
Ops[0].init(val, this);
Ops[1].init(addr, this);
setVolatile(isVolatile);
- setAlignment(0);
AssertOK();
}
-void StoreInst::setAlignment(unsigned Align) {
- assert((Align & (Align-1)) == 0 && "Alignment is not a power of 2!");
- SubclassData = (SubclassData & 1) | ((Log2_32(Align)+1)<<1);
-}
-
//===----------------------------------------------------------------------===//
// GetElementPtrInst Implementation
//===----------------------------------------------------------------------===//
More information about the llvm-commits
mailing list