mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-10-02 04:27:42 +03:00
ng_extparam: split up work and do per-comp reduce
This change breaks extparam processing up into: - propagateExtendedParams: propagates min_length, min_offset and max_offset into the reports on the graph - reduceExtendedParams: runs graph reductions based on extparams Then, we apply the reduce pass to the whole graph, and later as well to each component after calc_components.
This commit is contained in:
committed by
Matthew Barr
parent
0a163b5535
commit
a871f70c25
@@ -41,6 +41,7 @@
|
||||
#include "nfagraph/ng_depth.h"
|
||||
#include "nfagraph/ng_holder.h"
|
||||
#include "nfagraph/ng_mcclellan.h"
|
||||
#include "nfagraph/ng_reports.h"
|
||||
#include "nfagraph/ng_prune.h"
|
||||
#include "nfagraph/ng_util.h"
|
||||
#include "smallwrite/smallwrite_internal.h"
|
||||
@@ -179,8 +180,23 @@ void SmallWriteBuildImpl::add(const NGHolder &g, const ExpressionInfo &expr) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (expr.som || expr.min_length || isVacuous(g)) {
|
||||
poisoned = true; /* cannot support in smwr */
|
||||
if (expr.som) {
|
||||
DEBUG_PRINTF("no SOM support in small-write engine\n");
|
||||
poisoned = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (isVacuous(g)) {
|
||||
DEBUG_PRINTF("no vacuous graph support in small-write engine\n");
|
||||
poisoned = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (any_of_in(::ue2::all_reports(g), [&](ReportID id) {
|
||||
return rm.getReport(id).minLength > 0;
|
||||
})) {
|
||||
DEBUG_PRINTF("no min_length extparam support in small-write engine\n");
|
||||
poisoned = true;
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user