This is an archive of the discontinued LLVM Phabricator instance.

[AVR] Add the pseudo instruction expansion pass
ClosedPublic

Authored by dylanmckay on Nov 12 2016, 4:18 AM.

Details

Summary

A lot of the pseudo instructions are required because LLVM assumes that
all integers of the same size as the pointer size are legal. This means
that it will not currently expand 16-bit instructions to their 8-bit
variants because it thinks 16-bit types are legal for the operations.

This also adds all of the CodeGen tests that required the pass to run.

Event Timeline

dylanmckay updated this revision to Diff 77716.Nov 12 2016, 4:18 AM
dylanmckay retitled this revision from to [AVR] Add the pseudo instruction expansion pass.
dylanmckay updated this object.
dylanmckay added reviewers: kparzysz, arsenm.
dylanmckay added a subscriber: llvm-commits.
kparzysz added inline comments.Nov 14 2016, 8:57 AM
lib/Target/AVR/AVRExpandPseudoInsts.cpp
114

Space between "for" and "(".

127

Space after "while".

156

This formatting occurs in several places---please expand it into separate lines.

256

You can just use the actual opcode here (and below, for OpHi), since you are expanding a specific opcode.

697

This line is too long.

702

Same here.

728

Please limit lines to 80 columns.

1148

Please use llvm_unreachable instead of assert(0).

kparzysz added inline comments.Nov 14 2016, 8:58 AM
lib/Target/AVR/AVRExpandPseudoInsts.cpp
256

This is really your call. If you think this is clear, you can keep it. I tried to delete this comment, but phabricator would hang when I did it.

dylanmckay marked 9 inline comments as done.

Code style fixes

kparzysz accepted this revision.Nov 16 2016, 7:40 AM
kparzysz edited edge metadata.
This revision is now accepted and ready to land.Nov 16 2016, 7:40 AM
This revision was automatically updated to reflect the committed changes.