[globalisel][tablegen] Fix the misuse of STATISTICS() on release builds (like r307088) after r307133.

r307133 brought back a couple instances of the same mistake that was already
fixed by r307088. Fixed it again.

Using NumPatternEmitted as a unique id for the tables is not valid on release
builds since the counters don't count in that case.

llvm-svn: 307146
This commit is contained in:
Daniel Sanders 2017-07-05 12:14:18 +00:00
parent 3e8851a1b4
commit 805e9cb3fc
1 changed files with 4 additions and 4 deletions

View File

@ -1274,7 +1274,7 @@ void RuleMatcher::emit(raw_ostream &OS) {
<< " };\n"
<< " State.MIs.clear();\n"
<< " State.MIs.push_back(&I);\n"
<< " DEBUG(dbgs() << \"Processing MatchTable" << NumPatternEmitted
<< " DEBUG(dbgs() << \"Processing MatchTable" << CurrentMatchTableID
<< "\\n\");\n"
<< " if (executeMatchTable(*this, State, MatcherInfo, MatchTable"
<< CurrentMatchTableID << ", MRI, TRI, RBI, AvailableFeatures)) {\n";
@ -1335,15 +1335,15 @@ void RuleMatcher::emit(raw_ostream &OS) {
}
}
OS << " const static int64_t EmitTable" << NumPatternEmitted << "[] = {\n";
OS << " const static int64_t EmitTable" << CurrentMatchTableID << "[] = {\n";
for (const auto &MA : Actions)
MA->emitCxxActionStmts(OS, *this, 0);
OS << " GIR_Done,\n"
<< " };\n"
<< " NewMIVector OutMIs;\n"
<< " DEBUG(dbgs() << \"Processing EmitTable" << NumPatternEmitted
<< " DEBUG(dbgs() << \"Processing EmitTable" << CurrentMatchTableID
<< "\\n\");\n"
<< " executeEmitTable(OutMIs, State, EmitTable" << NumPatternEmitted
<< " executeEmitTable(OutMIs, State, EmitTable" << CurrentMatchTableID
<< ", TII, TRI, RBI);\n";
OS << " return true;\n";