summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-09-21 06:22:23 +0000
committerChris Lattner <sabre@nondot.org>2010-09-21 06:22:23 +0000
commit82fd06d3ce79fd5cf0e55365735374021bbc6f8c (patch)
tree96b8eb6a48257825282d9824117e54487eb19622 /llvm/lib/CodeGen
parent8363087ba8561a2de041f159e2009e6cc220a1ba (diff)
downloadbcm5719-llvm-82fd06d3ce79fd5cf0e55365735374021bbc6f8c.tar.gz
bcm5719-llvm-82fd06d3ce79fd5cf0e55365735374021bbc6f8c.zip
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. llvm-svn: 114406
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/MachineInstr.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp
index acab289953d..c3021eff9b1 100644
--- a/llvm/lib/CodeGen/MachineInstr.cpp
+++ b/llvm/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)
OpenPOWER on IntegriCloud