summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-01-13 00:16:10 +0000
committerChris Lattner <sabre@nondot.org>2003-01-13 00:16:10 +0000
commit40a75577ea6b4fb9cc92780ca0caa21604246b1b (patch)
tree1b5dc3904a4fffa672cb748ca038c3db00f42057 /include
parent09a5b0b6a351aa5c12fdd1f076fcf0943f5382ac (diff)
downloadllvm-40a75577ea6b4fb9cc92780ca0caa21604246b1b.tar.gz
llvm-40a75577ea6b4fb9cc92780ca0caa21604246b1b.tar.bz2
llvm-40a75577ea6b4fb9cc92780ca0caa21604246b1b.tar.xz
* Add a constant pool to hold per-function constants which must be spilled to memory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5208 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/CodeGen/MachineFunction.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/include/llvm/CodeGen/MachineFunction.h b/include/llvm/CodeGen/MachineFunction.h
index 602307ea9d..56452f1048 100644
--- a/include/llvm/CodeGen/MachineFunction.h
+++ b/include/llvm/CodeGen/MachineFunction.h
@@ -21,8 +21,9 @@ class Pass;
class SSARegMap;
class MachineFunctionInfo;
class MachineFrameInfo;
+class MachineConstantPool;
-Pass *createMachineCodeConstructionPass(TargetMachine &Target);
+Pass *createMachineCodeConstructionPass(TargetMachine &TM);
Pass *createMachineCodeDestructionPass();
Pass *createMachineFunctionPrinterPass();
@@ -42,8 +43,11 @@ class MachineFunction : private Annotation {
// Keep track of objects allocated on the stack.
MachineFrameInfo *FrameInfo;
+ // Keep track of constants which are spilled to memory
+ MachineConstantPool *ConstantPool;
+
public:
- MachineFunction(const Function *Fn, const TargetMachine& target);
+ MachineFunction(const Function *Fn, const TargetMachine &TM);
~MachineFunction();
/// getFunction - Return the LLVM function that this machine code represents
@@ -66,6 +70,10 @@ public:
///
MachineFrameInfo *getFrameInfo() const { return FrameInfo; }
+ /// getConstantPool - Return the constant pool object for the current
+ /// function.
+ MachineConstantPool *getConstantPool() const { return ConstantPool; }
+
/// MachineFunctionInfo - Keep track of various per-function pieces of
/// information for the sparc backend.
///
@@ -90,8 +98,7 @@ public:
// for a given Method.
// destruct() -- Destroy the MachineFunction object
//
- static MachineFunction& construct(const Function *Fn,
- const TargetMachine &target);
+ static MachineFunction& construct(const Function *F, const TargetMachine &TM);
static void destruct(const Function *F);
static MachineFunction& get(const Function *F);