summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2006-02-09 22:11:03 +0000
committerEvan Cheng <evan.cheng@apple.com>2006-02-09 22:11:03 +0000
commita1ef3ec5b57ae39f287421619e51f1cade29c80f (patch)
tree2e98ecce8ccaf9e730fdaf46e3eaa19e1f8c7823 /llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
parent89762198503e443bca713538d1729443ca59d1ed (diff)
downloadbcm5719-llvm-a1ef3ec5b57ae39f287421619e51f1cade29c80f.tar.gz
bcm5719-llvm-a1ef3ec5b57ae39f287421619e51f1cade29c80f.zip
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). llvm-svn: 26094
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 9c9df11bed2..23d1dc34cc1 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -2748,3 +2748,12 @@ void SelectionDAG::dump() const {
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)));
+}
OpenPOWER on IntegriCloud