Skip to content

Commit 3cc3960

Browse files
committed
[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
1 parent 9f4f012 commit 3cc3960

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

llvm/lib/Target/X86/X86ScheduleZnver3.td

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ def Znver3Model : SchedMachineModel {
3535
// The maximum capacity of the op cache is 4K ops.
3636
// Agner, 22.5 µop cache
3737
// The size of the µop cache is big enough for holding most critical loops.
38-
let LoopMicroOpBufferSize = 4096;
38+
// FIXME: PR50384: IndVars has quadradic complexity, with large values here
39+
// the compilation of certain loops ends up taking way too long.
40+
// let LoopMicroOpBufferSize = 4096;
41+
let LoopMicroOpBufferSize = 256;
3942
// AMD SOG 19h, 2.6.2 L1 Data Cache
4043
// The L1 data cache has a 4- or 5- cycle integer load-to-use latency.
4144
// AMD SOG 19h, 2.12 L1 Data Cache

0 commit comments

Comments
 (0)