diff options
author | Chris Lattner <sabre@nondot.org> | 2010-09-21 06:22:23 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-09-21 06:22:23 +0000 |
commit | e8639036b1fb3a5b5e9589fe4e9f2ee1b77c36bd (patch) | |
tree | fc7d588707a78adac585ffc0b491906e6ede9447 /lib/CodeGen/MachineInstr.cpp | |
parent | e467d168d09e9d2bc9c598bde341921bba82baaa (diff) |
it's more elegant to put the "getConstantPool" and
"getFixedStack" on the MachinePointerInfo class. While
this isn't the problem I'm setting out to solve, it is the
right way to eliminate PseudoSourceValue, so lets go with it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114406 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineInstr.cpp')
-rw-r--r-- | lib/CodeGen/MachineInstr.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp index acab289953..c3021eff9b 100644 --- a/lib/CodeGen/MachineInstr.cpp +++ b/lib/CodeGen/MachineInstr.cpp @@ -342,6 +342,18 @@ unsigned MachinePointerInfo::getAddrSpace() const { return cast<PointerType>(V->getType())->getAddressSpace(); } +/// getConstantPool - Return a MachinePointerInfo record that refers to the +/// constant pool. +MachinePointerInfo MachinePointerInfo::getConstantPool() { + return MachinePointerInfo(PseudoSourceValue::getConstantPool()); +} + +/// getFixedStack - Return a MachinePointerInfo record that refers to the +/// the specified FrameIndex. +MachinePointerInfo MachinePointerInfo::getFixedStack(int FI, int64_t offset) { + return MachinePointerInfo(PseudoSourceValue::getFixedStack(FI), offset); +} + MachineMemOperand::MachineMemOperand(MachinePointerInfo ptrinfo, unsigned f, uint64_t s, unsigned int a) |