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
This commit is contained in:
Evan Cheng 2006-02-09 22:11:03 +00:00
parent 8976219850
commit a1ef3ec5b5
2 changed files with 17 additions and 2 deletions

View 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);

View 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)));
}