Trace copies when checking for rematerializability in spill weight calculation
authorRobert Lougher <rob.lougher@gmail.com>
Mon, 10 Aug 2015 11:59:44 +0000 (11:59 +0000)
committerRobert Lougher <rob.lougher@gmail.com>
Mon, 10 Aug 2015 11:59:44 +0000 (11:59 +0000)
commit11a44b78a33be4bbc95ede7cabf53202de9e82ce
treee0057462963bc999e04239fc39c2b4b8edab2bba
parenta0e02410e14047eb4a0a3068bf104084dd774b3a
Trace copies when checking for rematerializability in spill weight calculation

PR24139 contains an analysis of poor register allocation. One of the findings
was that when calculating the spill weight, a rematerializable interval once
split is no longer rematerializable. This is because the isRematerializable
check in CalcSpillWeights.cpp does not follow the copies introduced by live
range splitting (after splitting, the live interval register definition is a
copy which is not rematerializable).

Reviewers: qcolombet

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

llvm-svn: 244439
llvm/include/llvm/CodeGen/CalcSpillWeights.h
llvm/lib/CodeGen/CalcSpillWeights.cpp
llvm/lib/CodeGen/LiveRangeEdit.cpp
llvm/lib/CodeGen/RegAllocBasic.cpp
llvm/lib/CodeGen/RegAllocGreedy.cpp
llvm/lib/CodeGen/RegAllocPBQP.cpp
llvm/test/CodeGen/X86/pr24139.ll [new file with mode: 0644]