[PATCH] D41585: [Greedy RegAlloc] Take into account the cost of local intervals when selecting split candidate.

Marina Yatsina via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 26 09:47:54 PST 2017


myatsina created this revision.
myatsina added reviewers: qcolombet, MatzeB, wmi, stoklund.

When selecting a split candidate for region splitting, the register allocator tries to predict which candidate will have the cheapest spill cost.
Global splitting may cause the creation of local intervals, and they might spill.

This patch makes RA take into account the spill cost of local split intervals in use blocks (we already take into account the spill cost in through blocks).
A flag ("-condsider-local-interval-cost") controls weather we do this advanced cost calculation (it's on by default for X86 target, off for the rest).


Repository:
  rL LLVM

https://reviews.llvm.org/D41585

Files:
  include/llvm/CodeGen/LiveRegMatrix.h
  lib/CodeGen/LiveRegMatrix.cpp
  lib/CodeGen/RegAllocGreedy.cpp
  test/CodeGen/X86/bug26810.ll
  test/CodeGen/X86/regalloc-advanced-split-cost.ll
  test/CodeGen/X86/sad.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41585.128178.patch
Type: text/x-patch
Size: 305406 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171226/9d261bdd/attachment-0001.bin>


More information about the llvm-commits mailing list