summaryrefslogtreecommitdiffstats
path: root/mpi-patches/mpi-to-double
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2025-06-17 23:49:04 -0700
committerKaz Kylheku <kaz@kylheku.com>2025-06-17 23:49:04 -0700
commitb6479c689570ae3df42a45da6d96fc679a5925f3 (patch)
tree59b4a34cdfc80222626aba8ef5911c53d2ffb458 /mpi-patches/mpi-to-double
parent3dcd2869946e25041957e312fc3598a4f4639cf3 (diff)
downloadtxr-b6479c689570ae3df42a45da6d96fc679a5925f3.tar.gz
txr-b6479c689570ae3df42a45da6d96fc679a5925f3.tar.bz2
txr-b6479c689570ae3df42a45da6d96fc679a5925f3.zip
compiler: eliminate wasteful treg nulling.
* stdlib/optimize.tl (live-info): New slot, clobbered. (basic-block): New slot, cycle. Struct also inherits clobbered slot from live-info. (basic-block print): Print clobbered and cycle. (basic-blocks local-liveness): Calculate clobbered for each instruction and from that for the basic block. (basic-blocks identify-cycle-members): New method. Discovers which basic blocks are part of any cycle, and identifies them by setting the new cycle slot to t. (basic-blocks do-peephole-block): New local functions here for determining whether a register has been clobbered before the first instruction, either in the same basic block or any ancestors. Only works when the block is not part of a cycle. We add a peephole pattern matching move instructions that set tregs to (t 0)/nil. When we are not in a cycle block, and the treg has not previously been clobbered, we know it is clean: it still has the initial nil value set by the VM and we can remove the instruction. * stdlib/compiler.tl (compiler optimize): Call the identify-cycle-members method before peephole.
Diffstat (limited to 'mpi-patches/mpi-to-double')
0 files changed, 0 insertions, 0 deletions