diff options
author | Gabor Greif <ggreif@gmail.com> | 2009-03-04 06:57:48 +0000 |
---|---|---|
committer | Gabor Greif <ggreif@gmail.com> | 2009-03-04 06:57:48 +0000 |
commit | c7f6b8c5d40e17bf43fd3a1549d7d89c9da735e1 (patch) | |
tree | aaea2b823dc215090f5792c8cd12d6479b8f7716 /include/llvm/CodeGen/SelectionDAG.h | |
parent | ae3f2b6c77721034b5abfae7b6d1bf1bc60478d6 (diff) | |
download | external_llvm-c7f6b8c5d40e17bf43fd3a1549d7d89c9da735e1.tar.gz external_llvm-c7f6b8c5d40e17bf43fd3a1549d7d89c9da735e1.tar.bz2 external_llvm-c7f6b8c5d40e17bf43fd3a1549d7d89c9da735e1.zip |
"Ghostify" embedded sentinels. This is a real win in all cases
because less bytes are allocated and subobject construction is gone.
For reference how it works, see BasicBlock.h.
Btw. it is very assuring to see that somebody has invented
this ilist-embedded sentinel technique before me :-)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66026 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/SelectionDAG.h')
-rw-r--r-- | include/llvm/CodeGen/SelectionDAG.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/include/llvm/CodeGen/SelectionDAG.h b/include/llvm/CodeGen/SelectionDAG.h index 9ecba590dd..fe89fe0546 100644 --- a/include/llvm/CodeGen/SelectionDAG.h +++ b/include/llvm/CodeGen/SelectionDAG.h @@ -39,13 +39,10 @@ class FunctionLoweringInfo; template<> struct ilist_traits<SDNode> : public ilist_default_traits<SDNode> { private: - mutable SDNode Sentinel; + mutable ilist_node<SDNode> Sentinel; public: - ilist_traits() : Sentinel(ISD::DELETED_NODE, DebugLoc::getUnknownLoc(), - SDVTList()) {} - SDNode *createSentinel() const { - return &Sentinel; + return static_cast<SDNode*>(&Sentinel); } static void destroySentinel(SDNode *) {} |