mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 16:33:28 +00:00
Add constructor overloads for LoadInst and StoreInst that insert at the
end of a BasicBlock and have an alignment parameter. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40016 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4106f3714e
commit
6ab2d18f5e
@ -235,6 +235,8 @@ public:
|
|||||||
Instruction *InsertBefore = 0);
|
Instruction *InsertBefore = 0);
|
||||||
LoadInst(Value *Ptr, const std::string &Name, bool isVolatile,
|
LoadInst(Value *Ptr, const std::string &Name, bool isVolatile,
|
||||||
BasicBlock *InsertAtEnd);
|
BasicBlock *InsertAtEnd);
|
||||||
|
LoadInst(Value *Ptr, const std::string &Name, bool isVolatile, unsigned Align,
|
||||||
|
BasicBlock *InsertAtEnd);
|
||||||
|
|
||||||
LoadInst(Value *Ptr, const char *Name, Instruction *InsertBefore);
|
LoadInst(Value *Ptr, const char *Name, Instruction *InsertBefore);
|
||||||
LoadInst(Value *Ptr, const char *Name, BasicBlock *InsertAtEnd);
|
LoadInst(Value *Ptr, const char *Name, BasicBlock *InsertAtEnd);
|
||||||
@ -307,6 +309,8 @@ public:
|
|||||||
StoreInst(Value *Val, Value *Ptr, bool isVolatile,
|
StoreInst(Value *Val, Value *Ptr, bool isVolatile,
|
||||||
unsigned Align, Instruction *InsertBefore = 0);
|
unsigned Align, Instruction *InsertBefore = 0);
|
||||||
StoreInst(Value *Val, Value *Ptr, bool isVolatile, BasicBlock *InsertAtEnd);
|
StoreInst(Value *Val, Value *Ptr, bool isVolatile, BasicBlock *InsertAtEnd);
|
||||||
|
StoreInst(Value *Val, Value *Ptr, bool isVolatile,
|
||||||
|
unsigned Align, BasicBlock *InsertAtEnd);
|
||||||
|
|
||||||
|
|
||||||
/// isVolatile - Return true if this is a load from a volatile memory
|
/// isVolatile - Return true if this is a load from a volatile memory
|
||||||
|
@ -740,6 +740,16 @@ LoadInst::LoadInst(Value *Ptr, const std::string &Name, bool isVolatile,
|
|||||||
setName(Name);
|
setName(Name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LoadInst::LoadInst(Value *Ptr, const std::string &Name, bool isVolatile,
|
||||||
|
unsigned Align, BasicBlock *InsertAE)
|
||||||
|
: UnaryInstruction(cast<PointerType>(Ptr->getType())->getElementType(),
|
||||||
|
Load, Ptr, InsertAE) {
|
||||||
|
setVolatile(isVolatile);
|
||||||
|
setAlignment(Align);
|
||||||
|
AssertOK();
|
||||||
|
setName(Name);
|
||||||
|
}
|
||||||
|
|
||||||
LoadInst::LoadInst(Value *Ptr, const std::string &Name, bool isVolatile,
|
LoadInst::LoadInst(Value *Ptr, const std::string &Name, bool isVolatile,
|
||||||
BasicBlock *InsertAE)
|
BasicBlock *InsertAE)
|
||||||
: UnaryInstruction(cast<PointerType>(Ptr->getType())->getElementType(),
|
: UnaryInstruction(cast<PointerType>(Ptr->getType())->getElementType(),
|
||||||
@ -846,6 +856,16 @@ StoreInst::StoreInst(Value *val, Value *addr, bool isVolatile,
|
|||||||
AssertOK();
|
AssertOK();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
StoreInst::StoreInst(Value *val, Value *addr, bool isVolatile,
|
||||||
|
unsigned Align, BasicBlock *InsertAtEnd)
|
||||||
|
: Instruction(Type::VoidTy, Store, Ops, 2, InsertAtEnd) {
|
||||||
|
Ops[0].init(val, this);
|
||||||
|
Ops[1].init(addr, this);
|
||||||
|
setVolatile(isVolatile);
|
||||||
|
setAlignment(Align);
|
||||||
|
AssertOK();
|
||||||
|
}
|
||||||
|
|
||||||
StoreInst::StoreInst(Value *val, Value *addr, bool isVolatile,
|
StoreInst::StoreInst(Value *val, Value *addr, bool isVolatile,
|
||||||
BasicBlock *InsertAtEnd)
|
BasicBlock *InsertAtEnd)
|
||||||
: Instruction(Type::VoidTy, Store, Ops, 2, InsertAtEnd) {
|
: Instruction(Type::VoidTy, Store, Ops, 2, InsertAtEnd) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user