Added SelectionDAG::InsertISelMapEntry(). This is used to workaround the gcc
problem where it inline the map insertion call too aggressively. Before this
change it was producing a frame size of 24k for Select_store(), now it's down
to 10k (by calling this method rather than calling the map insertion operator).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26094 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 9c9df11..23d1dc3 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -2748,3 +2748,12 @@
std::cerr << "\n\n";
}
+/// InsertISelMapEntry - A helper function to insert a key / element pair
+/// into a SDOperand to SDOperand map. This is added to avoid the map
+/// insertion operator from being inlined.
+void SelectionDAG::InsertISelMapEntry(std::map<SDOperand, SDOperand> &Map,
+ SDNode *Key, unsigned KeyResNo,
+ SDNode *Element, unsigned ElementResNo) {
+ Map.insert(std::make_pair(SDOperand(Key, KeyResNo),
+ SDOperand(Element, ElementResNo)));
+}