force clients of MachineFunction::getMachineMemOperand to provide a

MachinePointerInfo, propagating the type out a level of API.  Remove
the old MachineFunction::getMachineMemOperand impl.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114393 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2010-09-21 04:46:39 +00:00
parent 59db5496f4
commit 93a95ae8a9
5 changed files with 19 additions and 32 deletions

View File

@ -189,14 +189,6 @@ MachineFunction::DeleteMachineBasicBlock(MachineBasicBlock *MBB) {
BasicBlockRecycler.Deallocate(Allocator, MBB);
}
MachineMemOperand *
MachineFunction::getMachineMemOperand(const Value *v, unsigned f,
int64_t o, uint64_t s,
unsigned base_alignment) {
return new (Allocator) MachineMemOperand(MachinePointerInfo(v, o), f,
s, base_alignment);
}
MachineMemOperand *
MachineFunction::getMachineMemOperand(MachinePointerInfo PtrInfo, unsigned f,
uint64_t s, unsigned base_alignment) {
@ -237,10 +229,9 @@ MachineFunction::extractLoadMemRefs(MachineInstr::mmo_iterator Begin,
else {
// Clone the MMO and unset the store flag.
MachineMemOperand *JustLoad =
getMachineMemOperand((*I)->getValue(),
getMachineMemOperand((*I)->getPointerInfo(),
(*I)->getFlags() & ~MachineMemOperand::MOStore,
(*I)->getOffset(), (*I)->getSize(),
(*I)->getBaseAlignment());
(*I)->getSize(), (*I)->getBaseAlignment());
Result[Index] = JustLoad;
}
++Index;
@ -269,10 +260,9 @@ MachineFunction::extractStoreMemRefs(MachineInstr::mmo_iterator Begin,
else {
// Clone the MMO and unset the load flag.
MachineMemOperand *JustStore =
getMachineMemOperand((*I)->getValue(),
getMachineMemOperand((*I)->getPointerInfo(),
(*I)->getFlags() & ~MachineMemOperand::MOLoad,
(*I)->getOffset(), (*I)->getSize(),
(*I)->getBaseAlignment());
(*I)->getSize(), (*I)->getBaseAlignment());
Result[Index] = JustStore;
}
++Index;