[PATCH] D19486: Keep dead inst copy from being deleted only when the inst is rematerializable

Wei Mi via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 25 09:52:42 PDT 2016


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

The patch is to fix the two bugs reported here: http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20160418/349985.html

The fix is to allow the dead insts kept in DeadRemat only when they are rematerializable. Because isReallyTriviallyReMaterializableGeneric put many limits on rematerializable instructions, this fix can prevent instructions with tied virtual operands and instructions with virtual register uses from being kept in DeadRemat, so as to fix the problems in the report.

Also add the check "DeadRemat != nullptr" in the condition to put the dead insts in DeadRemat. Because for RegisterCoalescer, its DeadRemat is nullptr, and we want dead instructions in this phase to be eliminated normally.



Repository:
  rL LLVM

http://reviews.llvm.org/D19486

Files:
  include/llvm/CodeGen/LiveRangeEdit.h
  lib/CodeGen/InlineSpiller.cpp
  lib/CodeGen/LiveRangeEdit.cpp
  lib/CodeGen/RegAllocGreedy.cpp
  lib/CodeGen/SplitKit.cpp
  lib/CodeGen/SplitKit.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19486.54870.patch
Type: text/x-patch
Size: 7737 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160425/b3d81cb0/attachment.bin>


More information about the llvm-commits mailing list