mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
mcclellan: improve wide-state checking in Sherman optimization
fixes github issue #305
This commit is contained in:
parent
cafd5248b1
commit
a119693a66
@ -1081,7 +1081,9 @@ void find_better_daddy(dfa_info &info, dstate_id_t curr_id, bool using8bit,
|
|||||||
// Use the daddy already set for this state so long as it isn't already
|
// Use the daddy already set for this state so long as it isn't already
|
||||||
// a Sherman state.
|
// a Sherman state.
|
||||||
dstate_id_t daddy = currState.daddy;
|
dstate_id_t daddy = currState.daddy;
|
||||||
if (!info.is_sherman(daddy) && !info.is_widestate(daddy)) {
|
if (info.is_widestate(daddy)) {
|
||||||
|
return;
|
||||||
|
} else if (!info.is_sherman(daddy)) {
|
||||||
hinted.insert(currState.daddy);
|
hinted.insert(currState.daddy);
|
||||||
} else {
|
} else {
|
||||||
// Fall back to granddaddy, which has already been processed (due
|
// Fall back to granddaddy, which has already been processed (due
|
||||||
|
Loading…
x
Reference in New Issue
Block a user