[llvm-commits] [llvm] r78697 - in /llvm/trunk: include/llvm/Instructions.h lib/VMCore/Instructions.cpp
Daniel Dunbar
daniel at zuster.org
Tue Aug 11 11:11:16 PDT 2009
Author: ddunbar
Date: Tue Aug 11 13:11:15 2009
New Revision: 78697
URL: http://llvm.org/viewvc/llvm-project?rev=78697&view=rev
Log:
Revert 78680 until I figure out why it completely broke things.
Modified:
llvm/trunk/include/llvm/Instructions.h
llvm/trunk/lib/VMCore/Instructions.cpp
Modified: llvm/trunk/include/llvm/Instructions.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Instructions.h?rev=78697&r1=78696&r2=78697&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Instructions.h (original)
+++ llvm/trunk/include/llvm/Instructions.h Tue Aug 11 13:11:15 2009
@@ -248,7 +248,7 @@
public:
LoadInst(Value *Ptr, const Twine &NameStr, Instruction *InsertBefore);
LoadInst(Value *Ptr, const Twine &NameStr, BasicBlock *InsertAtEnd);
- LoadInst(Value *Ptr, const Twine &NameStr = "", bool isVolatile = false,
+ LoadInst(Value *Ptr, const Twine &NameStr, bool isVolatile = false,
Instruction *InsertBefore = 0);
LoadInst(Value *Ptr, const Twine &NameStr, bool isVolatile,
unsigned Align, Instruction *InsertBefore = 0);
@@ -257,6 +257,13 @@
LoadInst(Value *Ptr, const Twine &NameStr, bool isVolatile,
unsigned Align, BasicBlock *InsertAtEnd);
+ LoadInst(Value *Ptr, const char *NameStr, Instruction *InsertBefore);
+ LoadInst(Value *Ptr, const char *NameStr, BasicBlock *InsertAtEnd);
+ explicit LoadInst(Value *Ptr, const char *NameStr = 0,
+ bool isVolatile = false, Instruction *InsertBefore = 0);
+ LoadInst(Value *Ptr, const char *NameStr, bool isVolatile,
+ BasicBlock *InsertAtEnd);
+
/// isVolatile - Return true if this is a load from a volatile memory
/// location.
///
Modified: llvm/trunk/lib/VMCore/Instructions.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Instructions.cpp?rev=78697&r1=78696&r2=78697&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Instructions.cpp (original)
+++ llvm/trunk/lib/VMCore/Instructions.cpp Tue Aug 11 13:11:15 2009
@@ -863,6 +863,46 @@
setName(Name);
}
+
+
+LoadInst::LoadInst(Value *Ptr, const char *Name, Instruction *InsertBef)
+ : UnaryInstruction(cast<PointerType>(Ptr->getType())->getElementType(),
+ Load, Ptr, InsertBef) {
+ setVolatile(false);
+ setAlignment(0);
+ AssertOK();
+ if (Name && Name[0]) setName(Name);
+}
+
+LoadInst::LoadInst(Value *Ptr, const char *Name, BasicBlock *InsertAE)
+ : UnaryInstruction(cast<PointerType>(Ptr->getType())->getElementType(),
+ Load, Ptr, InsertAE) {
+ setVolatile(false);
+ setAlignment(0);
+ AssertOK();
+ if (Name && Name[0]) setName(Name);
+}
+
+LoadInst::LoadInst(Value *Ptr, const char *Name, bool isVolatile,
+ Instruction *InsertBef)
+: UnaryInstruction(cast<PointerType>(Ptr->getType())->getElementType(),
+ Load, Ptr, InsertBef) {
+ setVolatile(isVolatile);
+ setAlignment(0);
+ AssertOK();
+ if (Name && Name[0]) setName(Name);
+}
+
+LoadInst::LoadInst(Value *Ptr, const char *Name, bool isVolatile,
+ BasicBlock *InsertAE)
+ : 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);
More information about the llvm-commits
mailing list