Ugly hack! Add helper functions InsertInFlightSetEntry and
RemoveInFlightSetEntry. They are used in place of direct set operators to
reduce instruction selection function stack size.

llvm-svn: 28987
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index f0c61e7..13f0c49 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -3099,3 +3099,17 @@
   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);
+}