diff options
author | Evan Cheng <evan.cheng@apple.com> | 2006-06-29 23:57:05 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2006-06-29 23:57:05 +0000 |
commit | 322812e603705e1c2037313633e72f689524b163 (patch) | |
tree | 7d13d6695fbade190d0cc907b4b48dd5dbce83b5 /lib/CodeGen/SelectionDAG/SelectionDAG.cpp | |
parent | 7dabf399b95aad4056985eac346451e134de9ebe (diff) |
Ugly hack! Add helper functions InsertInFlightSetEntry and
RemoveInFlightSetEntry. They are used in place of direct set operators to
reduce instruction selection function stack size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28987 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index f0c61e77a9..13f0c491aa 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -3099,3 +3099,17 @@ void SelectionDAG::InsertISelMapEntry(std::map<SDOperand, SDOperand> &Map, Map.insert(std::make_pair(SDOperand(Key, KeyResNo), SDOperand(Element, ElementResNo))); } + +/// InsertInFlightSetEntry - A helper function to insert a SDNode* to a +/// SDNode* set. This is added to avoid the set insertion operator from being +/// inlined. +void SelectionDAG::InsertInFlightSetEntry(std::set<SDNode*> &Set, SDNode *N) { + Set.insert(N); +} + +/// RemoveInFlightSetEntry - A helper function to remove a SDNode* from a +/// SDNode* set. This is added to avoid the set removal operator from being +/// inlined. +void SelectionDAG::RemoveInFlightSetEntry(std::set<SDNode*> &Set, SDNode *N) { + Set.erase(N); +} |