ng_violet: skip analysis on graphs with wide reach

This commit is contained in:
Justin Viiret 2017-05-30 17:09:03 +10:00 committed by Matthew Barr
parent 63973175ed
commit 5a7d5958d1

View File

@ -2952,6 +2952,15 @@ RoseInGraph doInitialVioletTransform(const NGHolder &h, bool last_chance,
return vg; return vg;
} }
/* 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;
})) {
DEBUG_PRINTF("fail, no vertices with small reach\n");
return vg;
}
DEBUG_PRINTF("hello world\n"); DEBUG_PRINTF("hello world\n");
/* Step 1: avoid outfixes as we always have to run them. */ /* Step 1: avoid outfixes as we always have to run them. */