Changes in directory llvm/lib/CodeGen/SelectionDAG:
LegalizeDAG.cpp updated: 1.469 -> 1.470 --- Log message: Switch promoted/expanded ops over to using a DenseMap. Vector related maps aren't worth it. --- Diffs of the changes: (+7 -8) LegalizeDAG.cpp | 15 +++++++-------- 1 files changed, 7 insertions(+), 8 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.469 llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.470 --- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.469 Sat Feb 3 18:50:02 2007 +++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Sat Feb 3 19:17:38 2007 @@ -99,12 +99,12 @@ /// PromotedNodes - For nodes that are below legal width, and that have more /// than one use, this map indicates what promoted value to use. This allows /// us to avoid promoting the same thing more than once. - std::map<SDOperand, SDOperand> PromotedNodes; + DenseMap<SDOperand, SDOperand> PromotedNodes; /// ExpandedNodes - For nodes that need to be expanded this map indicates /// which which operands are the expanded version of the input. This allows /// us to avoid expanding the same node more than once. - std::map<SDOperand, std::pair<SDOperand, SDOperand> > ExpandedNodes; + DenseMap<SDOperand, std::pair<SDOperand, SDOperand> > ExpandedNodes; /// SplitNodes - For vector nodes that need to be split, this map indicates /// which which operands are the split version of the input. This allows us @@ -123,7 +123,7 @@ LegalizedNodes.insert(std::make_pair(To, To)); } void AddPromotedOperand(SDOperand From, SDOperand To) { - bool isNew = PromotedNodes.insert(std::make_pair(From, To)).second; + bool isNew = PromotedNodes.insert(std::make_pair(From, To)); assert(isNew && "Got into the map somehow?"); // If someone requests legalization of the new node, return itself. LegalizedNodes.insert(std::make_pair(To, To)); @@ -3103,7 +3103,7 @@ SDOperand Result; SDNode *Node = Op.Val; - std::map<SDOperand, SDOperand>::iterator I = PromotedNodes.find(Op); + DenseMap<SDOperand, SDOperand>::iterator I = PromotedNodes.find(Op); if (I != PromotedNodes.end()) return I->second; switch (Node->getOpcode()) { @@ -4584,7 +4584,7 @@ "Cannot expand to FP value or to larger int value!"); // See if we already expanded it. - std::map<SDOperand, std::pair<SDOperand, SDOperand> >::iterator I + DenseMap<SDOperand, std::pair<SDOperand, SDOperand> >::iterator I = ExpandedNodes.find(Op); if (I != ExpandedNodes.end()) { Lo = I->second.first; @@ -5268,8 +5268,7 @@ } // Remember in a map if the values will be reused later. - bool isNew = - ExpandedNodes.insert(std::make_pair(Op, std::make_pair(Lo, Hi))).second; + bool isNew = ExpandedNodes.insert(std::make_pair(Op, std::make_pair(Lo, Hi))); assert(isNew && "Value already expanded?!?"); } @@ -5396,7 +5395,7 @@ } // Remember in a map if the values will be reused later. - bool isNew = + bool isNew = SplitNodes.insert(std::make_pair(Op, std::make_pair(Lo, Hi))).second; assert(isNew && "Value already expanded?!?"); } _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits