• Ayke van Laethem's avatar
    [AVR] Make use of the constant value 0 in R1 · 116ab786
    Ayke van Laethem authored
    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
    116ab786
AVRISelLowering.h 7.7 KB