llvm.org GIT mirror llvm / 8e7ae98
Add BasicBlock list to MchineFunction that will eventually be the only way to access MachineBasicBlocks. For now, it is never filled. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4324 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 18 years ago
2 changed file(s) with 19 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
1010 #include
1111 class BasicBlock;
1212 class MachineInstr;
13 template struct ilist_traits;
1314
1415 extern AnnotationID MCFBB_AID;
1516
1617 class MachineBasicBlock : public Annotation {
1718 std::vector Insts;
19 MachineBasicBlock *Prev, *Next;
1820 public:
1921 MachineBasicBlock() : Annotation(MCFBB_AID) {}
2022 ~MachineBasicBlock() {}
6971 Insts.pop_back();
7072 return R;
7173 }
74
75 private: // Methods used to maintain doubly linked list of blocks...
76 friend class ilist_traits;
77
78 MachineBasicBlock *getPrev() const { return Prev; }
79 MachineBasicBlock *getNext() const { return Next; }
80 void setPrev(MachineBasicBlock *P) { Prev = P; }
81 void setNext(MachineBasicBlock *N) { Next = N; }
7282 };
7383
7484
1111 #include "llvm/CodeGen/MachineBasicBlock.h"
1212 #include "Support/NonCopyable.h"
1313 #include "Support/HashExtras.h"
14 #include
14 #include "Support/hash_set"
15 #include "Support/ilist"
16
1517 class Value;
1618 class Function;
1719 class Constant;
2325 Pass *createMachineCodeDestructionPass();
2426
2527 class MachineFunction : private Annotation {
28 const Function *method;
29
30 // List of machine basic blocks in function
31 iplist BasicBlocks;
32
33 // FIXME: State should be held elsewhere...
2634 hash_set constantsForConstPool;
2735 hash_map offsets;
28 const Function* method;
29
30 // FIXME: State should be held elsewhere...
3136 unsigned staticStackSize;
3237 unsigned automaticVarsSize;
3338 unsigned regSpillsSize;