437 Commits

Author SHA1 Message Date
Konstantinos Margaritis
9fac2bf78d remove unused constant 2024-01-17 17:13:51 +02:00
Konstantinos Margaritis
0d2f9ccbaa Fix 'unqualified call to std::move' errors in clang 15+ 2023-10-03 20:24:39 +03:00
Hong, Yang A
978105a4c0 klocwork: fix risk issues 2023-09-05 13:45:33 +03:00
Azat Khuzhin
07305d18ae Fix use-of-uninitialized-value due to getData128()
When temporary buffer is used in getData128(), then it may return
uninitialized data.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-05-12 23:13:34 +02:00
Robert Schulze
8f26c5e65f
Fix compilation with libcxx 16
After upgrading our (ClickHouse's) libcxx from 15 to 16, the compiler
started to complain about usage of an incomplete type "RoseInstruction"
in this (header) function:

  void RoseProgram::replace(Iter it, std::unique_ptr<RoseInstruction> ri) {
    ...

The reason is that libcxx 16 is the first version which implements C++23
constexpr std::unique_ptr (P2273R3, see (*)). RoseProgram::replace()
happens to be be const-evaluatable and the compiler tries to run
std::unique_ptr's ctor + dtor. This fails because at this point
RoseInstruction isn't defined yet.

There are two ways of fixing this:
1. Include rose_build_instruction.h (which contains RoseInstruction)
   into rose_build_program.h. Disadvantage: The new include will
   propagate transitively into all callers.
2. Move the function implementation into the source file which sees
   RoseInstruction's definition already. Disadvantage: Template
   instantiation is no longer automatic, instead there must be either a)
   explicit template instantiation (e.g. in rose_build_program.cpp) or
   b) all callers which instantiate the function must live in the same
   source file and do the instantiations by themselves. Fortunately, the
   latter is the case here, but potential future code outside
   rose_build_program.cpp will require ugly explicit instantiation.

(*) https://en.cppreference.com/w/cpp/23
2023-03-28 21:58:44 +00:00
Konstantinos Margaritis
6de45b4648 clang 14 complains about this, needs investigation 2022-09-16 14:02:26 +03:00
Hong, Yang A
decabdfede update year for bugfix #302-#305 2022-08-29 15:03:11 +03:00
Hong, Yang A
cafd5248b1 literal API: add instruction support
fixes github issue #303
2022-08-29 15:02:59 +03:00
BigRedEye
6d6c291769
fix: Mark operator bool explicit 2022-02-08 00:22:23 +03:00
Konstantinos Margaritis
08357a096c remove Windows/ICC support 2021-10-12 11:51:34 +03:00
George Wort
a879715953 Move SVE functions into their own files.
Change-Id: I995ba4b7d2b558ee403693ee45d747d414d3b177
2021-10-12 11:51:34 +03:00
George Wort
25183089fd Use SVE shufti for counting miracles.
Change-Id: Idd4aaf5bbc05fc90e9138c6fed385bc6ffa7b0b8
2021-10-12 11:51:34 +03:00
George Wort
56ef2d5f72 Use SVE2 for counting miracles.
Change-Id: I048dc182e5f4e726b847b3285ffafef4f538e550
2021-10-12 11:51:34 +03:00
George Wort
df926ef62f Implement new Vermicelli16 acceleration functions using SVE2.
The scheme utilises the MATCH and NMATCH instructions to
scan for 16 characters at the same rate as vermicelli
scans for one.

Change-Id: Ie2cef904c56651e6108593c668e9b65bc001a886
2021-10-12 11:51:34 +03:00
Konstantinos Margaritis
e35b88f2c8 use STL make_unique, remove wrapper header, breaks C++17 compilation 2021-10-12 11:51:34 +03:00
Konstantinos Margaritis
556206f138 replace push_back by emplace_back where possible 2021-10-12 11:51:33 +03:00
Konstantinos Margaritis
27bd09454f use correct function names for AVX512, fix build failure 2021-02-15 13:54:19 +02:00
Wang Xiang W
beaca7c7db Adjust sensitive terms 2021-01-25 14:13:13 +02:00
Wang Xiang W
9ea1e4be3d limex: add fast NFA check 2021-01-25 14:13:13 +02:00
Chang, Harry
5ad3d64b4b Discard HAVE_AVX512VBMI checks at Sheng/McSheng compile time. 2021-01-25 14:13:13 +02:00
Zhu,Wenjun
d96f1ab505 MCSHENG64: extend to 64-state based on mcsheng 2021-01-25 14:13:13 +02:00
Hong, Yang A
dea7c4dc2e lookaround:
add 64x8 and 64x16 shufti models
add mask64 model
expand entry quantity
2021-01-25 14:13:13 +02:00
Chang, Harry
ed4b0f713a SHENG64: 64-state 1-byte shuffle based DFA. 2021-01-25 14:13:13 +02:00
Chang, Harry
6a42b37fca SHENG32: Compile priority sheng > mcsheng > sheng32. 2021-01-25 14:13:13 +02:00
Konstantinos Margaritis
5333467249 fix names, use own intrinsic instead of explicit _mm* ones 2020-09-23 11:51:21 +03:00
Wang Xiang W
7c4490cfc9 smallwrite: add report dedupe check 2020-05-25 13:46:57 +00:00
Hong, Yang A
23e5f06594 add new Literal API for pure literal expressions:
Design compile time api hs_compile_lit() and hs_compile_lit_multi()
to handle pure literal pattern sets. Corresponding option --literal-on
is added for hyperscan testing suites. Extended parameters and part of
flags are not supported for this api.
2019-08-13 14:51:38 +08:00
Chang, Harry
64ea43ea39 Logical Combination: avoid corruption of pending combination report
in streaming mode.

Fixes github issue #165
2019-08-13 14:50:16 +08:00
Chang, Harry
1f4c10a58d Logical combination: support EOD match from purely negative case. 2019-08-13 14:50:07 +08:00
Hong, Yang A
bc37072d5b Rose: add necessary instruction programs to avoid dead loop
Fixes github issue #141
2019-04-10 06:53:03 -04:00
Wang, Xiang W
6dc9bed310 Rose: add handling for unexpected programs 2019-03-26 10:16:26 -04:00
Hong, Yang A
f68723a606 literal matching: separate path for pure literal patterns 2019-01-21 09:59:22 +08:00
Chang, Harry
9ab674b18e fix dead loop under win10 release bin. 2019-01-21 09:58:55 +08:00
Wang, Xiang W
ff9636e022 rose: disable switch optimization for windows 2019-01-21 09:58:38 +08:00
Wang, Xiang W
6f3a0a323e Silence clang warnings about unused variable 2019-01-21 09:57:17 +08:00
Guangqing Chen
922fe2ab20 Rose: optimize switch-case with Labels-as-Values 2019-01-21 09:56:58 +08:00
Lu, Qi
5a0885d235 Windows porting: port hyperscan and chimera tools to windows. 2018-07-09 11:40:43 -04:00
Chang, Harry
8a1c497f44 Logical Combination of patterns. 2018-06-27 14:04:57 +08:00
Justin Viiret
ce7cfbde82 misc: docs, typo fixes, small cleanups 2018-06-27 13:39:05 +08:00
Justin Viiret
ea9d1f69fb rose_build_add: remove unused max_adj param
In prepAcceptForAddAnchoredNFA(), we used to support different values
for max_adj. Since it's now always zero, remove it.
2018-06-27 13:39:00 +08:00
Matthew Barr
dd286323a9 Don't let haigs into Tamarama 2017-09-18 13:29:34 +10:00
Justin Viiret
ba0bf0c991 rose_build_add_mask: improve findMaskLiteral perf 2017-09-18 13:29:34 +10:00
Justin Viiret
19e95b0314 rose_build_matchers: init LitFragment fields
Silences Coverity warning about squash, delay_squash.
2017-09-18 13:29:34 +10:00
Alex Coyte
a1fdc3afcf dedupeLeftfixesVariableLag: refactor, more blockmode deduping 2017-09-18 13:29:34 +10:00
Alex Coyte
d6c050abd6 maintain castle report information 2017-09-18 13:29:34 +10:00
Alex Coyte
ace592e247 tidy mergeCastleSuffixes 2017-09-18 13:29:34 +10:00
Alex Coyte
6f452668ec refactor mergeCastleLeftfixes 2017-09-18 13:29:34 +10:00
Alex Coyte
cee0b722a3 reimplement hasSameEngineType() 2017-09-18 13:29:34 +10:00
Alex Coyte
47e64646b4 move mergeDupeLeaves() and uncalcLeaves() to rose_build_role_aliasing
Unlike the rest of rose_build_mergem, these functions relate to merging
roles/vertices rather than merging engines.
2017-09-18 13:22:56 +10:00
Alex Coyte
a97cdba8cc rose merges: why not dedupe transient engines?
We avoid merging different transient engines as it may force us to run heavier
engines and no stream state is consumed either way. However, there should be
no harm in just removing duplicate instances of a transient engine.
2017-09-18 13:22:56 +10:00