mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:37:36 +00:00
LibRegex: Merge alternations based on blocks and not instructions
The instructions can have dependencies (e.g. Repeat), so only unify equal blocks instead of consecutive instructions. Fixes #11247. Also adds the minimal test case(s) from that issue.
This commit is contained in:
parent
92233660b8
commit
d2e51fafa9
3 changed files with 23 additions and 17 deletions
|
@ -227,10 +227,11 @@ public:
|
|||
return result.success;
|
||||
}
|
||||
|
||||
using BasicBlockList = Vector<Detail::Block>;
|
||||
static BasicBlockList split_basic_blocks(ByteCode const&);
|
||||
|
||||
private:
|
||||
void run_optimization_passes();
|
||||
using BasicBlockList = Vector<Detail::Block>;
|
||||
BasicBlockList split_basic_blocks();
|
||||
void attempt_rewrite_loops_as_atomic_groups(BasicBlockList const&);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue