From fa342faef9d1c89de356ed83a6c6529ed3e87610 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 1 Mar 2010 07:17:40 +0000 Subject: eliminate the CheckMultiOpcodeMatcher code and have each ComplexPattern at the root be generated multiple times, once for each opcode they are part of. This encourages factoring because the opcode checks get treated just like everything else in the matcher. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97439 91177308-0d34-0410-b5e6-96231b3b80d8 --- utils/TableGen/DAGISelMatcherEmitter.cpp | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'utils/TableGen/DAGISelMatcherEmitter.cpp') diff --git a/utils/TableGen/DAGISelMatcherEmitter.cpp b/utils/TableGen/DAGISelMatcherEmitter.cpp index a828db3..279f036 100644 --- a/utils/TableGen/DAGISelMatcherEmitter.cpp +++ b/utils/TableGen/DAGISelMatcherEmitter.cpp @@ -282,16 +282,7 @@ EmitMatcher(const Matcher *N, unsigned Indent, unsigned CurrentIdx, return CurrentIdx-StartIdx; } - case Matcher::CheckMultiOpcode: { - const CheckMultiOpcodeMatcher *CMO = cast(N); - OS << "OPC_CheckMultiOpcode, " << CMO->getNumOpcodes() << ", "; - for (unsigned i = 0, e = CMO->getNumOpcodes(); i != e; ++i) - OS << CMO->getOpcode(i).getEnumName() << ", "; - OS << '\n'; - return 2 + CMO->getNumOpcodes(); - } - - case Matcher::CheckType: + case Matcher::CheckType: OS << "OPC_CheckType, " << getEnumName(cast(N)->getType()) << ",\n"; return 2; @@ -623,7 +614,6 @@ void MatcherTableEmitter::EmitHistogram(formatted_raw_ostream &OS) { case Matcher::CheckPredicate: OS << "OPC_CheckPredicate"; break; case Matcher::CheckOpcode: OS << "OPC_CheckOpcode"; break; case Matcher::SwitchOpcode: OS << "OPC_SwitchOpcode"; break; - case Matcher::CheckMultiOpcode: OS << "OPC_CheckMultiOpcode"; break; case Matcher::CheckType: OS << "OPC_CheckType"; break; case Matcher::CheckChildType: OS << "OPC_CheckChildType"; break; case Matcher::CheckInteger: OS << "OPC_CheckInteger"; break; -- cgit v1.1