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
Alex Coyte
2a492273b5
remove !LBR constraints from merge passes
...
we have either converted candidates to castles already or we have converted them
back in the hope of merging them with other holders
2017-09-18 13:22:56 +10:00
Alex Coyte
4e9b0ad3fd
rework mergeLeftfixesVariableLag()
2017-08-21 11:25:21 +10:00
Justin Viiret
3ff70d5568
insertion_ordered_{map,set}: add new containers
...
These are associative map/set structures that are iterable in insertion
order.
2017-08-21 11:25:21 +10:00
Wang, Xiang W
a645201675
UE-3147: ensure the same squash behavior for literals shared between different literal matchers
2017-08-21 11:25:03 +10:00
Justin Viiret
ba1df6412b
groupByFragment: make fewer string copies
2017-08-21 11:24:52 +10:00
Justin Viiret
8eb55d4242
rose_build_exclusive: clean up use of vertex indices
2017-08-21 11:24:52 +10:00
Justin Viiret
1f2eb5a093
rose_build_lookaround: use vector in trimLiterals
2017-08-21 11:24:52 +10:00
Justin Viiret
4889a492e4
rose: more hash member funcs for rose types
2017-08-21 11:24:52 +10:00
Justin Viiret
09938d532f
rose: return a vector from findEdgesByLiteral
2017-08-21 11:24:52 +10:00
Justin Viiret
927501175c
rose_build_long_lit: refactor to do less dupe work
...
Also some performance improvements.
2017-08-21 11:24:52 +10:00
Alex Coyte
37033ef9bb
Provide RoseResources to roseQuality.
...
RoseResources is an alternative to manually digging through the bytecode.
2017-08-21 11:24:52 +10:00
Alex Coyte
ffc2d578b1
roseQuality() no longer needs to be part of rose's API.
2017-08-21 11:23:41 +10:00
Alex Coyte
952f0aad21
support dynamic stream compression
2017-08-21 11:18:54 +10:00
Alex Coyte
f8544505ce
mergeLeftfixesVariableLag: update comments, debugging support
2017-08-21 11:18:54 +10:00
Justin Viiret
33823d60d1
tidy: "ue2::flat_set/map" -> "flat_set/map"
2017-08-21 11:14:59 +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
Wang, Xiang W
252eb820c4
ue-3145: make parents of included literals exclusive
2017-08-21 11:12:36 +10:00
Wang, Xiang W
86c5f7feb1
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.
2017-08-21 11:12:36 +10:00
Wang, Xiang W
67a8f43355
literal matchers: change context passed to callback to scratch
2017-08-21 11:12:36 +10:00
Wang, Xiang W
ebb1b0006b
remove start argument in literal matcher callbacks
2017-08-21 11:12:36 +10:00
Justin Viiret
cdb281df42
rose_build_convert: replace bind2nd with lambda
...
std::bind2nd was deprecated in C++11.
2017-08-21 11:12:26 +10:00
Justin Viiret
9f0bc429b4
rose_in_dump: use StdioFile
2017-08-21 11:12:16 +10:00
Justin Viiret
bf3ced92f4
hwlm_dump: take base filename, like NFA dump API
2017-08-21 11:10:11 +10:00
Justin Viiret
f762fb9af6
dump_util: richer StdioFile type
2017-08-21 11:10:11 +10:00
Justin Viiret
4edf1e4195
dump: move openStdioFile() to util/dump_util.h
2017-08-21 11:10:11 +10:00
Justin Viiret
bc953717c1
rose: dump lit tables in their own files
2017-08-21 11:10:11 +10:00
Justin Viiret
2dc1f9d629
rose_build_matchers: fix fragment noruns calc
2017-08-21 11:10:08 +10:00
Justin Viiret
c83f2ea389
rose_build_matchers: be more careful w/ mixed-case
...
Overhaul the way fragment literals are added to HWLM and accel, fix
some bugs shaken out by stricter mask use.
2017-08-21 11:09:45 +10:00
Justin Viiret
72387e0de4
lookarounds: don't reconfirm bytes in hwlm mask
2017-08-21 11:09:23 +10:00
Justin Viiret
7560e189eb
rose: always use mandatory masks for lit fragments
2017-08-21 11:09:20 +10:00
Justin Viiret
bdae3d5b80
dump: always allocate >=8 bytes for multibit
...
The multibit runtime assumes that it is always safe to read 8 bytes, so
we must over-allocate for smaller sizes. Caught by ASan.
2017-08-21 10:40:18 +10:00
Justin Viiret
85f7790a21
dfa: standardise 'using' instead of typedef
2017-08-21 10:40:18 +10:00
Justin Viiret
31141dd35b
determinise: use queue, improve api
...
- Use a queue rather than always building the full vector of state
sets.
- Make more use of move, emplace, reserve.
- Write directly into dstates argument.
- Return bool rather than int.
2017-08-21 10:40:18 +10:00
Justin Viiret
4976f019f4
rose_build_engine_blob: rose unused data() func
...
We should no longer be reading out of the engine blob.
2017-05-30 14:00:12 +10:00
Matthew Barr
f6b688fc06
rename pshufb to pshufb_m128
2017-05-30 13:59:23 +10:00
Matthew Barr
a295c96198
rename vpshufb to pshufb_m256
2017-05-30 13:59:23 +10:00
Alex Coyte
2b1a7da188
deterministic assembleProgramBlocks()
2017-05-30 13:59:00 +10:00
Justin Viiret
dfe1b8a2af
ng_depth: rename calcDepth functions, return vec
2017-05-30 13:59:00 +10:00
Alex Coyte
15c8a7bd98
rose: rework storage of extra lookaround information
...
- remove explicit lookaround table from bytecode
- make the RoseInstr responsible for adding required info to blob
2017-05-30 13:59:00 +10:00
Alex Coyte
097d73c7ff
pass roleStateIndices by reference
2017-05-30 13:58:59 +10:00
Alex Coyte
b30e5021f1
Strengthen assert to indicate that q->end is less than q->cur
...
Coverity CID-167665
2017-05-30 13:58:59 +10:00
Justin Viiret
8b9328fe9e
rose: replace RoseLiteralMap use of bimap
...
This apoproach is simpler and more efficient for cases with large
numbers of literals.
2017-05-30 13:58:59 +10:00
Justin Viiret
a75b2ba2e5
rose: remove hasLiteral()
2017-05-30 13:58:59 +10:00
Alex Coyte
bb29aeb298
rose: shift program construction functions to rose_build_program
2017-05-30 13:58:32 +10:00
Justin Viiret
82838f5728
rose_build: move dedupe analysis into own file
2017-05-30 13:58:32 +10:00
Alex Coyte
1287b70f4b
split out instruction details to own files
2017-05-30 13:58:32 +10:00