55 Commits

Author SHA1 Message Date
gtsoul-tech
0f4369bf22
Bug fix/clang-tidy-performance (#300)
Various clang-tidy-performance fixes:
* noexcept
* performance-noexcept-swap
* performance
* performance-move-const-arg
* performance-unnecessary-value-param
* performance-inefficient-vector-operation
* performance-no-int-to-ptr
* add performance
* performance-inefficient-string-concatenation
* clang-analyzer-deadcode.DeadStores
* performance-inefficient-vector-operation
* clang-analyzer-core.NullDereference
* clang-analyzer-core.UndefinedBinaryOperatorResult
* clang-analyzer-core.CallAndMessage

---------

Co-authored-by: gtsoul-tech <gtsoulkanakis@gmail.com>
2024-06-20 14:57:19 +03:00
Konstantinos Margaritis
c837925087
Fix/Suppress remaining Cppcheck warnings (#291)
Fix/suppress the following cppcheck warnings:

* arithOperationsOnVoidPointer
* uninitMember
* const*
* shadowVariable
* assignmentIntegerToAddress
* containerOutOfBounds
* pointer-related warnings in Ragel source
* missingOverride
* memleak
* knownConditionTrueFalse
* noExplicitConstructor
* invalidPrintfArgType_sint
* useStlAlgorithm
* cstyleCast
* clarifyCondition
* VSX-related cstyleCast
* unsignedLessThanZero 

Furthermore, we added a suppression list to be used, which also includes the following:
* missingIncludeSystem
* missingInclude
* unmatchedSuppression
2024-05-27 12:23:02 +03:00
Konstantinos Margaritis
2ec64b6f07
Merge pull request #283 from isildur-g/wip-cppcheck271-part2
Wip cppcheck271 useStlAlgorithm part2
2024-05-21 15:52:15 +03:00
Konstantinos Margaritis
40da067b4f Add more C style casts fixes and suppressions 2024-05-18 21:49:54 +03:00
Konstantinos Margaritis
28adc07824 Fix more C-style casts 2024-05-18 15:10:34 +03:00
g. economou
22c3e3da6e
Merge branch 'develop' into wip-cppcheck271-part2 2024-05-17 11:08:09 +03:00
G.E
da4f563a24 first batch of cppcheck disables and a few more stl-ifications,
involving use of accumulate() .
2024-05-16 23:01:17 +03:00
Konstantinos Margaritis
a255600773
Merge pull request #277 from isildur-g/wip-cppcheck271
phase 1 of addressing cppcheck useStlAlgorithm warnings for fill and copy operations
2024-05-15 10:44:15 +03:00
G.E
4cefba5ced phase 1 of addressing cppcheck useStlAlgorithm warnings,
this set only includes fill and copy operations.
2024-05-14 17:37:38 +03:00
gtsoul-tech
753c7de002 Merge branch 'develop' into test-noExplicitConstructor 2024-05-10 12:46:44 +03:00
gtsoul-tech
94b17ecaf2 noExplicitConstructor 2024-05-10 10:07:47 +03:00
Konstantinos Margaritis
7dd2135b80
Merge pull request #264 from gtsoul-tech/bugFix/cppcheck-constVariablePointer
Cppcheck constVariablePointer error
2024-05-08 10:28:24 +03:00
gtsoul-tech
5ad1f2127f constVariablePointer 2024-05-02 14:30:18 +03:00
gtsoul-tech
ea420114a7 knownConditionTrueFalse 2024-05-01 13:04:51 +03:00
gtsoul-tech
fd3e251afa redundantInitialization 2024-04-24 12:40:55 +03:00
Konstantinos Margaritis
0d2f9ccbaa Fix 'unqualified call to std::move' errors in clang 15+ 2023-10-03 20:24:39 +03:00
Konstantinos Margaritis
556206f138 replace push_back by emplace_back where possible 2021-10-12 11:51:33 +03:00
Wang Xiang W
5f930b267c Limex: exception handling with AVX512 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
Wang, Xiang W
8a0e4f8249 Use std::distance explicitly to avoid ambiguity with boost 2019-01-11 16:05:55 +08:00
Justin Viiret
ea2e85ac87 ng_squash: switch to using unordered_map
Also some cleaning up, small performance improvements.
2017-09-18 13:29:34 +10:00
Matthew Barr
29e1aae3fb Use an unsigned byte, not char 2017-09-18 13:29:33 +10:00
Justin Viiret
d55e8fdf94 limex_compile: reduce state id lookups 2017-08-21 11:24:52 +10:00
Justin Viiret
58004f15f0 limex_compile: turn tugs into a bitset 2017-08-21 11:24:52 +10:00
Justin Viiret
9cf66b6ac9 util: switch from Boost to std::unordered set/map
This commit replaces the ue2::unordered_{set,map} types with their STL
versions, with some new hashing utilities in util/hash.h. The new types
ue2_unordered_set<T> and ue2_unordered_map<Key, T> default to using the
ue2_hasher.

The header util/ue2_containers.h has been removed, and the flat_set/map
containers moved to util/flat_containers.h.
2017-08-21 11:14:55 +10:00
Justin Viiret
48f9a6d518 limex_compile: use small_color_map 2017-08-21 11:12:26 +10:00
Matthew Barr
423569ec82 De-multiaccel 2017-05-30 13:59:00 +10:00
Justin Viiret
63fe84c3f1 bytecode_ptr: add make_zeroed_bytecode_ptr
Rather than always zeroing memory.
2017-04-26 15:19:36 +10:00
Justin Viiret
a197074c5d nfa: switch to using bytecode_ptr<NFA> 2017-04-26 15:19:36 +10:00
Justin Viiret
7288da22bd limex_compile: use bytecode_ptr 2017-04-26 15:19:35 +10:00
Justin Viiret
9a82689d00 limex: more general CANNOT_DIE analysis 2017-04-26 15:19:35 +10:00
Justin Viiret
8713cfbd9e limex: add CANNOT_DIE flag and loop without test 2017-04-26 15:19:35 +10:00
Justin Viiret
5005d50050 limex_compile: don't repeatedly calc dominators 2017-04-26 15:17:11 +10:00
Alex Coyte
e717525194 Check if any tugs are alive when compressing/expanding repeats 2017-03-01 13:05:20 +11:00
Alex Coyte
530d84c6f3 allow edge_descriptors to be created from pair<edge_descriptor, bool> 2016-12-02 11:32:20 +11:00
Alex Coyte
e1e9010cac Introduce custom adjacency-list based graph 2016-12-02 11:31:33 +11:00
Alex Coyte
47f53f63a7 simple pass to pick up paths redundant with those from cyclic's succs 2016-12-02 11:24:30 +11:00
Alex Coyte
592ce06eeb Create combo tops for trigger limexes 2016-12-02 11:22:23 +11:00
Justin Viiret
5e3fa7a266 limex: make NFAAccept::squash rel to LimEx base 2016-10-28 14:46:23 +11:00
Justin Viiret
77fe1ef6e5 limex: rework accept handling
Rather that iterating over NFAAccept structures and testing individual
bits in the state structure, iterate over the state vector and index
into accept structures.

Adds report list support to this path, unified with the report lists
used for exception handling.
2016-10-28 14:46:19 +11:00
Alex Coyte
97483eee5b UE-3019: limex_compile: correctly access the dominator map 2016-10-28 14:45:02 +11:00
Alex Coyte
bcf40c5136 Limex: don't not build accel schemes for impossible state sets 2016-10-28 14:44:12 +11:00
Alex Coyte
a08e1dd690 Introduce a 64-bit LimEx model.
On 64-bit platforms, the Limex 64 model is implemented in normal GPRs.
On 32-bit platforms, however, 128-bit SSE registers are used for the
runtime implementation.
2016-10-28 14:44:12 +11:00
Alex Coyte
702f256b39 remove exceptionMap from LimExNFA 2016-08-10 15:11:15 +10:00
Alex Coyte
691b08d170 use NGHolder::foo in favour of NFAGraph::foo 2016-08-10 14:52:56 +10:00
Alex Coyte
f166bc5658 allow some prefixes that may squash the literal match to run eagerly 2016-07-08 11:01:34 +10:00
Justin Viiret
e915ca21c5 limex: tidy up scoring code 2016-07-08 10:57:29 +10:00
Justin Viiret
8648397257 limex: invert scoring to count up from zero 2016-07-08 10:57:29 +10:00
Kirill Rybalchenko
9d2403e8bb limex: implement variable shift NFA engines
Replaces the old LimEx NFA engines, which were specialised for model
size and number of shifts, with a new set of engines that can handle a
variable number of shifts.
2016-07-08 10:57:29 +10:00
Alex Coyte
89d7728f77 refactoring of double byte offset accel to use paths and add to mcclellan 2016-04-20 13:34:56 +10:00