From e86097af5598e44727875f00e492d43c978239be Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 28 Feb 2010 02:31:26 +0000 Subject: add infrastructure to support forming selectnodeto. Not used yet because I have to go on another detour first. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97362 91177308-0d34-0410-b5e6-96231b3b80d8 --- utils/TableGen/DAGISelMatcherEmitter.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'utils/TableGen/DAGISelMatcherEmitter.cpp') diff --git a/utils/TableGen/DAGISelMatcherEmitter.cpp b/utils/TableGen/DAGISelMatcherEmitter.cpp index 450a457..84e33f3 100644 --- a/utils/TableGen/DAGISelMatcherEmitter.cpp +++ b/utils/TableGen/DAGISelMatcherEmitter.cpp @@ -389,9 +389,11 @@ EmitMatcher(const Matcher *N, unsigned Indent, unsigned CurrentIdx, return 3; } - case Matcher::EmitNode: { - const EmitNodeMatcher *EN = cast(N); - OS << "OPC_EmitNode, TARGET_OPCODE(" << EN->getOpcodeName() << "), 0"; + case Matcher::EmitNode: + case Matcher::SelectNodeTo: { + const EmitNodeMatcherCommon *EN = cast(N); + OS << (EN->isSelectNodeTo() ? "OPC_EmitNode" : "OPC_SelectNodeTo"); + OS << ", TARGET_OPCODE(" << EN->getOpcodeName() << "), 0"; if (EN->hasChain()) OS << "|OPFL_Chain"; if (EN->hasFlag()) OS << "|OPFL_Flag"; @@ -564,6 +566,7 @@ void MatcherTableEmitter::EmitHistogram(formatted_raw_ostream &OS) { case Matcher::EmitMergeInputChains: OS << "OPC_EmitMergeInputChains"; break; case Matcher::EmitCopyToReg: OS << "OPC_EmitCopyToReg"; break; case Matcher::EmitNode: OS << "OPC_EmitNode"; break; + case Matcher::SelectNodeTo: OS << "OPC_SelectNodeTo"; break; case Matcher::EmitNodeXForm: OS << "OPC_EmitNodeXForm"; break; case Matcher::MarkFlagResults: OS << "OPC_MarkFlagResults"; break; case Matcher::CompleteMatch: OS << "OPC_CompleteMatch"; break; -- cgit v1.1