[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp SelectionDAG.cpp
Chris Lattner
lattner at cs.uiuc.edu
Fri Aug 11 10:46:42 PDT 2006
Changes in directory llvm/lib/CodeGen/SelectionDAG:
DAGCombiner.cpp updated: 1.180 -> 1.181
SelectionDAG.cpp updated: 1.321 -> 1.322
---
Log message:
Change one ReplaceAllUsesWith method to take an array of operands to replace
instead of a vector of operands.
---
Diffs of the changes: (+5 -6)
DAGCombiner.cpp | 5 +++--
SelectionDAG.cpp | 6 ++----
2 files changed, 5 insertions(+), 6 deletions(-)
Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.180 llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.181
--- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.180 Mon Aug 7 21:23:41 2006
+++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Fri Aug 11 12:46:28 2006
@@ -81,7 +81,7 @@
std::cerr << "\nWith: "; To[0].Val->dump(&DAG);
std::cerr << " and " << To.size()-1 << " other values\n");
std::vector<SDNode*> NowDead;
- DAG.ReplaceAllUsesWith(N, To, &NowDead);
+ DAG.ReplaceAllUsesWith(N, &To[0], &NowDead);
// Push the new nodes and any users onto the worklist
for (unsigned i = 0, e = To.size(); i != e; ++i) {
@@ -416,7 +416,8 @@
std::cerr << "\nWith: "; RV.Val->dump(&DAG);
std::cerr << '\n');
std::vector<SDNode*> NowDead;
- DAG.ReplaceAllUsesWith(N, std::vector<SDOperand>(1, RV), &NowDead);
+ SDOperand OpV = RV;
+ DAG.ReplaceAllUsesWith(N, &OpV, &NowDead);
// Push the new node and any users onto the worklist
WorkList.push_back(RV.Val);
Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.321 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.322
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.321 Mon Aug 7 21:23:41 2006
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Fri Aug 11 12:46:28 2006
@@ -2441,11 +2441,9 @@
/// This version can replace From with any result values. To must match the
/// number and types of values returned by From.
void SelectionDAG::ReplaceAllUsesWith(SDNode *From,
- const std::vector<SDOperand> &To,
+ const SDOperand *To,
std::vector<SDNode*> *Deleted) {
- assert(From->getNumValues() == To.size() &&
- "Incorrect number of values to replace with!");
- if (To.size() == 1 && To[0].Val->getNumValues() == 1) {
+ if (From->getNumValues() == 1 && To[0].Val->getNumValues() == 1) {
// Degenerate case handled above.
ReplaceAllUsesWith(SDOperand(From, 0), To[0], Deleted);
return;
More information about the llvm-commits
mailing list