Keep names even when inlining. This allows us to realize that ADDI is:
authorChris Lattner <sabre@nondot.org>
Thu, 8 Sep 2005 17:45:12 +0000 (17:45 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 8 Sep 2005 17:45:12 +0000 (17:45 +0000)
(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")

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23269 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/DAGISelEmitter.cpp

index b5b356d68bd2066ad1b5313ea58b4abb3a1b6565..37000b2b8ee5ed07458860780314b6e19ea8c863 100644 (file)
@@ -142,6 +142,8 @@ TreePatternNode *TreePatternNode::InlinePatternFragments(TreePattern &TP) {
     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 @@ void DAGISelEmitter::ParseAndResolveInstructions() {
     // Inline pattern fragments into it.
     Instructions.back()->InlinePatternFragments();
     
-    DEBUG(std::cerr << Instrs[i]->getName() << ": ");
     DEBUG(Instructions.back()->dump());
   }
 }