avr-llvm / llvm

[MERGED UPSTREAM] AVR backend for the LLVM compiler library
220 stars 21 forks source link

AVRInstrInfo: Factor Z register into it's own register class #120

Closed agnat closed 9 years ago

agnat commented 9 years ago

Some instructions take an explicit Z register argument. By modeling this as a register class containing only the Z register we help the parser to cleanly match this syntax.

I think this also enables us to write isel patterns for these instructions. Not sure how important that is, though...

@dylanmckay review plz.

dylanmckay commented 9 years ago

This is nice - it takes away a special case.

dylanmckay commented 9 years ago

I think this also enables us to write isel patterns for these instructions. Not sure how important that is, though...

I think that is a great win. There is more than likely several opportunities to optimize an instruction pattern with one of the faster instructions which only take the Z register.