On Mon, Oct 24, 2022 at 4:26 PM Alexander Monakov wrote: > > > > This grew insn-automata.cc from 201502 lines to 639968 lines and the > > > > build of the automata (genautomata) to several minutes in my dev > tree. > > > > > > Yeah, in my unoptimized non-bootstrapped development tree genautomata > > > now takes over 12 minutes on a fast box, that is simply not acceptable. > > > > Thank you for notifying us. > > > > TejasSanjay.Joshi@amd.com has posted a patch for review to fix this (as > per Honza's comments). > > Ref: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/604144.html This patch is OK > > > By the way, it appears pre-existing znver[123] models are also causing > some kind > of combinatorial blow-up, but before znver4 it was not a blocking issue: > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87832 It is really easy to make DFA size to grow if there are possibly many instructions in the pipeline (as every possible state of a modelled pipeline needs to be a new state of the automaton). This is essentially depth_of_pipeline * number_of_units with additional states to repesent special instructions and this naturally keeps growing. We could try to break the FP automata into multiple ones, but there are instructions that can go down any pipe which makes this hard or we can try toreduce number of different reservation types (possibly by breaking the automaton to znver1-3 and 4 or so). With znver2 model I experimented with broken up version and common one and ended up with smaller binary for combined one. Honza > > > Alexander >