diff options
author | Chris Lattner <sabre@nondot.org> | 2004-08-16 22:35:26 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-08-16 22:35:26 +0000 |
commit | 2fcd451a5e909857f81215bf5a77a2426ffab984 (patch) | |
tree | cc229ee434c9f6b6c675e6fd700815a513c33ea0 /include | |
parent | 5a6074053d458159953f83dad078cbe315318314 (diff) | |
download | external_llvm-2fcd451a5e909857f81215bf5a77a2426ffab984.zip external_llvm-2fcd451a5e909857f81215bf5a77a2426ffab984.tar.gz external_llvm-2fcd451a5e909857f81215bf5a77a2426ffab984.tar.bz2 |
Fit into 80 lines, add a gross hack for MachineFunctionInfo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15832 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/CodeGen/MachineFunction.h | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/include/llvm/CodeGen/MachineFunction.h b/include/llvm/CodeGen/MachineFunction.h index 3a27fd7..cc675e4 100644 --- a/include/llvm/CodeGen/MachineFunction.h +++ b/include/llvm/CodeGen/MachineFunction.h @@ -42,26 +42,30 @@ public: static const MachineBasicBlock* getNext(const MachineBasicBlock* N) { return N->Next; } - static void setPrev(MachineBasicBlock* N, MachineBasicBlock* prev) { N->Prev = prev; } - static void setNext(MachineBasicBlock* N, MachineBasicBlock* next) { N->Next = next; } - + static void setPrev(MachineBasicBlock* N, MachineBasicBlock* prev) { + N->Prev = prev; + } + static void setNext(MachineBasicBlock* N, MachineBasicBlock* next) { + N->Next = next; + } static MachineBasicBlock* createNode(); void addNodeToList(MachineBasicBlock* N); void removeNodeFromList(MachineBasicBlock* N); - void transferNodesFromList( - iplist<MachineBasicBlock, ilist_traits<MachineBasicBlock> >& toList, + void transferNodesFromList(iplist<MachineBasicBlock, + ilist_traits<MachineBasicBlock> > &toList, ilist_iterator<MachineBasicBlock> first, ilist_iterator<MachineBasicBlock> last); }; - class Function; class TargetMachine; class SSARegMap; -class MachineFunctionInfo; class MachineFrameInfo; class MachineConstantPool; +// MachineFunctionInfoBase - This is a gross SparcV9 hack +struct MachineFunctionInfoBase { virtual ~MachineFunctionInfoBase() {}; }; +class MachineFunctionInfo; class MachineFunction : private Annotation { const Function *Fn; @@ -73,8 +77,8 @@ class MachineFunction : private Annotation { // Keeping track of mapping from SSA values to registers SSARegMap *SSARegMapping; - // Used to keep track of frame and constant area information for sparc be - MachineFunctionInfo *MFInfo; + // Used to keep track of frame and constant area information for SparcV9 BE. + mutable MachineFunctionInfoBase *MFInfo; // Keep track of objects allocated on the stack. MachineFrameInfo *FrameInfo; @@ -118,7 +122,7 @@ public: /// MachineFunctionInfo - Keep track of various per-function pieces of /// information for the sparc backend. /// - MachineFunctionInfo *getInfo() const { return MFInfo; } + MachineFunctionInfo *getInfo() const; /// getBlockNumbered - MachineBasicBlocks are automatically numbered when they /// are inserted into the machine function. The block number for a machine |