From 60df53e30a7e39c884f4ca4eb03346bea5825109 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 25 Feb 2010 01:56:48 +0000 Subject: rename PushMatcherNode -> ScopeMatcherNode to more accurately reflect what it does. Switch the sense of the Next and the Check arms to be more logical. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97093 91177308-0d34-0410-b5e6-96231b3b80d8 --- utils/TableGen/DAGISelMatcherEmitter.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'utils/TableGen/DAGISelMatcherEmitter.cpp') diff --git a/utils/TableGen/DAGISelMatcherEmitter.cpp b/utils/TableGen/DAGISelMatcherEmitter.cpp index 4c5686f..290c8d4 100644 --- a/utils/TableGen/DAGISelMatcherEmitter.cpp +++ b/utils/TableGen/DAGISelMatcherEmitter.cpp @@ -155,7 +155,7 @@ EmitMatcher(const MatcherNode *N, unsigned Indent, formatted_raw_ostream &OS) { OS.PadToColumn(Indent*2); switch (N->getKind()) { - case MatcherNode::Push: assert(0 && "Should be handled by caller"); + case MatcherNode::Scope: assert(0 && "Should be handled by caller"); case MatcherNode::RecordNode: OS << "OPC_RecordNode,"; OS.PadToColumn(CommentIndent) << "// " @@ -388,8 +388,8 @@ EmitMatcherList(const MatcherNode *N, unsigned Indent, unsigned CurrentIdx, Histogram.resize(N->getKind()+1); Histogram[N->getKind()]++; - // Push is a special case since it is binary. - if (const PushMatcherNode *PMN = dyn_cast(N)) { + // Scope is a special case since it is binary. + if (const ScopeMatcherNode *SMN = dyn_cast(N)) { // We need to encode the child and the offset of the failure code before // emitting either of them. Handle this by buffering the output into a // string while we get the size. @@ -398,7 +398,7 @@ EmitMatcherList(const MatcherNode *N, unsigned Indent, unsigned CurrentIdx, { raw_svector_ostream OS(TmpBuf); formatted_raw_ostream FOS(OS); - NextSize = EmitMatcherList(cast(N)->getNext(), + NextSize = EmitMatcherList(cast(N)->getCheck(), Indent+1, CurrentIdx+2, FOS); } @@ -408,7 +408,7 @@ EmitMatcherList(const MatcherNode *N, unsigned Indent, unsigned CurrentIdx, TmpBuf.clear(); raw_svector_ostream OS(TmpBuf); formatted_raw_ostream FOS(OS); - NextSize = EmitMatcherList(cast(N)->getNext(), + NextSize = EmitMatcherList(cast(N)->getCheck(), Indent+1, CurrentIdx+3, FOS); if (NextSize > 65535) { errs() << @@ -421,14 +421,14 @@ EmitMatcherList(const MatcherNode *N, unsigned Indent, unsigned CurrentIdx, OS.PadToColumn(Indent*2); if (NextSize < 256) - OS << "OPC_Push, " << NextSize << ",\n"; + OS << "OPC_Scope, " << NextSize << ",\n"; else - OS << "OPC_Push2, " << (NextSize&255) << ", " << (NextSize>>8) << ",\n"; + OS << "OPC_Scope2, " << (NextSize&255) << ", " << (NextSize>>8) <<",\n"; OS << TmpBuf.str(); Size += 2+NextSize; CurrentIdx += 2+NextSize; - N = PMN->getFailure(); + N = SMN->getNext(); continue; } @@ -514,7 +514,7 @@ void MatcherTableEmitter::EmitHistogram(formatted_raw_ostream &OS) { for (unsigned i = 0, e = Histogram.size(); i != e; ++i) { OS << " // #"; switch ((MatcherNode::KindTy)i) { - case MatcherNode::Push: OS << "OPC_Push"; break; + case MatcherNode::Scope: OS << "OPC_Scope"; break; case MatcherNode::RecordNode: OS << "OPC_RecordNode"; break; case MatcherNode::RecordChild: OS << "OPC_RecordChild"; break; case MatcherNode::RecordMemRef: OS << "OPC_RecordMemRef"; break; -- cgit v1.1