diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-09-28 06:54:37 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-09-28 06:54:37 -0700 |
commit | 21bd7298ac8110322db108f2c8be78adbb43b6b1 (patch) | |
tree | f696ea96c8bbdcf53b0d3796a139c1bc31da8364 /buf.c | |
parent | a06fdec52c8d436db925ec158d231627773f5bf9 (diff) | |
download | txr-21bd7298ac8110322db108f2c8be78adbb43b6b1.tar.gz txr-21bd7298ac8110322db108f2c8be78adbb43b6b1.tar.bz2 txr-21bd7298ac8110322db108f2c8be78adbb43b6b1.zip |
compiler: code clean-up in peephole optimizer.
* stdlib/optimize.tl (basic-blocks peephole-block): When we match a
branching instruction, including jend, we know that's the end of the
basic block. So there is no need to splice the (rest insns) into
the output; let's get rid of that. On the other hand, there is also no
need to have a specific pattern match for the end of the list such
as ((jmp @label)). This costs extra cycles to validate. Let's
consistently match these basic-block terminating instructions using
prefix patterns like ((jmp @label) . @nil)).
Diffstat (limited to 'buf.c')
0 files changed, 0 insertions, 0 deletions