ng_literal_decorated: pre-check for narrow reach

This commit is contained in:
Justin Viiret
2017-05-31 10:27:24 +10:00
committed by Matthew Barr
parent 5a7d5958d1
commit 5837f68b9a
4 changed files with 18 additions and 3 deletions

View File

@@ -2954,9 +2954,7 @@ RoseInGraph doInitialVioletTransform(const NGHolder &h, bool last_chance,
/* Avoid running the Violet analysis at all on graphs with no vertices with
* small reach, since we will not be able to extract any literals. */
if (all_of_in(vertices_range(h), [&](NFAVertex v) {
return is_special(v, h) || h[v].char_reach.count() >= 200;
})) {
if (!hasNarrowReachVertex(h)) {
DEBUG_PRINTF("fail, no vertices with small reach\n");
return vg;
}