Hi! On Mon, 27 Apr 2015 11:20:30 +0100, Richard Sandiford <[email protected]> wrote: > I think it's been the case for a while that parallel builds of GCC tend > to serialise around the compilation of insn-recog.c, especially with > higher --enable-checking settings. This patch tries to speed that > up by replacing most of genrecog with a new algorithm. [...]
> Here's a comparison of the number of lines of code in insn-recog.c
> before and after the patch on one target per config/ CPU:
>
> aarch64-linux-gnueabi 115526 38169 : 33.04%
> alpha-linux-gnu 24479 10740 : 43.87%
> arm-linux-gnueabi 169208 67759 : 40.04%
> avr-rtems 55647 22127 : 39.76%
> bfin-elf 13928 6498 : 46.65%
> c6x-elf 29928 13324 : 44.52%
> [...]
Nice work! For a nvptx-none build of r222446 and r222860, respectively:
$ wc -l {prev/,}build-gcc/gcc/insn-recog.c | head -n -1
5042 prev/build-gcc/gcc/insn-recog.c
2570 build-gcc/gcc/insn-recog.c
I'm mostly illiterate regarding GCC's machine description files, and
genrecog, but noticed one thing: with the genrecog rewrite, I get the
following diff compared to a previous build log:
build/genrecog [...]/source-gcc/gcc/common.md
[...]/source-gcc/gcc/config/nvptx/nvptx.md \
insn-conditions.md > tmp-recog.c
-[...]/source-gcc/gcc/config/nvptx/nvptx.md:1206: warning: operand 0
missing mode?
-[...]/source-gcc/gcc/config/nvptx/nvptx.md:1206: warning: operand 1
missing mode?
+Statistics for recog:
+ Number of decisions: 799
+ longest path: 28 (code: 208)
+ longest backtrack: 2 (code: 136)
+Statistics for split_insns:
+ Number of decisions: 0
+ longest path: 0 (code: -1)
+ longest backtrack: 0 (code: -1)
+Statistics for peephole2_insns:
+ Number of decisions: 0
+ longest path: 0 (code: -1)
+ longest backtrack: 0 (code: -1)
+Shared 655 out of 1350 states by creating 153 new states, saving 502
gcc/config/nvptx/nvptx.md:
1206 (define_insn "allocate_stack"
1207 [(set (match_operand 0 "nvptx_register_operand" "=R")
1208 (unspec [(match_operand 1 "nvptx_register_operand" "R")]
1209 UNSPEC_ALLOCA))]
1210 ""
1211 "%.\\tcall (%0), %%alloca, (%1);")
Are these two (former) warnings a) something that should still be
reported by genrecog, and b) something that should be addressed (Bernd)?
Grüße,
Thomas
signature.asc
Description: PGP signature
