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
This commit is contained in:
Chris Lattner 2005-09-08 17:45:12 +00:00
parent 76cb006e2c
commit 399f59f643
1 changed files with 2 additions and 1 deletions

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