1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-02-01 05:01:59 +01:00

Make the code generated by tblgen return the result of SelectNodeTo, to

permit future changes.

llvm-svn: 24553
This commit is contained in:
Chris Lattner 2005-11-30 23:08:45 +00:00
parent 258dc29d7f
commit 7678189bc6

View File

@ -1733,13 +1733,12 @@ CodeGenPatternResult(TreePatternNode *N, unsigned &Ctr,
// If this instruction is the root, and if there is only one use of it,
// use SelectNodeTo instead of getTargetNode to avoid an allocation.
OS << " if (N.Val->hasOneUse()) {\n";
OS << " CurDAG->SelectNodeTo(N.Val, "
OS << " return CurDAG->SelectNodeTo(N.Val, "
<< II.Namespace << "::" << II.TheDef->getName() << ", MVT::"
<< getEnumName(N->getType());
for (unsigned i = 0, e = Ops.size(); i != e; ++i)
OS << ", Tmp" << Ops[i];
OS << ");\n";
OS << " return N;\n";
OS << " } else {\n";
OS << " return CodeGenMap[N] = CurDAG->getTargetNode("
<< II.Namespace << "::" << II.TheDef->getName() << ", MVT::"