1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00

* Add a constant pool to hold per-function constants which must be spilled to memory

llvm-svn: 5208
This commit is contained in:
Chris Lattner 2003-01-13 00:16:10 +00:00
parent 4eda5395e8
commit abdcdcb67c

View File

@ -21,8 +21,9 @@ class Pass;
class SSARegMap; class SSARegMap;
class MachineFunctionInfo; class MachineFunctionInfo;
class MachineFrameInfo; class MachineFrameInfo;
class MachineConstantPool;
Pass *createMachineCodeConstructionPass(TargetMachine &Target); Pass *createMachineCodeConstructionPass(TargetMachine &TM);
Pass *createMachineCodeDestructionPass(); Pass *createMachineCodeDestructionPass();
Pass *createMachineFunctionPrinterPass(); Pass *createMachineFunctionPrinterPass();
@ -42,8 +43,11 @@ class MachineFunction : private Annotation {
// Keep track of objects allocated on the stack. // Keep track of objects allocated on the stack.
MachineFrameInfo *FrameInfo; MachineFrameInfo *FrameInfo;
// Keep track of constants which are spilled to memory
MachineConstantPool *ConstantPool;
public: public:
MachineFunction(const Function *Fn, const TargetMachine& target); MachineFunction(const Function *Fn, const TargetMachine &TM);
~MachineFunction(); ~MachineFunction();
/// getFunction - Return the LLVM function that this machine code represents /// getFunction - Return the LLVM function that this machine code represents
@ -66,6 +70,10 @@ public:
/// ///
MachineFrameInfo *getFrameInfo() const { return FrameInfo; } 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 /// MachineFunctionInfo - Keep track of various per-function pieces of
/// information for the sparc backend. /// information for the sparc backend.
/// ///
@ -90,8 +98,7 @@ public:
// for a given Method. // for a given Method.
// destruct() -- Destroy the MachineFunction object // destruct() -- Destroy the MachineFunction object
// //
static MachineFunction& construct(const Function *Fn, static MachineFunction& construct(const Function *F, const TargetMachine &TM);
const TargetMachine &target);
static void destruct(const Function *F); static void destruct(const Function *F);
static MachineFunction& get(const Function *F); static MachineFunction& get(const Function *F);