Keep names even when inlining. This allows us to realize that ADDI is:
(set GPRC:i32:$rD, (add GPRC:i32:$rA, (imm)<<Predicate_immSExt16>>:$imm))
not:
(set GPRC:i32:$rD, (add GPRC:i32:$rA, (imm)<<Predicate_immSExt16>>))
(we keep the ":$imm")
llvm-svn: 23269
diff --git a/llvm/utils/TableGen/DAGISelEmitter.cpp b/llvm/utils/TableGen/DAGISelEmitter.cpp
index b5b356d..37000b2 100644
--- a/llvm/utils/TableGen/DAGISelEmitter.cpp
+++ b/llvm/utils/TableGen/DAGISelEmitter.cpp
@@ -142,6 +142,8 @@
FragTree->SubstituteFormalArguments(ArgMap);
}
+ FragTree->setName(getName());
+
// Get a new copy of this fragment to stitch into here.
//delete this; // FIXME: implement refcounting!
return FragTree;
@@ -420,7 +422,6 @@
// Inline pattern fragments into it.
Instructions.back()->InlinePatternFragments();
- DEBUG(std::cerr << Instrs[i]->getName() << ": ");
DEBUG(Instructions.back()->dump());
}
}