This is an archive of the discontinued LLVM Phabricator instance.

RegisterScavenger: Introduce backward() mode.
ClosedPublic

Authored by MatzeB on Jun 29 2016, 4:29 PM.

Details

Summary

This adds two pieces:

  • RegisterScavenger:::enterBasicBlockEnd() which behaves similar to enterBasicBlock() but starts tracking at the end of the basic block.
  • A RegisterScavenger::backward() method. It is subtly different from the existing unprocess() method which only considers uses with the kill flag set: If a value is dead at the end of a basic block with a last use inside the basic block, unprocess() will fail to mark it as live. However we cannot change/fix this behaviour because unprocess() needs to perform the exact reverse operation of forward().

Note: This is part of a patch series to make FrameLowering/PEI independent of kill flags. Patches building upon this are upcoming. I will not commit this until some of the patches depending on this are accepted.

Diff Detail

Repository
rL LLVM

Event Timeline

MatzeB updated this revision to Diff 62306.Jun 29 2016, 4:29 PM
MatzeB retitled this revision from to RegisterScavenger: Introduce backward() mode..
MatzeB updated this object.
MatzeB added a reviewer: qcolombet.
MatzeB set the repository for this revision to rL LLVM.
MatzeB added a subscriber: llvm-commits.
t.p.northover accepted this revision.Jul 6 2016, 10:17 AM
t.p.northover added a reviewer: t.p.northover.
t.p.northover added a subscriber: t.p.northover.

I think this looks reasonable, I'll take a look at the users next.

Tim.

This revision is now accepted and ready to land.Jul 6 2016, 10:17 AM
This revision was automatically updated to reflect the committed changes.