summaryrefslogtreecommitdiff
path: root/utils/TableGen/DAGISelMatcherEmitter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-02-25 01:56:48 +0000
committerChris Lattner <sabre@nondot.org>2010-02-25 01:56:48 +0000
commit60df53e30a7e39c884f4ca4eb03346bea5825109 (patch)
tree8e8d8be88cebe5522a27c7768127b9c338af7837 /utils/TableGen/DAGISelMatcherEmitter.cpp
parent3ce2b097973e4b1a553373471cf2a5d9805903c5 (diff)
downloadllvm-60df53e30a7e39c884f4ca4eb03346bea5825109.tar.gz
llvm-60df53e30a7e39c884f4ca4eb03346bea5825109.tar.bz2
llvm-60df53e30a7e39c884f4ca4eb03346bea5825109.tar.xz
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
Diffstat (limited to 'utils/TableGen/DAGISelMatcherEmitter.cpp')
-rw-r--r--utils/TableGen/DAGISelMatcherEmitter.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/utils/TableGen/DAGISelMatcherEmitter.cpp b/utils/TableGen/DAGISelMatcherEmitter.cpp
index 4c5686fe22..290c8d4f8f 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<PushMatcherNode>(N)) {
+ // Scope is a special case since it is binary.
+ if (const ScopeMatcherNode *SMN = dyn_cast<ScopeMatcherNode>(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<PushMatcherNode>(N)->getNext(),
+ NextSize = EmitMatcherList(cast<ScopeMatcherNode>(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<PushMatcherNode>(N)->getNext(),
+ NextSize = EmitMatcherList(cast<ScopeMatcherNode>(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;