mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-10-10 08:12:21 +03:00
FDR: Squash buckets of included literals in FDR confirm
- Change the compile of literal matchers to two passes. - Reverse the bucket assignment in FDR, bucket with longer literals has smaller bucket id. - Squash the buckets of included literals and jump to the the program of included literals directly from parent literal program without going through FDR confirm for included iterals.
This commit is contained in:
committed by
Matthew Barr
parent
d2b5523dd8
commit
86c5f7feb1
@@ -45,6 +45,8 @@ namespace ue2 {
|
||||
/** \brief Max length of the hwlmLiteral::msk and hwlmLiteral::cmp vectors. */
|
||||
#define HWLM_MASKLEN 8
|
||||
|
||||
#define INVALID_LIT_ID ~0U
|
||||
|
||||
/** \brief Class representing a literal, fed to \ref hwlmBuild. */
|
||||
struct hwlmLiteral {
|
||||
std::string s; //!< \brief The literal itself.
|
||||
@@ -64,6 +66,21 @@ struct hwlmLiteral {
|
||||
* can be quashed by the literal matcher. */
|
||||
bool noruns;
|
||||
|
||||
/** \brief included literal id. */
|
||||
u32 included_id = INVALID_LIT_ID;
|
||||
|
||||
/** \brief Squash mask for FDR's confirm mask for included literals.
|
||||
*
|
||||
* In FDR confirm, if we have included literal in another bucket,
|
||||
* we can use this mask to squash the bit for the bucket in FDR confirm
|
||||
* mask and then run programs of included literal directly and avoid
|
||||
* confirm work.
|
||||
*
|
||||
* This value is calculated in FDR compile code once bucket assignment is
|
||||
* completed
|
||||
*/
|
||||
u8 squash = 0;
|
||||
|
||||
/** \brief Set of groups that literal belongs to.
|
||||
*
|
||||
* Use \ref HWLM_ALL_GROUPS for a literal that could match regardless of
|
||||
|
Reference in New Issue
Block a user