avr-llvm / llvm

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

Give instruction aliases higher emit priorirty #86

Closed dylanmckay closed 9 years ago

dylanmckay commented 9 years ago

A large portion of AVR instructions are simply "aliases", or "special cases" of other instructions.

For example, cli is defined as bclr 7 (in `AVRInstrInfo.td):

def : InstAlias<"cli", (BCLRs 7)>; 

When calling llc and generating an assembly file, or llvm-mc -show-encoding, the instruction printer always prints out the least general instruction.

For example, cli -> bclr 7

This hurts readability greatly, and it is also making the unit tests more difficult because we must replace all instruction aliases by what they actually alias.