Commit graph

15 commits

Author SHA1 Message Date
Andreas Kling
b37d84be58 Revert "LibJS/Bytecode: Don't replace the entry block in MergeBlocks"
This reverts commit acd29e064c.
2024-03-06 08:39:29 +01:00
Andreas Kling
acd29e064c LibJS/Bytecode: Don't replace the entry block in MergeBlocks
The entry block must stay in place, although it's okay to merge stuff
into it.

This fixes 4 test262 tests and brings us to parity with optimization
disabled. :^)
2024-03-04 20:54:51 +01:00
Andreas Kling
5b29974bfa LibJS/Bytecode: Bring back the bytecode optimization pipeline
...minus the EliminateLoads pass, since it was not compatible with the
new bytecode format.
2024-03-04 20:54:51 +01:00
Timothy Flynn
77d7f715e3 LibJS+CI: Remove bytecode optimization passes for now
These passes have not been shown to actually optimize any JS, and tests
have become very flaky with optimizations enabled. Until some measurable
benefit is shown, remove the optimization passes to reduce overhead of
maintaining bytecode operations and to reduce CI churn. The framework
for optimizations will live on in git history, and can be restored once
proven useful.
2023-07-21 19:47:36 +03:30
Andreas Kling
359d6e7b0b Everywhere: Stop using NonnullOwnPtrVector
Same as NonnullRefPtrVector: weird semantics, questionable benefits.
2023-03-06 23:46:35 +01:00
Hendiadyoin1
5506951ffb LibJS: Don't try to merge unterminated BasicBlocks
This was causing a Segfault, trying to access the non-present terminator
2023-02-21 22:46:18 +01:00
Linus Groh
6e7459322d AK: Remove StringBuilder::build() in favor of to_deprecated_string()
Having an alias function that only wraps another one is silly, and
keeping the more obvious name should flush out more uses of deprecated
strings.
No behavior change.
2023-01-27 20:38:49 +00:00
Hendiadyoin1
186237aec8 LibJS: Don't try to merge blocks not ending in Jumps 2022-12-03 17:07:30 +03:30
Hendiadyoin1
c66284ab0b LibJS: Fix MergeBlocks emitting some blocks twice 2022-11-01 11:21:18 +01:00
Hendiadyoin1
28e2467b48 LibJS: Minor cleanups in MergeBlocks 2022-11-01 11:21:18 +01:00
Hendiadyoin1
1ac1a5bd58 LibJS: Don't memcpy NewBigInt instruction
These aren't trivially copyable, so we have to be a bit more careful
2022-11-01 11:21:18 +01:00
sin-ack
3f3f45580a Everywhere: Add sv suffix to strings relying on StringView(char const*)
Each of these strings would previously rely on StringView's char const*
constructor overload, which would call __builtin_strlen on the string.
Since we now have operator ""sv, we can replace these with much simpler
versions. This opens the door to being able to remove
StringView(char const*).

No functional changes.
2022-07-12 23:11:35 +02:00
Ali Mohammad Pur
0b8d2fb62f LibJS/Bytecode: Replace merged block references before copying them 2022-03-14 22:28:53 +01:00
Ben Wiederhake
0c365fdfd3 LibJS: Avoid unnecessary copies in MergeBlocks codegen pass 2022-01-01 15:40:39 +01:00
Ali Mohammad Pur
1414c7b049 LibJS: Add a basic pass manager and add some basic passes
This commit adds a bunch of passes, the most interesting of which is a
pass that merges blocks together, and a pass that places blocks that
flow into each other next to each other, and a very simply pass that
removes duplicate basic blocks.
Note that this does not remove the jump at the end of each block in that
pass to avoid scope creep in the passes.
2021-06-15 22:06:33 +04:30