Dmitry Stogov
87dbdcea0d
Add necessary compensation loads for bounded nodes when enter into function through OSR entry-point
2023-03-21 13:45:37 +03:00
Dmitry Stogov
f5b7065b10
Refactor the ENTRY nodes
...
Now all ENTRY nodes have a "fake" input control edge.
Through this edge all of them are dominated by START node.
2023-03-17 09:02:37 +03:00
Dmitry Stogov
9b34731d16
Fix most MSVC compilation warnings
2023-02-28 02:11:09 +03:00
Anatol Belski
964f5a0191
build: MSVC compatibility
...
Signed-off-by: Anatol Belski <ab@php.net>
2023-02-25 00:04:57 +01:00
Dmitry Stogov
fd653528e9
JMP optimization. Lift constant IJMP targets into jmp_table(s).
2023-02-16 22:41:55 +03:00
Dmitry Stogov
9b6b6996c4
Move IR_ALWAYS_INLINE and IR_NEVER_INLINE definition into public ir.h
2023-02-07 23:14:10 +03:00
Dmitry Stogov
677c6cb2cb
Move declaration of some register alloation related macros to public API
...
Use RLOAD.op3 as a flag to avoid spill store
2023-01-30 16:33:57 +03:00
Dmitry Stogov
32ad3d1052
Use inline functions to avoid false positive address sanitaizer warnings
2023-01-20 15:35:02 +03:00
Dmitry Stogov
6a4e239773
Create a sparate pass to remove unreachableble CFG blocks.
...
SCCP pass removes unreachable blocks before CFG construction.
In case of -O0 or -O1 pipeline (without SCCP) it's simpler and faster
to unlink unreachable CFG blocks once, then check for reachability
in almost any compilation pass.
-O2 pipeline (with SCCP) don't need this pass.
2022-11-29 20:02:07 +03:00
Dmitry Stogov
7fd1ccf48b
Eliminte useless checks
2022-11-24 12:23:05 +03:00
Dmitry Stogov
7d07a4ac89
Strength reduction
2022-11-18 14:38:19 +03:00
Dmitry Stogov
00395f0a23
Cleanup: separate ir_phi_input_number() function
2022-11-18 10:11:16 +03:00
Dmitry Stogov
3e3746d5cb
Refactor API that expose target CPU register constraints for register allocator
2022-11-17 23:30:35 +03:00
Jim Huang
af75775bac
Fix build on macOS
...
Corresponding compilation errors:
ir_private.h:11:10: fatal error: 'malloc.h' file not found
ir_gdb.c:162:17: error: implicit declaration of function 'offsetof' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
.shofs = offsetof(ir_gdbjit_obj, sect),
2022-11-12 01:24:33 +08:00
Jim Huang
c4017eab4b
Fix build with GCC prior to 10
2022-11-11 18:05:05 +08:00
Dmitry Stogov
b56f1f5298
Refactor CFG construction algorithm to mark all BB starts in two passes.
...
First we perform a backwad DFS search from "stop" nodes. This pass may
leak some CFG paths ended by infinite loops. To support these paths we
record their possible roots and perform forward DFS search starting from
them.
2022-11-11 10:25:59 +03:00
Dmitry Stogov
47ddea00ac
Use better conditions
2022-11-11 02:56:16 +03:00
Dmitry Stogov
a4b09dd3ce
Improve CFG builder
2022-11-11 00:19:17 +03:00
Dmitry Stogov
78cc14aca9
Fix ir_worklist_clear()
2022-11-10 22:44:29 +03:00
Dmitry Stogov
f484b5d16b
micro-optimization
2022-11-09 13:23:30 +03:00
Dmitry Stogov
6507758530
Use deines instead of magic constants
2022-11-09 13:13:15 +03:00
Dmitry Stogov
8660c3cd8b
micro-optimization
2022-11-09 09:12:16 +03:00
Dmitry Stogov
3535fd2fc4
Fix compilation warnings and signed/unsigned mess
2022-11-08 23:09:35 +03:00
Dmitry Stogov
4c536aae20
Extend SCCP to perform Dead Load Elimination
2022-11-08 15:39:00 +03:00
Dmitry Stogov
cc56f12f13
Add LICENSE and copyright notices
2022-11-08 11:32:46 +03:00
Dmitry Stogov
2dea40bfab
Add API to patch native code
2022-10-26 13:44:44 +03:00
Dmitry Stogov
9f472c1c91
Add support for deoptimization and binding to multiple slots
2022-10-21 17:16:25 +03:00
Dmitry Stogov
1dcfe127e1
Allow save/load "null" references
2022-10-18 15:52:25 +03:00
Dmitry Stogov
ad59556d85
Add support for binding IR nodes to "external" spill slots (e.g. PHP VM stack slots)
2022-09-15 15:26:43 +03:00
Dmitry Stogov
dce017f0ed
Replace calloc() by malloc()
2022-09-15 11:57:01 +03:00
Dmitry Stogov
65f439f198
Turn ir_addrtab into more general ir_hashtab
2022-09-07 00:04:02 +03:00
Dmitry Stogov
3a20a8130c
JMP optimization. Better ENETR block placement.
2022-08-31 14:29:34 +03:00
Dmitry Stogov
32198c00b7
Reimplement JMP optimization
2022-08-30 23:15:20 +03:00
Dmitry Stogov
b0cba142a9
Merge ir_uses_fixed_reg() into ir_get_def_flags() and ir_get_use_flags()
2022-08-12 21:17:19 +03:00
Dmitry Stogov
d55154d998
Introduce ir_bitqueue API
2022-08-12 19:25:10 +03:00
Dmitry Stogov
9ff5d74778
Introduce ir_bitset_pop_first_ex() and ir_bitset_incl_ex() to avoid repatable checks of the first bitset elements.
2022-08-12 18:01:15 +03:00
Dmitry Stogov
3a0fb71282
Improve ir_bitset_pop_first()
2022-08-12 16:09:32 +03:00
Dmitry Stogov
e7e0da2e79
ir_bitset API improvement
2022-08-12 15:54:25 +03:00
Dmitry Stogov
fc20369695
Use 64-bit instructions for ir_bitset if possible
2022-08-11 00:17:58 +03:00
Dmitry Stogov
1ef04d2540
Improve live interval coverage and overlaping tests by checking only the necessary tails of active and inactive intervals.
2022-08-10 13:59:34 +03:00
Dmitry Stogov
0295c071cf
Cache the last ir_live_range.end in ir_live_interval.end
2022-08-10 09:47:06 +03:00
Dmitry Stogov
082bcf89c9
Use ir_ctx.fixed_regset to limit available registers
2022-06-21 16:13:14 +03:00
Dmitry Stogov
5ef1e97261
Better support for unreachable basic blocks
2022-06-20 16:34:44 +03:00
Dmitry Stogov
688b547a1e
Fix incorret size
2022-06-17 10:08:05 +03:00
Dmitry Stogov
3f6c1ee0f5
cleanup
2022-06-15 22:48:19 +03:00
Dmitry Stogov
5cafe50d36
Initial support for PHP
2022-06-10 00:16:29 +03:00
Dmitry Stogov
c28fe2734d
Validate operand types
2022-06-03 11:23:05 +03:00
Dmitry Stogov
91bddc09ed
Cleanup & unification
2022-06-01 00:34:45 +03:00
Dmitry Stogov
00c300fc9f
Start Aarch64 back-end
2022-05-31 11:22:31 +03:00
Dmitry Stogov
41f3e43cf7
cleanup
2022-05-27 13:18:04 +03:00