diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2025-06-16 22:51:45 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2025-06-16 22:51:45 -0700 |
commit | e10d748899c821a8ceba411fe24745023dae602b (patch) | |
tree | 57cb7cdabb6025658e4df312f15c2138bd213bf2 /mpi-patches/mpi-to-double | |
parent | d06ffa36d79963dd084628d24a455517bb333a92 (diff) | |
download | txr-e10d748899c821a8ceba411fe24745023dae602b.tar.gz txr-e10d748899c821a8ceba411fe24745023dae602b.tar.bz2 txr-e10d748899c821a8ceba411fe24745023dae602b.zip |
compiler: remove loop-nest counter hack
The loop-nest counter in the compiler context is positive
whenever a loop is being compiled. This informs the
eliminate-frame function that a variable-binding block
can be executed multiple times, and so when variables
are converted to registers, those registers have to be
explicitly initialized to nil (in order to bring about
the semantics of fresh lexical variables being nil).
In this patch, we get rid of the counter and just always
generate the zero-initializations. They get well optimized
away. The code is usually the same. Sometimes four
bytes longer or shorter. I'm noticing smaller frame sizes
across the board due to registers being eliminated.
* stdlib/compiler.tl (compiler): Remove loop-nest slot.
(compiler eliminate-frame): Unconditionally emit the
mov instructions which set all the new tregs to
nil (i.e. copy the value of nil register (t 0)).
(comp-for): Do not increment and decrement the loop
count.
Diffstat (limited to 'mpi-patches/mpi-to-double')
0 files changed, 0 insertions, 0 deletions