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)
commit0d87d635d772a452640b89784d76878640af672d
tree9ad93db994bf30fd279b6bd90ffa01a80ae969f0
parent099d569fc1fffd06a9a599255a24c68c3582b625
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244439 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/CalcSpillWeights.h
lib/CodeGen/CalcSpillWeights.cpp
lib/CodeGen/LiveRangeEdit.cpp
lib/CodeGen/RegAllocBasic.cpp
lib/CodeGen/RegAllocGreedy.cpp
lib/CodeGen/RegAllocPBQP.cpp
test/CodeGen/X86/pr24139.ll [new file with mode: 0644]