Bug 116146 - Split insn-recog.cc
Summary: Split insn-recog.cc
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: 15.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: internal-improvement
Depends on:
Blocks: 84402
  Show dependency treegraph
 
Reported: 2024-07-30 19:21 UTC by Sam James
Modified: 2024-12-18 07:33 UTC (History)
4 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2024-07-30 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sam James 2024-07-30 19:21:59 UTC
We've split insn-emit.cc (PR54179) as well as gimple-match.cc.

The remaining big beast is insn-recog.cc which comes up in PR111619, PR111600, and elsewhere.
Comment 1 Andrew Pinski 2024-07-30 22:18:42 UTC
.
Comment 2 Richard Biener 2024-07-31 07:04:41 UTC
On x86_64:

> wc -l insn-*.cc | sort -n
...
   97320 insn-automata.cc
  122359 insn-attrtab.cc
  170018 insn-emit-9.cc
  186244 insn-latencytab.cc
  193349 insn-dfatab.cc
  300935 insn-recog.cc
  509381 insn-output.cc

insn-output.cc is the const static initializer for insn_data[] and
operand_data[].
Comment 3 Robin Dapp 2024-07-31 07:57:01 UTC
On riscv insn-output is the largest file right now as well.  I have a local patch that splits it - it's a bit cumbersome because the static initializer needs to be made non-static i.e. the initialization must be in an init function and that needs to be called at some point.  But as a proof of concept it worked.

Once I have more time (hah) I'm going to post a patch but it will still take a while.
Comment 4 Mark Wielaard 2024-07-31 12:52:51 UTC
(In reply to Robin Dapp from comment #3)
> On riscv insn-output is the largest file right now as well.

Note that size matters, but the largest file does not always take the longest to compile. On a risc-v setup insn-recog.cc and the largest insn-emit-nn.cc file take hours more to build than any of the other larger files.
Comment 5 Robin Dapp 2024-12-18 07:33:29 UTC
Fixed on trunk as of r15-6223-g6dcfe874313493.