[PATCH] D23097: RegScavenging: Add scavengeRegisterBackwards()

Matthias Braun via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 2 17:47:32 PDT 2016


MatzeB created this revision.
MatzeB added reviewers: hfinkel, kbarton, uweigand, nemanjai.
MatzeB added a subscriber: llvm-commits.
MatzeB set the repository for this revision to rL LLVM.
Herald added a reviewer: tstellarAMD.
Herald added subscribers: nemanjai, mcrosier, dsanders, qcolombet.

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.

Repository:
  rL LLVM

https://reviews.llvm.org/D23097

Files:
  include/llvm/CodeGen/RegisterScavenging.h
  lib/CodeGen/PrologEpilogInserter.cpp
  lib/CodeGen/RegisterScavenging.cpp
  test/CodeGen/AMDGPU/captured-frame-index.ll
  test/CodeGen/Mips/emergency-spill-slot-near-fp.ll
  test/CodeGen/PowerPC/dyn-alloca-aligned.ll
  test/CodeGen/SystemZ/frame-13.ll
  test/CodeGen/SystemZ/frame-14.ll
  test/CodeGen/SystemZ/frame-15.ll
  test/CodeGen/SystemZ/frame-16.ll
  test/CodeGen/Thumb/large-stack.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23097.66599.patch
Type: text/x-patch
Size: 29677 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160803/924db73b/attachment.bin>


More information about the llvm-commits mailing list