enhance the EmitNode/MorphNodeTo operands to take a bit that

specifies whether there is an output flag or not.  Use this
instead of redundantly encoding the chain/flag results in the
output vtlist.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97419 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2010-02-28 21:53:42 +00:00
parent 21221e357c
commit ff7fb60f2a
6 changed files with 43 additions and 33 deletions
+1 -5
View File
@@ -713,10 +713,6 @@ EmitResultInstructionAsOperand(const TreePatternNode *N,
if (Pattern.getDstRegs()[i]->isSubClassOf("Register"))
ResultVTs.push_back(getRegisterValueType(Pattern.getDstRegs()[i], CGT));
}
if (NodeHasChain)
ResultVTs.push_back(MVT::Other);
if (TreeHasOutFlag)
ResultVTs.push_back(MVT::Flag);
// FIXME2: Instead of using the isVariadic flag on the instruction, we should
// have an SDNP that indicates variadicism. The TargetInstrInfo isVariadic
@@ -744,7 +740,7 @@ EmitResultInstructionAsOperand(const TreePatternNode *N,
AddMatcher(new EmitNodeMatcher(II.Namespace+"::"+II.TheDef->getName(),
ResultVTs.data(), ResultVTs.size(),
InstOps.data(), InstOps.size(),
NodeHasChain, TreeHasInFlag,
NodeHasChain, TreeHasInFlag, TreeHasOutFlag,
NodeHasMemRefs, NumFixedArityOperands,
NextRecordedOperandNo));