Finally, all targets are enabling multiple regalloc hints, so the hook to disable this can now be removed.
NFC.
Paths
| Differential D52316
[TargetRegisterInfo] Remove temporary hook enableMultipleCopyHints() ClosedPublic Authored by jonpa on Sep 20 2018, 10:19 AM.
Details
Summary Finally, all targets are enabling multiple regalloc hints, so the hook to disable this can now be removed. NFC.
Diff Detail Event TimelineComment Actions Does this need a comment in the 8.00 release notes? What about RISVC/WASM since it looks like they're about to lose their experimental status? Comment Actions This probably needs to wait until the compile time regressions have been addressed: https://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20180924/590785.html Comment Actions I think the recent discoveries of compile time regressions were due to multiple copy hints being added for the same register many times. The CopyHint is inserted into a set, and I must have assumed that the hint weight would most likely be the same for the same physical register, and therefore there should only be one CopyHint per reg. This was not the case in the test case provided by Jonathan where a lot of hints were added, since this happens even with just a tiny difference in the float spill weight. This test case seemed to have thousands of small intervals for some phys regs, so in this case that meant a lot of hints for that register. I updated the patch to make sure that the sorted set of CopyHints only has one hint per register. This is achieved by checking at insertion if the register already had a hint, and if so, remove that hint and insert the new one, if the new hint has a greater weight. This luckily seems to be completely NFC, so all tests are still passing. In fact, the temporary hack (which this patch removes) really should be removed since it is now clear that its ordering of the hints with the temporary CopyHintOrder++ method (for targets that do not enable), is also getting a lot of duplicated hints for the same register. Possibly, I could first handle this issue with a patch without removing the target hook if there is any reason to do so. It seems however this is "general goodness" as Quentin pointed out earlier, so there shouldn't be any target desiring to not enable, right (in-trunk or not)? Comment Actions
I patched this in, and I'm no longer seeing compile time regressions at head. Comment Actions @jonpa Please can you split this patch into 2 stages (the regression fix and the removal of enableMultipleCopyHints()). Comment Actions
First part for the regression fix is now here: https://reviews.llvm.org/D52826 The actual handling is somewhat different now and should this time be correct. This revision is now accepted and ready to land.Oct 5 2018, 7:07 AM
Revision Contents
Diff 166325 include/llvm/CodeGen/TargetRegisterInfo.h
lib/CodeGen/CalcSpillWeights.cpp
lib/Target/AArch64/AArch64RegisterInfo.h
lib/Target/AMDGPU/AMDGPURegisterInfo.h
lib/Target/ARM/ARMBaseRegisterInfo.h
lib/Target/BPF/BPFRegisterInfo.h
lib/Target/Hexagon/HexagonRegisterInfo.h
lib/Target/Mips/MipsRegisterInfo.h
lib/Target/PowerPC/PPCRegisterInfo.h
lib/Target/Sparc/SparcRegisterInfo.h
lib/Target/SystemZ/SystemZRegisterInfo.h
lib/Target/X86/X86RegisterInfo.h
lib/Target/XCore/XCoreRegisterInfo.h
|