diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2018-03-20 06:30:57 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2018-03-20 06:30:57 -0700 |
commit | 46041496359dc5738c467815d4868549d3550e40 (patch) | |
tree | 404c9056b36d7832e8746aa67a08d87e0a2d2fe6 /regex.c | |
parent | 46c773ac117c9d2502160b929c87d1611c65c718 (diff) | |
download | txr-46041496359dc5738c467815d4868549d3550e40.tar.gz txr-46041496359dc5738c467815d4868549d3550e40.tar.bz2 txr-46041496359dc5738c467815d4868549d3550e40.zip |
compiler: factor recurring conditional mov.
Anyway, this kind of thing should really be (and will be)
taken care of peephole optimization. But for now, it's nice to
get somewhat better code without doing too much work.
* share/txr/stdlib/compiler.tl (compiler comp-setq, compiler
comp-cond, compiler cond-if, compiler cond-let, compiler
comp-lambda, compiler comp-for): Replace occurrences of
(if (nequal reg1 reg2) ^((mov ,reg ,reg2))) with call to
maybe-mov.
(maybe-mov): New function.
Diffstat (limited to 'regex.c')
0 files changed, 0 insertions, 0 deletions