[all-commits] [llvm/llvm-project] 153359: [AVR] Remove regalloc workaround for LDDWRdPtrQ
Ayke via All-commits
all-commits at lists.llvm.org
Sun Jan 23 08:08:25 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 153359180a9d5a6cea3985db5d3396218dc6252d
https://github.com/llvm/llvm-project/commit/153359180a9d5a6cea3985db5d3396218dc6252d
Author: Ayke van Laethem <aykevanlaethem at gmail.com>
Date: 2022-01-23 (Sun, 23 Jan 2022)
Changed paths:
M llvm/lib/Target/AVR/AVRInstrInfo.td
M llvm/lib/Target/AVR/AVRRegisterInfo.td
M llvm/test/CodeGen/AVR/lpmx.ll
Log Message:
-----------
[AVR] Remove regalloc workaround for LDDWRdPtrQ
Background: https://github.com/avr-rust/rust-legacy-fork/issues/126
In short, this workaround was introduced to fix a "ran out of registers
during regalloc" issue. The root cause has since been fixed in
https://reviews.llvm.org/D54218 so this workaround can be removed.
There is one test that changes a little bit, removing a single
instruction. I also compiled compiler-rt before and after this patch but
didn't see a difference. So presumably the impact is very low. Still,
it's nice to be able to remove such a workaround.
Differential Revision: https://reviews.llvm.org/D117831
Commit: 116ab78694dd2ad903c3fb101d48e01855282bf8
https://github.com/llvm/llvm-project/commit/116ab78694dd2ad903c3fb101d48e01855282bf8
Author: Ayke van Laethem <aykevanlaethem at gmail.com>
Date: 2022-01-23 (Sun, 23 Jan 2022)
Changed paths:
M llvm/lib/Target/AVR/AVRISelLowering.cpp
M llvm/lib/Target/AVR/AVRISelLowering.h
M llvm/lib/Target/AVR/AVRInstrInfo.td
M llvm/test/CodeGen/AVR/smul-with-overflow.ll
M llvm/test/CodeGen/AVR/store-undef.ll
M llvm/test/CodeGen/AVR/umul-with-overflow.ll
Log Message:
-----------
[AVR] Make use of the constant value 0 in R1
The register R1 is defined to have the constant value 0 in the avr-gcc
calling convention (which we follow). Unfortunately, we don't really
make use of it. This patch replaces `LDI 0` instructions with a copy
from R1.
This reduces code size: my AVR build of compiler-rt goes from 50660 to
50240 bytes of code size, which is a 0.8% reduction. Presumably it will
also improve execution speed, although I didn't measure this.
Differential Revision: https://reviews.llvm.org/D117425
Compare: https://github.com/llvm/llvm-project/compare/eb3f20e8fa4b...116ab78694dd
More information about the All-commits
mailing list