This is an archive of the discontinued LLVM Phabricator instance.

Fix RegScavenger::unprocess
ClosedPublic

Authored by greened on Jan 17 2018, 2:50 PM.

Details

Summary

RegScavenger::unprocess walks backward, so it should undo the effects of defs before undoing effects of kills. Previously it did things in the opposite order, leaving a register apparently unused (dead) in the case where an instruction both used (killed) and defined a register.

Diff Detail

Repository
rL LLVM

Event Timeline

greened created this revision.Jan 17 2018, 2:50 PM
MatzeB accepted this revision.EditedJan 17 2018, 3:05 PM

LGTM.

That said the medium to short term plan is to get rid of kill flags, which means RegisterScavenger::forward() and RegisterScavenger::unprocess() will no longer work (or at least give you conservative results which aren't very useful). I'd recommend to switch your code to LiveRegUnits/LivePhysRegs (in case you don't need emergency spilling) or RegisterScavenger::backward() instead!

This revision is now accepted and ready to land.Jan 17 2018, 3:05 PM

Thanks for the heads-up. I will start using backward().

Did this ever land? If not how do I get it committed?

I assume you don't have commit access?
Usually it's the author of the patch that commits it unless he doesn't have commit access yet in which case it's upon the reviewers.

I had commit access at one time but I don't know if I still do. If I do, I guess I can commit via svn but how do I get all the nice metadata in the commit log like "Differential Revision?" Do people just add it manually?

This revision was automatically updated to reflect the committed changes.

I add it by hand. I think arcanist will do that for you automatically, but I've never used it.