OSDN Git Service

Hoist spills when the same value is known to be in less loopy sibling registers.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Fri, 18 Mar 2011 04:23:06 +0000 (04:23 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Fri, 18 Mar 2011 04:23:06 +0000 (04:23 +0000)
commit2a72bfa1b1a634ef6c5aa866cac1c0afda4534e4
tree66d1108e44a8df64075bb3dce7d97dd5213c8c74
parenta26f36c597997894974eeecdde5caa22a6d801e8
Hoist spills when the same value is known to be in less loopy sibling registers.

Stack slot real estate is virtually free compared to registers, so it is
advantageous to spill earlier even though the same value is now kept in both a
register and a stack slot.

Also eliminate redundant spills by extending the stack slot live range
underneath reloaded registers.

This can trigger a dead code elimination, removing copies and even reloads that
were only feeding spills.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127868 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/InlineSpiller.cpp