Added SelectionDAG::InsertISelMapEntry(). This is used to workaround the gcc
authorEvan Cheng <evan.cheng@apple.com>
Thu, 9 Feb 2006 22:11:03 +0000 (22:11 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Thu, 9 Feb 2006 22:11:03 +0000 (22:11 +0000)
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

include/llvm/CodeGen/SelectionDAG.h
lib/CodeGen/SelectionDAG/SelectionDAG.cpp

index 58f0d64792d8ad0f4004d8f401f865f3757d452f..df695010bf1a7cd3488b2b492d5bda458dcc94a5 100644 (file)
@@ -395,14 +395,20 @@ public:
                           std::vector<SDNode*> *Deleted = 0);
   void ReplaceAllUsesWith(SDNode *From, const std::vector<SDOperand> &To,
                           std::vector<SDNode*> *Deleted = 0);
-  
-  
+
   /// DeleteNode - Remove the specified node from the system.  This node must
   /// have no referrers.
   void DeleteNode(SDNode *N);
   
   void dump() const;
 
+  /// 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.
+  static void InsertISelMapEntry(std::map<SDOperand, SDOperand> &Map,
+                                 SDNode *Key, unsigned KeyResNo,
+                                 SDNode *Element, unsigned ElementResNo);
+  
 private:
   void RemoveNodeFromCSEMaps(SDNode *N);
   SDNode *AddNonLeafNodeToCSEMaps(SDNode *N);
index 9c9df11bed2b4061db26acc8b9c6a2b03f6f6a52..23d1dc34cc1003549022d9f65905c5e4454b9603 100644 (file)
@@ -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)));
+}