Commit Graph

27 Commits

Author SHA1 Message Date
Dmitry Stogov
367d2e3246 Avoid CFG reachability check after SCCP
SCCP eliminates unreachable BBs before the CFG constraction.
So ir_build_cfg() doesn't need to perforem reachability chececk if it
runs after SCCP, otherwise it starts call ir_remove_unreachable_blocks() if necessary.
User code dont have to call ir_remove_unreachable_blocks() anymore.
2023-04-27 14:18:39 +03:00
Dmitry Stogov
56b0dbccde Use ir_ctx.mflags for CPU specific code-generation options
'mflags' and ir_cpuinfo() return value have the same meaning.
2023-04-18 09:54:35 +03:00
Anatol Belski
f8ca41119c cpu: Add framework for CPU feature handling
This comes with the initial feature to query CPUID on x86. Supported are
both GCC based build and MSVC builds targeting Windows.

Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
2023-04-15 01:08:36 +02:00
Anatol Belski
d0b4f108ee ir_init: Accept flags as an additional arguments
Signed-off-by: Anatol Belski <ab@php.net>
2023-03-28 00:00:45 +02:00
Dmitry Stogov
24e8e216a1 Remove a "reference" edge from LOOP_END to LOOP_BEGIN node. 2023-03-23 00:47:27 +03:00
Anatol Belski
d7b280004a ir_test: Ident and whitespace fixes
Signed-off-by: Anatol Belski <ab@php.net>
2023-03-18 19:25:33 +01:00
Dmitry Stogov
c658144736 Build ir_test.exe on Windows 2023-02-28 15:35:31 +03:00
Dmitry Stogov
d19685375c Add few missing IR builder macros 2023-02-13 20:55:54 +03:00
Dmitry Stogov
6b8a33d726 Introduce IR Builder API 2023-02-10 13:34:46 +03:00
Dmitry Stogov
58ba18bb7d Fix ir_test and set proper initial SP offset info for GDB backtraces 2023-01-31 11:51:55 +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
cc56f12f13 Add LICENSE and copyright notices 2022-11-08 11:32:46 +03:00
Dmitry Stogov
d2a0347b21 Merge basic blocks by removing connected END to BEGIN nodes 2022-10-05 16:29:49 +03:00
Dmitry Stogov
dee45adc8c Fix incorrect bindings and ws 2022-09-08 10:50:07 +03:00
Dmitry Stogov
082bcf89c9 Use ir_ctx.fixed_regset to limit available registers 2022-06-21 16:13:14 +03:00
Dmitry Stogov
411dd20331 Support for code fragments with multiple entries 2022-06-16 23:49:27 +03:00
Dmitry Stogov
af4558e439 Allow emitting native code into preallocated buffer 2022-06-10 11:30:19 +03:00
Dmitry Stogov
91bddc09ed Cleanup & unification 2022-06-01 00:34:45 +03:00
Dmitry Stogov
41f3e43cf7 cleanup 2022-05-27 13:18:04 +03:00
Dmitry Stogov
7e782a291a Extend disassembler to support .rodata section and IP relative data labels 2022-05-26 01:17:02 +03:00
Dmitry Stogov
58b67fec18 Topological sort of nodes in each basic block 2022-05-24 18:04:38 +03:00
Dmitry Stogov
d3c1e4a02f Reorder basic blocks to reduce number of jumps and improve code locality 2022-05-24 00:43:35 +03:00
Dmitry Stogov
e794451451 Preallocate call stack 2022-05-17 22:37:13 +03:00
Dmitry Stogov
4eaca331b9 Allow using debug_regset in RELEASE build 2022-05-13 09:22:31 +03:00
Dmitry Stogov
2b9e793b4e Add debug options 2022-04-27 14:47:52 +03:00
Dmitry Stogov
155c9572c8 Add ability to run "ir_test" with different optimization levels
Fix JIT for "cmp mem, imm"
2022-04-19 11:03:01 +03:00
Dmitry Stogov
2937993190 Initial import 2022-04-06 00:19:23 +03:00