Collected statistics for the number of patterns emitted can be
incorrect because rules can be grouped if OptimizeMatchTable
is enabled. Increase the counter in RuleMatcher::emit(...)
to avoid that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@323391
91177308-0d34-0410-b5e6-
96231b3b80d8
Table << MatchTable::Opcode("GIR_Done", -1) << MatchTable::LineBreak
<< MatchTable::Label(LabelID);
+ ++NumPatternEmitted;
}
bool RuleMatcher::isHigherPriorityThan(const RuleMatcher &B) const {
: InputRules;
MatchTable Table(0);
- for (Matcher *Rule : OptRules) {
+ for (Matcher *Rule : OptRules)
Rule->emit(Table);
- ++NumPatternEmitted;
- }
+
Table << MatchTable::Opcode("GIM_Reject") << MatchTable::LineBreak;
Table.emitDeclaration(OS);
OS << " if (executeMatchTable(*this, OutMIs, State, ISelInfo, ";