[llvm] 3cc3960 - [X86] AMD Zen 3: cap LoopMicroOpBufferSize to workaround PR50384 (quadratic IndVars runtime)
Roman Lebedev via llvm-commits
llvm-commits at lists.llvm.org
Tue May 18 05:57:24 PDT 2021
Author: Roman Lebedev
Date: 2021-05-18T15:56:57+03:00
New Revision: 3cc39607668d6f942458a37e7a9111294d9373bd
URL: https://github.com/llvm/llvm-project/commit/3cc39607668d6f942458a37e7a9111294d9373bd
DIFF: https://github.com/llvm/llvm-project/commit/3cc39607668d6f942458a37e7a9111294d9373bd.diff
LOG: [X86] AMD Zen 3: cap LoopMicroOpBufferSize to workaround PR50384 (quadratic IndVars runtime)
While i would like to keep the right value here,
i would also like to be able to actually compile
e.g. vanilla test-suite.
256 is a pretty random guess, it should be pretty good enough
for serious loops, but small enough to result in tolerant
compile times for certain edge cases.
https://bugs.llvm.org/show_bug.cgi?id=50384
Added:
Modified:
llvm/lib/Target/X86/X86ScheduleZnver3.td
Removed:
################################################################################
diff --git a/llvm/lib/Target/X86/X86ScheduleZnver3.td b/llvm/lib/Target/X86/X86ScheduleZnver3.td
index 84aee73bad63..cc0a67c2c287 100644
--- a/llvm/lib/Target/X86/X86ScheduleZnver3.td
+++ b/llvm/lib/Target/X86/X86ScheduleZnver3.td
@@ -35,7 +35,10 @@ def Znver3Model : SchedMachineModel {
// The maximum capacity of the op cache is 4K ops.
// Agner, 22.5 µop cache
// The size of the µop cache is big enough for holding most critical loops.
- let LoopMicroOpBufferSize = 4096;
+ // FIXME: PR50384: IndVars has quadradic complexity, with large values here
+ // the compilation of certain loops ends up taking way too long.
+ // let LoopMicroOpBufferSize = 4096;
+ let LoopMicroOpBufferSize = 256;
// AMD SOG 19h, 2.6.2 L1 Data Cache
// The L1 data cache has a 4- or 5- cycle integer load-to-use latency.
// AMD SOG 19h, 2.12 L1 Data Cache
More information about the llvm-commits
mailing list