diff options
| author | Andrea Corallo | 2020-10-27 19:40:55 +0000 |
|---|---|---|
| committer | Andrea Corallo | 2020-11-01 15:17:00 +0100 |
| commit | 42970cceb9b15212f1a2a28a4595efc8c960f929 (patch) | |
| tree | d56d387d21dc96e1a65e173c1f667161832ceca9 /src | |
| parent | 047fe3292d2f102c9aed4dc305de165b627bcddd (diff) | |
| download | emacs-42970cceb9b15212f1a2a28a4595efc8c960f929.tar.gz emacs-42970cceb9b15212f1a2a28a4595efc8c960f929.zip | |
Add new cond-rw pass to have forward propagation track cond branches
Add a new pass to rewrite conditional branches. This is introducing
and placing a new LIMPLE operator 'assume' in use by fwprop to
propagate conditional branch test informations on target basic blocks.
* lisp/emacs-lisp/comp.el (comp-passes): Add `comp-cond-rw'.
(comp-limple-assignments): Add `assume' operator.
(comp-emit-assume, comp-cond-rw-target-slot, comp-cond-rw-func)
(comp-cond-rw): Add new functions.
(comp-fwprop-insn): Update to pattern match `assume' insns.
* src/comp.c (emit_limple_insn): Add for `assume'.
(syms_of_comp): Define 'Qassume' symbol.
Diffstat (limited to 'src')
| -rw-r--r-- | src/comp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/comp.c b/src/comp.c index 0c555578f81..48e4f1c8cde 100644 --- a/src/comp.c +++ b/src/comp.c | |||
| @@ -2131,9 +2131,9 @@ emit_limple_insn (Lisp_Object insn) | |||
| 2131 | n); | 2131 | n); |
| 2132 | emit_cond_jump (test, target2, target1); | 2132 | emit_cond_jump (test, target2, target1); |
| 2133 | } | 2133 | } |
| 2134 | else if (EQ (op, Qphi)) | 2134 | else if (EQ (op, Qphi) || EQ (op, Qassume)) |
| 2135 | { | 2135 | { |
| 2136 | /* Nothing to do for phis into the backend. */ | 2136 | /* Nothing to do for phis or assumes in the backend. */ |
| 2137 | } | 2137 | } |
| 2138 | else if (EQ (op, Qpush_handler)) | 2138 | else if (EQ (op, Qpush_handler)) |
| 2139 | { | 2139 | { |
| @@ -5134,6 +5134,7 @@ native compiled one. */); | |||
| 5134 | DEFSYM (Qcallref, "callref"); | 5134 | DEFSYM (Qcallref, "callref"); |
| 5135 | DEFSYM (Qdirect_call, "direct-call"); | 5135 | DEFSYM (Qdirect_call, "direct-call"); |
| 5136 | DEFSYM (Qdirect_callref, "direct-callref"); | 5136 | DEFSYM (Qdirect_callref, "direct-callref"); |
| 5137 | DEFSYM (Qassume, "assume"); | ||
| 5137 | DEFSYM (Qsetimm, "setimm"); | 5138 | DEFSYM (Qsetimm, "setimm"); |
| 5138 | DEFSYM (Qreturn, "return"); | 5139 | DEFSYM (Qreturn, "return"); |
| 5139 | DEFSYM (Qcomp_mvar, "comp-mvar"); | 5140 | DEFSYM (Qcomp_mvar, "comp-mvar"); |