[PATCH] D59201: [RegAllocHints] Avoid compile time regression

Jonas Paulsson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 10 17:58:11 PDT 2019


jonpa created this revision.
jonpa added reviewers: dim, RKSimon.
Herald added subscribers: jdoerfert, qcolombet, MatzeB.

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().

I am not sure if perhaps this check (with a HintedRegs set) is actually only needed in TargetRegisterInfo::getRegAllocationHints(), so that the one in weightCalcHelper() should be removed?


https://reviews.llvm.org/D59201

Files:
  lib/CodeGen/TargetRegisterInfo.cpp
  test/CodeGen/X86/regalloc-copy-hints.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59201.190034.patch
Type: text/x-patch
Size: 27576 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190311/63b6e695/attachment.bin>


More information about the llvm-commits mailing list