Don't skip splitSeparateComponents in eliminateDeadDefs for HoistSpillHelper::hoistAl...
authorWei Mi <wmi@google.com>
Fri, 15 Apr 2016 23:16:44 +0000 (23:16 +0000)
committerWei Mi <wmi@google.com>
Fri, 15 Apr 2016 23:16:44 +0000 (23:16 +0000)
commit963f2df4d2aaa5e76aa6c0bc52f3de66af7be8c4
tree6acd7dacd2443a1ff01f9c257c82bed1c9d83ebe
parent6d09f993c266398d9bcfee6d71a03132167a01cd
Don't skip splitSeparateComponents in eliminateDeadDefs for HoistSpillHelper::hoistAllSpills.

Because HoistSpillHelper::hoistAllSpills is called in postOptimization, before the
patch we didn't want LiveRangeEdit::eliminateDeadDefs to call splitSeparateComponents
and generate unassigned new vregs. 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.

In addition, some code reorganization to make class HoistSpillHelper privately inheriting
from LiveRangeEdit::Delegate possible. This is to be consistent with class RAGreedy and
class RegisterCoalescer.

Differential Revision: http://reviews.llvm.org/D19142

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