Skip to content

Commit

Permalink
[X86] AMD Zen 3: cap LoopMicroOpBufferSize to workaround PR50384 (qua…
Browse files Browse the repository at this point in the history
…dratic 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
  • Loading branch information
LebedevRI committed May 18, 2021
1 parent 9f4f012 commit 3cc3960
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion llvm/lib/Target/X86/X86ScheduleZnver3.td
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3cc3960

Please sign in to comment.