[PATCH] D19142: Don't skip splitSeparateComponents in eliminateDeadDefs

Wei Mi via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 14 17:49:20 PDT 2016


wmi created this revision.
wmi added a reviewer: qcolombet.
wmi added subscribers: llvm-commits, davidxl.
wmi set the repository for this revision to rL LLVM.
Herald added subscribers: qcolombet, MatzeB.

This patch is to fix a bug reported here: http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20160411/347420.html

Because HoistSpillHelper::hoistAllSpills is called in postOptimization, we don't want LiveRangeEdit::eliminateDeadDefs to generate unassigned new vregs. That is why I set NoSplit flag to early return from LiveRangeEdit::eliminateDeadDefs. However, skipping splitSeparateComponents will make verify-machineinstrs unhappy, so I remove the early return, and use HoistSpillHelper::LRE_DidCloneVirtReg to assign physreg/stackslot for those new vregs.  I know those new vregs should have the same physreg/stackslot as the old vreg which new vregs are splitted from.

Some code reorganization to make class HoistSpillHelper private inheriting from LiveRangeEdit::Delegate possible. This is to be consistent with class RAGreedy and class RegisterCoalescer.

Thanks,
Wei.



Repository:
  rL LLVM

http://reviews.llvm.org/D19142

Files:
  include/llvm/CodeGen/LiveRangeEdit.h
  lib/CodeGen/InlineSpiller.cpp
  lib/CodeGen/LiveRangeEdit.cpp
  test/CodeGen/X86/interval-update-remat.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19142.53823.patch
Type: text/x-patch
Size: 5343 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160415/af9b07ed/attachment.bin>


More information about the llvm-commits mailing list