diff options
author | Andy Wingo <wingo@pobox.com> | 2020-08-25 23:00:57 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2020-08-26 10:04:20 +0200 |
commit | 8b994be59fc4d9d23d8fad546deca3dbb2d29df7 (patch) | |
tree | 8c275395e88559a00aeb341a4555a8f5da3047b1 /module/system/vm/assembler.scm | |
parent | 449f50dd84a081aea16ef678e32bf37abe429ff6 (diff) | |
download | guile-8b994be59fc4d9d23d8fad546deca3dbb2d29df7.tar.gz |
CSE computes online map of constant values, uses it to fold branches
* module/language/cps/cse.scm (intset-intersect*): New helper. Use it
to replace manual uses.
(lset-unionq, meet-constants, adjoin-constant, set-constants): New
helpers.
(compute-consts): New function, to compute constants at each label,
using not only definitions but flow.
(<analysis>): Add consts to analysis.
(elide-predecessor, prune-branch, forward-branch, compute-out-edges)
(propagate-analysis, eliminate-common-subexpressions-in-fun): Plumb
consts through the algorithm.
(fold-branch): Fold an eq-constant? using the flow-determined constant
info. Finally allows compile-bytecode to fold to switch statements!
* module/language/cps/optimize.scm (optimize-first-order-cps): Move
branch chain optimization before the final CSE/DCE pass.
Diffstat (limited to 'module/system/vm/assembler.scm')
0 files changed, 0 insertions, 0 deletions