https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113575

--- Comment #13 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Robin Dapp from comment #12)
> Created attachment 57209 [details]
> Tentative
> 
> I tested the attached "fix".  On my machine with 13.2 host compiler it
> reduced the build time for insn-opinit.cc from > 4 mins to < 2 mins and the
> memory usage from >1G to 600ish M.  I didn't observe 3.5G before, though.
> 
> For now I just went with an arbitrary threshold of 5000 patterns and
> splitting into 10 functions.  After testing on x86 and aarch64 I realized
> that both have <3000 patterns so right now it would only split riscv's init
> function.
> 
> Or rather the other way, i.e. splitting into fixed-size chunks (of 1000)
> instead?

Yeah, I'd simplify it by doing exactly that.

Reply via email to