Dmitry Stogov
30c6717812
Fixed incorrect condition evaluation
2023-05-23 19:32:18 +03:00
Tony Su
4cdd3eba77
[Fix]: ir_print_const() prints enclosing quote or not
...
Current ir_print_const() will by default print out the enclosing double
quote for any string, but this will lead to syntax error in dumped dot
file by ir_dump_dot() reported by 'dot' command.
ir_print_const() now has the fourth parameter to indicate whether prints
out the enclosing double quote(") or not.
OLD: ir_print_const(const ir_ctx *ctx, const ir_insn *insn, FILE *f)
NEW: ir_print_const(const ir_ctx *ctx, const ir_insn *insn, FILE *f, bool quoted)
Signed-off-by: Tony Su <tao.su@intel.com>
2023-05-22 21:02:46 +08:00
Dmitry Stogov
c93abd79b2
Remove IR_OPND_VAR
2023-05-19 13:00:55 +03:00
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
e01c43a967
Simplify access to nodes with variable inputs count
2023-04-21 12:40:17 +03:00
Dmitry Stogov
1f447a538b
Better iterative DCE after SCCP
2023-04-13 10:39:00 +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
Niels Dossche
1e772c500e
Fix SCCP use list update for op3
2023-02-12 14:18:17 +01:00
Dmitry Stogov
a85f59a62d
Fix MERGE to BEGIN conversion in SCCP
2023-01-19 10:08:48 +03:00
Dmitry Stogov
4bc47db08d
Fix use_list update
2023-01-18 17:19:37 +03:00
Dmitry Stogov
844653cfd1
Fix IR reconstruction during SCCP
2022-12-23 14:34:51 +03:00
Dmitry Stogov
1bff08bc10
Update use_lists when modify an instruction
2022-12-21 23:31:11 +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
142cdb4b8b
SCCP cleanup and optimization
2022-11-09 13:24:37 +03:00
Dmitry Stogov
cc73788981
Fix compilation warnings
2022-11-08 18:17:29 +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
2ff0617db6
Perform iterative folding and DCE as a final pass of SCCP
2022-11-08 00:41:08 +03:00
Dmitry Stogov
5ba4050248
cleanup SCCP
2022-11-08 00:37:28 +03:00
Dmitry Stogov
9f472c1c91
Add support for deoptimization and binding to multiple slots
2022-10-21 17:16:25 +03:00
Dmitry Stogov
6e0415a44d
Fix SCCP for PHIs
2022-10-12 12:01:28 +03:00
Dmitry Stogov
66b62b7447
Fix use after reallocation
2022-09-28 14:31:46 +03:00
Dmitry Stogov
ccb756321a
Fix incorrect unreachable code detection
2022-09-15 00:04:26 +03:00
Dmitry Stogov
11db21a98c
Allow SCCP to grow use_lists (through reallocation)
2022-09-14 15:14:18 +03:00
Dmitry Stogov
14ffff68dc
Fix SCCP problems
2022-09-14 14:27:52 +03:00
Dmitry Stogov
bab62d42c9
Fix assertion
2022-09-13 12:44:08 +03:00
Dmitry Stogov
e833a1647b
Move code to remove TERMINATOR node from the terminator list
2022-09-13 12:42:41 +03:00
Dmitry Stogov
a998590dfb
Fix SCCP support for IF with integer and floating point condition
2022-09-12 14:53:33 +03:00
Dmitry Stogov
7f703fb176
remove brackets
2022-09-05 22:03:30 +03:00
Dmitry Stogov
d5f73bf388
Skip op1 of CONTROL nodes
2022-09-05 22:00:00 +03:00
Dmitry Stogov
6c7889ebd1
Simplify IF->IF_TRUE/IF_FALSE search
2022-09-02 11:00:40 +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
7ae3d1dc6a
Fix memory leak
2022-06-23 17:17:06 +03:00
Dmitry Stogov
88b66a77cd
Support for multiple ENTRY
2022-06-21 13:56:29 +03:00
Dmitry Stogov
00e92483bc
Fix compilation warnings
2022-06-21 11:41:59 +03:00
Dmitry Stogov
ac5c3981e5
Allow LOOP_BEGIN to have multiple input back-edges
2022-06-16 12:31:23 +03:00
Dmitry Stogov
3f6c1ee0f5
cleanup
2022-06-15 22:48:19 +03:00
Dmitry Stogov
41f3e43cf7
cleanup
2022-05-27 13:18:04 +03:00
Dmitry Stogov
911219493d
Implement IJMP instruction (indirect jump or computed goto)
2022-05-19 18:56:48 +03:00
Dmitry Stogov
2b9e793b4e
Add debug options
2022-04-27 14:47:52 +03:00
Dmitry Stogov
6b60d8fba9
Code generation for VLOAD and VSTORE
2022-04-19 22:35:29 +03:00
Dmitry Stogov
e449345514
Fix few CSSP bugs
2022-04-19 16:45:03 +03:00
Dmitry Stogov
2937993190
Initial import
2022-04-06 00:19:23 +03:00