diff options
author | Gabor Greif <ggreif@gmail.com> | 2009-03-04 20:36:44 +0000 |
---|---|---|
committer | Gabor Greif <ggreif@gmail.com> | 2009-03-04 20:36:44 +0000 |
commit | c23b8719ef9d6b1220e854b37d40e9e1c48a82bc (patch) | |
tree | afd0f1a6f924ba5609ce8f6212078b7407895840 /include/llvm/CodeGen/MachineFunction.h | |
parent | 076aee32e86bc4a0c096262b3261923f25220dc6 (diff) |
Give sentinel traits the right to determine the policy where the sentinel is kept.
This should result in less indirect memory accesses, less dead writes and tighter code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66061 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineFunction.h')
-rw-r--r-- | include/llvm/CodeGen/MachineFunction.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/include/llvm/CodeGen/MachineFunction.h b/include/llvm/CodeGen/MachineFunction.h index 1371f1d0cd..7386b2b128 100644 --- a/include/llvm/CodeGen/MachineFunction.h +++ b/include/llvm/CodeGen/MachineFunction.h @@ -44,6 +44,11 @@ public: } void destroySentinel(MachineBasicBlock *) const {} + MachineBasicBlock *provideInitialHead() const { return createSentinel(); } + MachineBasicBlock *ensureHead(MachineBasicBlock*) const { + return createSentinel(); + } + void addNodeToList(MachineBasicBlock* MBB); void removeNodeFromList(MachineBasicBlock* MBB); void deleteNode(MachineBasicBlock *MBB); @@ -363,8 +368,12 @@ template <> struct GraphTraits<const MachineFunction*> : // nodes_iterator/begin/end - Allow iteration over all nodes in the graph typedef MachineFunction::const_iterator nodes_iterator; - static nodes_iterator nodes_begin(const MachineFunction *F) { return F->begin(); } - static nodes_iterator nodes_end (const MachineFunction *F) { return F->end(); } + static nodes_iterator nodes_begin(const MachineFunction *F) { + return F->begin(); + } + static nodes_iterator nodes_end (const MachineFunction *F) { + return F->end(); + } }; |