This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Attempt to make Tail predication / RDA more resilient to empty blocks
ClosedPublic

Authored by dmgreen on Oct 6 2020, 2:05 PM.

Details

Summary

There are a number of places in RDA where we assume the block will not be empty. This isn't necessarily true for tail predicated loops where we have removed instructions. This attempt to make the pass more resilient to empty blocks, not casting pointers to machine instructions where they would be invalid.

The test contains a case that was previously failing, but recently been hidden on trunk. It contains an empty block to begin with to show a similar error.

Diff Detail

Event Timeline

dmgreen created this revision.Oct 6 2020, 2:05 PM
dmgreen requested review of this revision.Oct 6 2020, 2:05 PM
samtebbs accepted this revision.Oct 7 2020, 4:04 AM

Looks good to me, thanks Dave.

This revision is now accepted and ready to land.Oct 7 2020, 4:04 AM
SjoerdMeijer added inline comments.Oct 7 2020, 4:10 AM
llvm/test/CodeGen/Thumb2/LowOverheadLoops/emptyblock.mir
9

Nit: this is a very big test for checking an empty block. If possible, can you reduce this before committing.