diff options
| author | Chris Lattner <sabre@nondot.org> | 2010-09-21 04:32:08 +0000 | 
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2010-09-21 04:32:08 +0000 | 
| commit | 00ca0b8e9821fc042f8ab4cdad54d8792ef6e4d0 (patch) | |
| tree | 34a4925877a5d68763180b5761a05851ec7df231 /llvm/lib | |
| parent | 187f6534183845a4ab6ff514ebd6309db956f852 (diff) | |
| download | bcm5719-llvm-00ca0b8e9821fc042f8ab4cdad54d8792ef6e4d0.tar.gz bcm5719-llvm-00ca0b8e9821fc042f8ab4cdad54d8792ef6e4d0.zip  | |
start pushing MachinePointerInfo out through the MachineMemOperand interface
to the MachineFunction construction methods.
llvm-svn: 114390
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/CodeGen/MachineFunction.cpp | 16 | ||||
| -rw-r--r-- | llvm/lib/CodeGen/MachineInstr.cpp | 9 | 
2 files changed, 16 insertions, 9 deletions
diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp index 017170076ce..75edd251888 100644 --- a/llvm/lib/CodeGen/MachineFunction.cpp +++ b/llvm/lib/CodeGen/MachineFunction.cpp @@ -193,17 +193,23 @@ MachineMemOperand *  MachineFunction::getMachineMemOperand(const Value *v, unsigned f,                                        int64_t o, uint64_t s,                                        unsigned base_alignment) { -  return new (Allocator) MachineMemOperand(v, f, o, s, 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) { +  return new (Allocator) MachineMemOperand(PtrInfo, f, s, base_alignment);  }  MachineMemOperand *  MachineFunction::getMachineMemOperand(const MachineMemOperand *MMO,                                        int64_t Offset, uint64_t Size) {    return new (Allocator) -             MachineMemOperand(MMO->getValue(), MMO->getFlags(), -                               int64_t(uint64_t(MMO->getOffset()) + -                                       uint64_t(Offset)), -                               Size, MMO->getBaseAlignment()); +             MachineMemOperand(MachinePointerInfo(MMO->getValue(), +                                                  MMO->getOffset()+Offset), +                               MMO->getFlags(), Size, MMO->getBaseAlignment());  }  MachineInstr::mmo_iterator diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp index 08871b0a7bb..a953597c7e4 100644 --- a/llvm/lib/CodeGen/MachineInstr.cpp +++ b/llvm/lib/CodeGen/MachineInstr.cpp @@ -335,11 +335,12 @@ void MachineOperand::print(raw_ostream &OS, const TargetMachine *TM) const {  // MachineMemOperand Implementation  //===----------------------------------------------------------------------===// -MachineMemOperand::MachineMemOperand(const Value *v, unsigned int f, -                                     int64_t o, uint64_t s, unsigned int a) -  : PtrInfo(v, o), Size(s), +MachineMemOperand::MachineMemOperand(MachinePointerInfo ptrinfo, unsigned f, +                                     uint64_t s, unsigned int a) +  : PtrInfo(ptrinfo), Size(s),      Flags((f & ((1 << MOMaxBits) - 1)) | ((Log2_32(a) + 1) << MOMaxBits)) { -  assert((v == 0 || isa<PointerType>(v->getType())) && "invalid pointer value"); +  assert((PtrInfo.V == 0 || isa<PointerType>(PtrInfo.V->getType())) && +         "invalid pointer value");    assert(getBaseAlignment() == a && "Alignment is not a power of 2!");    assert((isLoad() || isStore()) && "Not a load/store!");  }  | 

