summaryrefslogtreecommitdiffstats
path: root/stdlib/constfun.tl
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2023-04-17 15:40:11 -0700
committerKaz Kylheku <kaz@kylheku.com>2023-04-17 15:40:11 -0700
commit1cd7fb50f4a68b39c6715203bc7e92808188d7c0 (patch)
tree1258777aada4a72233fdc7a45f2867b07513ab47 /stdlib/constfun.tl
parent559e2cace50b534d7591d7bb6f0ba68afe09dc68 (diff)
downloadtxr-1cd7fb50f4a68b39c6715203bc7e92808188d7c0.tar.gz
txr-1cd7fb50f4a68b39c6715203bc7e92808188d7c0.tar.bz2
txr-1cd7fb50f4a68b39c6715203bc7e92808188d7c0.zip
compiler: move peephole pattern and remove condition.
* stdlib/optimize.tl (basic-blocks do-peephole-block): Remove the local function only-locally-used-treg. This is unnecessary because the optimization is valid even if the treg is used in downstream basic blocks. It was necessary previously in the old version of this optimization in which we deleted the first instruction which sets the treg's value. We are now depending on it being identified as a dead register. Also, moving the rule to the end. The reason is that there are cases when the pattern matches, but it returns insns. That causes the rewrite macro to march down to the next instruction, skipping other patterns. This could be bad, unless the pattern is the last one tried before the @else fallback.
Diffstat (limited to 'stdlib/constfun.tl')
0 files changed, 0 insertions, 0 deletions