mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2026-01-02 14:44:41 +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
@@ -34,6 +34,7 @@
|
||||
#define FDR_COMPILE_H
|
||||
|
||||
#include "ue2common.h"
|
||||
#include "hwlm/hwlm_build.h"
|
||||
#include "util/bytecode_ptr.h"
|
||||
|
||||
#include <vector>
|
||||
@@ -46,18 +47,23 @@ struct hwlmLiteral;
|
||||
struct Grey;
|
||||
struct target_t;
|
||||
|
||||
bytecode_ptr<FDR> fdrBuildTable(const std::vector<hwlmLiteral> &lits,
|
||||
bool make_small, const target_t &target,
|
||||
const Grey &grey);
|
||||
bytecode_ptr<FDR> fdrBuildTable(const HWLMProto &proto, const Grey &grey);
|
||||
|
||||
#if !defined(RELEASE_BUILD)
|
||||
|
||||
bytecode_ptr<FDR> fdrBuildTableHinted(const std::vector<hwlmLiteral> &lits,
|
||||
bool make_small, u32 hint,
|
||||
const target_t &target, const Grey &grey);
|
||||
|
||||
std::unique_ptr<HWLMProto> fdrBuildProtoHinted(
|
||||
u8 engType,
|
||||
std::vector<hwlmLiteral> lits,
|
||||
bool make_small, u32 hint,
|
||||
const target_t &target,
|
||||
const Grey &grey);
|
||||
#endif
|
||||
|
||||
std::unique_ptr<HWLMProto> fdrBuildProto(
|
||||
u8 engType,
|
||||
std::vector<hwlmLiteral> lits,
|
||||
bool make_small, const target_t &target,
|
||||
const Grey &grey);
|
||||
|
||||
/** \brief Returns size in bytes of the given FDR engine. */
|
||||
size_t fdrSize(const struct FDR *fdr);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user