This is an archive of the discontinued LLVM Phabricator instance.

[AVR] Use the register scavenger when expanding 'LDDW' instructions
ClosedPublic

Authored by dylanmckay on Dec 8 2016, 12:31 AM.

Event Timeline

dylanmckay updated this revision to Diff 80723.Dec 8 2016, 12:31 AM
dylanmckay retitled this revision from to [AVR] Use the register scavenger when expanding 'LDDW' instructions.
dylanmckay updated this object.
dylanmckay added a reviewer: asl.
dylanmckay added a subscriber: llvm-commits.
asl added inline comments.Dec 8 2016, 12:40 AM
lib/Target/AVR/AVRExpandPseudoInsts.cpp
691

What if the register pressure is so high that no register is available? I'd suggest at least to insert an assert here. Note that Scavenger has a way to deal with this issue via spilling. You'd need to have a spare slot for this though.

dylanmckay updated this revision to Diff 80867.Dec 8 2016, 9:41 PM

Add an assertion to ensure we don't use '-1' as a VReg

This revision was automatically updated to reflect the committed changes.