mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
rose: don't merge large acyclic suffixes
Check earlier on in mergeSuffixes that we're not proposing to merge suffixes above our limit from the acyclic merge path.
This commit is contained in:
parent
b859e5cb8a
commit
8be6c8b2ca
@ -2189,6 +2189,11 @@ void mergeSuffixes(RoseBuildImpl &tbi, SuffixBouquet &suffixes,
|
|||||||
suffix_id s1 = *it;
|
suffix_id s1 = *it;
|
||||||
const deque<RoseVertex> &verts1 = suffixes.vertices(s1);
|
const deque<RoseVertex> &verts1 = suffixes.vertices(s1);
|
||||||
assert(s1.graph() && s1.graph()->kind == NFA_SUFFIX);
|
assert(s1.graph() && s1.graph()->kind == NFA_SUFFIX);
|
||||||
|
|
||||||
|
// Caller should ensure that we don't propose merges of graphs that are
|
||||||
|
// already too big.
|
||||||
|
assert(num_vertices(*s1.graph()) < small_merge_max_vertices(tbi.cc));
|
||||||
|
|
||||||
deque<suffix_id> merged;
|
deque<suffix_id> merged;
|
||||||
for (auto jt = next(it); jt != suffixes.end(); ++jt) {
|
for (auto jt = next(it); jt != suffixes.end(); ++jt) {
|
||||||
suffix_id s2 = *jt;
|
suffix_id s2 = *jt;
|
||||||
@ -2306,6 +2311,10 @@ void mergeAcyclicSuffixes(RoseBuildImpl &tbi) {
|
|||||||
|
|
||||||
assert(!g[v].suffix.haig);
|
assert(!g[v].suffix.haig);
|
||||||
|
|
||||||
|
if (num_vertices(*h) >= small_merge_max_vertices(tbi.cc)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (!isAcyclic(*h)) {
|
if (!isAcyclic(*h)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user