Register allocator: add condition to hoist a spill to outer loop.
authorManman Ren <manman.ren@gmail.com>
Fri, 21 Mar 2014 21:46:24 +0000 (21:46 +0000)
committerManman Ren <manman.ren@gmail.com>
Fri, 21 Mar 2014 21:46:24 +0000 (21:46 +0000)
commit8dbd561a886fee0ab8565567bfef6b518769e87f
tree1c4f1cbc518f80bf0c7ca9bd6c218dc51968201f
parentc1011e635c114962452c60da197294080e5dfe2c
Register allocator: add condition to hoist a spill to outer loop.

We make sure a spill is not hoisted to a hotter outer loop by adding
a condition. Hoist a spill to outer loop if there are multiple dependents
(it can be beneficial if more than one dependents are hoisted) or
if DepSV (the hoisting source) is hotter than SV (the hoisting destination).

rdar://16268194

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204522 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/InlineSpiller.cpp
test/CodeGen/X86/ragreedy-hoist-spill.ll [new file with mode: 0644]