Page MenuHomePhabricator

RegScavenging: Add scavengeRegisterBackwards()
ClosedPublic

Authored by MatzeB on Aug 2 2016, 5:47 PM.

Details

Summary

This is a rebased version of r276044 / http://reviews.llvm.org/D21885 to current trunk. I had to initially revert, because the commit triggered failures on powerpc (http://lab.llvm.org:8011/builders/clang-ppc64le-linux-lnt/builds/3648).

I need help debugging this! The failing tests are

MultiSource/Benchmarks/mediabench/gsm/toast
SingleSource/Benchmarks/Adobe-C++/loop_unroll.cpp

in the test-suite. Given that scavenging happens on all targets in many situations and those two tests on powerpc is the only thing that breaks, I suspect that it is a problem with the commit itself but some pre-existing problem getting triggered, I have no idea what though.
I checked my commit multiple times and dived into assembly diffs with/without this patch without seeing the problem. I need someone with actual access to a Power system to debug this (at least to the point where he can tell me which instructions are generated wrong and why they are wrong).

Original commit message:

This is a variant of scavengeRegister() that works for
enterBasicBlockEnd()/backward(). The benefit of the backward mode is
that it is not affected by incomplete kill flags.

This patch also changes
PrologEpilogInserter::doScavengeFrameVirtualRegs() to use the register
scavenger in backwards mode.

Diff Detail

Repository
rL LLVM

Event Timeline

MatzeB updated this revision to Diff 66599.Aug 2 2016, 5:47 PM
MatzeB retitled this revision from to RegScavenging: Add scavengeRegisterBackwards().
MatzeB updated this object.
MatzeB added reviewers: hfinkel, kbarton, uweigand, nemanjai.
MatzeB set the repository for this revision to rL LLVM.
MatzeB added a subscriber: llvm-commits.
amehsan added a subscriber: amehsan.Aug 3 2016, 2:56 PM
uweigand edited edge metadata.Aug 4 2016, 8:46 AM

I haven't looked at the PowerPC failures. However, the changes you're doing to the SystemZ test cases seem already incorrect.

Those tests all verify an instruction sequence that originally looks like:

spill REGISTER to the stack
def REGISTER
use REGISTER
restore REGISTER from stack

You change them to do instead:

spill REGISTER to the stack
def REGISTER
restore REGISTER from stack
use REGISTER

which means of course that the use now gets the wrong register contents ...

Am I missing something here?

kbarton edited edge metadata.Aug 31 2016, 10:03 AM

Do you still have problems on PPC?
Did you get access to a Power system so you can debug?

nemanjai edited edge metadata.Apr 9 2017, 1:27 PM

Is this patch dead in the water now? Is there a replacement? Should this be abandoned/closed?

Is this patch dead in the water now? Is there a replacement? Should this be abandoned/closed?

I'd really like to move forward with this, but am still stuck debugging the ppc bot issues. I tried with the login I was provided with but couldn't reproduce the bot problem there. I did not find the time to dig into why I couldn't reproduce, and still feel extremely uncomfortable debugging for a platform I am not familiar with.

Is this patch dead in the water now? Is there a replacement? Should this be abandoned/closed?

I'd really like to move forward with this, but am still stuck debugging the ppc bot issues. I tried with the login I was provided with but couldn't reproduce the bot problem there. I did not find the time to dig into why I couldn't reproduce, and still feel extremely uncomfortable debugging for a platform I am not familiar with.

Of course given the fact that this is just improving our infrastructure but not adding any new features or fixing bugs, I can't really find the time lately to work on it and there is zero progress...

MatzeB accepted this revision.Sep 26 2017, 2:22 PM
This revision is now accepted and ready to land.Sep 26 2017, 2:22 PM
MatzeB closed this revision.Sep 26 2017, 2:23 PM

This landed a while ago in r305625 (as part of D21885)