That's odd. Yeah, please open a PR.

Thanks.
Aldy

On Tue, Oct 19, 2021, 22:47 Jan-Benedict Glaw <jbg...@lug-owl.de> wrote:

> Hi Aldy!
>
> On Thu, 2021-10-14 16:25:48 +0200, Aldy Hernandez via Gcc-patches <
> gcc-patches@gcc.gnu.org> wrote:
> > The new backward threader makes some of the --param knobs used to
> > control it questionable at best or no longer applicable at worst.
> >
> > The fsm-maximum-phi-arguments param is unused and can be removed.
> >
> > The max-fsm-thread-length param is block based which is a bit redundant,
> > since we already restrict paths based on instruction estimates.
> >
> > The max-fsm-thread-paths restricts the total number of threadable paths
> > in a function.  We probably don't need this.  Besides, the forward
> > threader has no such restriction.
> >
> > OK pending tests?
>
> This causes a regression for me. I'm auto-building lots of GCC
> cross-compilers and use these to cross-build the Linux kernel.
>
>   Using binutils/gas/gcc configured for --target=sh-linux (actual
> configuration for GCC is this:
>
>         .../gcc/configure --target=sh-linux --enable-werror-always \
>                           --enable-languages=all --disable-gcov    \
>                           --disable-shared --disable-threads       \
>                           --without-headers                         \
>
> --prefix=/var/lib/laminar/run/gcc-sh-linux/13/toolchain-install
> )
>
> Then, building Linux for a good number of default configurations for
> ARCH=sh and ARCH=arm, GCC will just loop:
>
> $ make ARCH=sh distclean
> $ cp arch/sh/configs/r7780mp_defconfig .config
> $ make V=1 ARCH=sh CROSS_COMPILE=sh-linux- oldconfig < /dev/null
> $ make V=1 ARCH=sh CROSS_COMPILE=sh-linux- prepare
> $ make V=1 ARCH=sh CROSS_COMPILE=sh-linux- all
> [...]
>   sh-linux-gcc -Wp,-MMD,drivers/ata/.libata-core.o.d -nostdinc -isystem
> /tmp/testbed/install/lib/gcc/sh-linux/12.0.0/include -I./arch/sh/include
> -I./arch/sh/include/generated  -I./include -I./arch/sh/include/uapi
> -I./arch/sh/include/generated/uapi -I./include/uapi
> -I./include/generated/uapi -include ./include/linux/compiler-version.h
> -include ./include/linux/kconfig.h -include
> ./include/linux/compiler_types.h -D__KERNEL__ -m4 -m4-nofpu -m4a -m4a-nofpu
> -ml -mno-fdpic -Wa,-isa=sh4a-up -ffreestanding -I
> ./arch/sh/include/cpu-sh4a -I ./arch/sh/include/cpu-sh4 -I
> ./arch/sh/include/cpu-common -I ./arch/sh/include/mach-highlander -I
> ./arch/sh/include/mach-common -fmacro-prefix-map=./= -Wall -Wundef
> -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common
> -fshort-wchar -fno-PIE -Werror=implicit-function-declaration
> -Werror=implicit-int -Werror=return-type -Wno-format-security -std=gnu89
> -pipe -m4 -m4-nofpu -m4a -m4a-nofpu -ml -mno-fdpic -Wa,-isa=sh4a-up
> -ffreestanding -I ./arch/sh/include/cpu-sh4a -I ./arch/sh/include/cpu-sh4
> -I ./arch/sh/include/cpu-common -I ./arch/sh/include/mach-highlander -I
> ./arch/sh/include/mach-common -fno-delete-null-pointer-checks
> -Wno-frame-address -Wno-format-truncation -Wno-format-overflow
> -Wno-address-of-packed-member -O2 -fno-allow-store-data-races
> -Wframe-larger-than=1024 -fstack-protector-strong -Wimplicit-fallthrough=5
> -Wno-main -Wno-unused-but-set-variable -Wno-unused-const-variable
> -fomit-frame-pointer -ftrivial-auto-var-init=zero
> -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang
> -fno-stack-clash-protection -g -Wdeclaration-after-statement -Wvla
> -Wno-pointer-sign -Wno-stringop-truncation -Wno-zero-length-bounds
> -Wno-array-bounds -Wno-stringop-overflow -Wno-restrict
> -Wno-maybe-uninitialized -fno-strict-overflow -fno-stack-check
> -fconserve-stack -Werror=date-time -Werror=incompatible-pointer-types
> -Werror=designated-init -Wno-packed-not-aligned
> -DKBUILD_MODFILE='"drivers/ata/libata"' -DKBUILD_BASENAME='"libata_core"'
> -DKBUILD_MODNAME='"libata"' -D__KBUILD_MODNAME=kmod_libata -c -o
> drivers/ata/libata-core.o drivers/ata/libata-core.c
>
>
> (gdb) bt
> #0  0x000000000100318e in vec<jump_thread_edge*, va_heap,
> vl_ptr>::operator[] (ix=0, this=0x50ee6e0) at ../../gcc/gcc/vec.h:1495
> #1  back_jt_path_registry::adjust_paths_after_duplication
> (this=0x7ffdf8b6e868, curr_path_num=0) at
> ../../gcc/gcc/tree-ssa-threadupdate.c:2315
> #2  0x0000000001003c0d in back_jt_path_registry::duplicate_thread_path
> (this=0x7ffdf8b6e868, entry=0x7f92651000c0, exit=<optimized out>,
> region=<optimized out>, n_region=8,
>     current_path_no=0) at ../../gcc/gcc/tree-ssa-threadupdate.c:2546
> #3  0x00000000010051e4 in back_jt_path_registry::update_cfg
> (this=0x7ffdf8b6e868) at ../../gcc/gcc/tree-ssa-threadupdate.c:2656
> #4  0x0000000001003ecc in jt_path_registry::thread_through_all_blocks
> (this=0x7ffdf8b6e868, peel_loop_headers=<optimized out>) at
> ../../gcc/gcc/tree-ssa-threadupdate.c:2604
> #5  0x0000000000ffb5a7 in
> back_threader_registry::thread_through_all_blocks
> (may_peel_loop_headers=true, this=0x7ffdf8b6e868) at
> ../../gcc/gcc/tree-ssa-threadbackward.c:556
> #6  back_threader::thread_through_all_blocks (may_peel_loop_headers=true,
> this=0x7ffdf8b6e860) at ../../gcc/gcc/tree-ssa-threadbackward.c:501
> #7  (anonymous namespace)::try_thread_blocks (fun=fun@entry=0x7f926eb389c0)
> at ../../gcc/gcc/tree-ssa-threadbackward.c:946
> #8  0x0000000000ffb5eb in (anonymous
> namespace)::pass_thread_jumps::execute (this=<optimized out>,
> fun=0x7f926eb389c0) at ../../gcc/gcc/tree-ssa-threadbackward.c:954
> #9  0x0000000000cfcdf8 in execute_one_pass (pass=0x2a980d0) at
> ../../gcc/gcc/passes.c:2567
> #10 0x0000000000cfd770 in execute_pass_list_1 (pass=0x2a980d0) at
> ../../gcc/gcc/passes.c:2656
> #11 0x0000000000cfd782 in execute_pass_list_1 (pass=0x2a95ab0) at
> ../../gcc/gcc/passes.c:2657
> #12 0x0000000000cfd7a9 in execute_pass_list (fn=0x7f926eb389c0,
> pass=<optimized out>) at ../../gcc/gcc/passes.c:2667
> #13 0x00000000009719c6 in cgraph_node::expand (this=0x7f926eb59550) at
> ../../gcc/gcc/context.h:48
> #14 cgraph_node::expand (this=0x7f926eb59550) at
> ../../gcc/gcc/cgraphunit.c:1781
> #15 0x0000000000972eb8 in expand_all_functions () at
> ../../gcc/gcc/cgraphunit.c:1992
> #16 symbol_table::compile (this=0x7f9271f36000) at
> ../../gcc/gcc/cgraphunit.c:2356
> #17 0x0000000000975948 in symbol_table::compile (this=0x7f9271f36000) at
> ../../gcc/gcc/cgraphunit.c:2269
> #18 symbol_table::finalize_compilation_unit (this=0x7f9271f36000) at
> ../../gcc/gcc/cgraphunit.c:2537
> #19 0x0000000000de87a6 in compile_file () at ../../gcc/gcc/toplev.c:477
> #20 0x00000000007ca783 in do_compile (no_backend=false) at
> ../../gcc/gcc/toplev.c:2197
> #21 toplev::main (this=this@entry=0x7ffdf8b6f00e, argc=<optimized out>,
> argc@entry=128, argv=<optimized out>, argv@entry=0x7ffdf8b6f118) at
> ../../gcc/gcc/toplev.c:2346
> #22 0x00000000007cc74f in main (argc=128, argv=0x7ffdf8b6f118) at
> ../../gcc/gcc/main.c:39
>
>
> Shall I open a PR for it?
>
> MfG, JBG
>
> --
>

Reply via email to