]> granicus.if.org Git - llvm/commit
[RegAlloc] Avoid compile time regression with multiple copy hints.
authorJonas Paulsson <paulsson@linux.vnet.ibm.com>
Mon, 11 Mar 2019 19:00:37 +0000 (19:00 +0000)
committerJonas Paulsson <paulsson@linux.vnet.ibm.com>
Mon, 11 Mar 2019 19:00:37 +0000 (19:00 +0000)
commite3834c1b198f52b49755b4c57d257afa57baabde
tree44a53b42d03293d5007fd0d0cc9268fe7bce6bfa
parentb11ac3d4e1a18da92bc2a306fb1ecb323fc12f28
[RegAlloc]  Avoid compile time regression with multiple copy hints.

As a fix for https://bugs.llvm.org/show_bug.cgi?id=40986 ("excessive compile
time building opencollada"), this patch makes sure that no phys reg is hinted
more than once from getRegAllocationHints().

This handles the case were many virtual registers are assigned to the same
physreg. The previous compile time fix (r343686) in weightCalcHelper() only
made sure that physical/virtual registers are passed no more than once to
addRegAllocationHint().

Review: Dimitry Andric, Quentin Colombet
https://reviews.llvm.org/D59201

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@355854 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/TargetRegisterInfo.cpp
test/CodeGen/X86/regalloc-copy-hints.mir [new file with mode: 0644]