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.

Diff Detail

Repository
rL LLVM

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
113 ↗(On Diff #77716)

Space between "for" and "(".

126 ↗(On Diff #77716)

Space after "while".

155 ↗(On Diff #77716)

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

255 ↗(On Diff #77716)

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

696 ↗(On Diff #77716)

This line is too long.

701 ↗(On Diff #77716)

Same here.

727 ↗(On Diff #77716)

Please limit lines to 80 columns.

1147 ↗(On Diff #77716)

Please use llvm_unreachable instead of assert(0).

kparzysz added inline comments.Nov 14 2016, 8:58 AM
lib/Target/AVR/AVRExpandPseudoInsts.cpp
255 ↗(On Diff #77716)

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.