}
}
-
static
void removeRedundantLiterals(RoseInGraph &g, const CompileContext &cc) {
removeRedundantLiteralsFromPrefixes(g, cc);
bool changed = false;
bool need_to_recalc = false;
u32 added_count = 0;
+ unordered_set<NGHolder *> good; /* known to be implementable */
do {
changed = false;
DEBUG_PRINTF("added %u\n", added_count);
}
}
for (NGHolder *h : graphs) {
+ if (contains(good, h)) {
+ continue;
+ }
+ reduceGraphEquivalences(*h, cc);
if (isImplementableNFA(*h, &rm, cc)) {
+ good.insert(h);
continue;
}
if (tryForEarlyDfa(*h, cc)
&& doEarlyDfa(rose, vg, *h, edges_by_graph[h], final_chance, rm,
cc)) {
+ good.insert(h);
continue;
}
return false;
}
changed = true;
+ good.insert(h);
continue;
}