mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-11-16 01:12:15 +03:00
dfa: only accel init states from smwr path
If the small-write DFA has been built from literals, then we only need to look for accel states at init.
This commit is contained in:
committed by
Matthew Barr
parent
41d7aa8281
commit
0dd8536c6e
@@ -451,14 +451,14 @@ bool has_accel_sheng(const NFA *) {
|
||||
}
|
||||
|
||||
bytecode_ptr<NFA> shengCompile(raw_dfa &raw, const CompileContext &cc,
|
||||
const ReportManager &rm,
|
||||
const ReportManager &rm, bool only_accel_init,
|
||||
set<dstate_id_t> *accel_states) {
|
||||
if (!cc.grey.allowSheng) {
|
||||
DEBUG_PRINTF("Sheng is not allowed!\n");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
sheng_build_strat strat(raw, rm);
|
||||
sheng_build_strat strat(raw, rm, only_accel_init);
|
||||
dfa_info info(strat);
|
||||
|
||||
DEBUG_PRINTF("Trying to compile a %zu state Sheng\n", raw.states.size());
|
||||
|
||||
Reference in New Issue
Block a user