public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/110528] New: Timeout with with specific optimizations
@ 2023-07-03 5:47 19373742 at buaa dot edu.cn
2023-07-03 5:48 ` [Bug c/110528] " 19373742 at buaa dot edu.cn
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: 19373742 at buaa dot edu.cn @ 2023-07-03 5:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110528
Bug ID: 110528
Summary: Timeout with with specific optimizations
Product: gcc
Version: 12.3.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: 19373742 at buaa dot edu.cn
Target Milestone: ---
Created attachment 55460
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55460&action=edit
The compiler output
*******************************************************************************
OS and Platform:
CentOS Linux release 7.9.2009 (Core), x86_64 GNU/Linux
*******************************************************************************
gcc version:
# /home/gcc-releases/gcc-12-0630/bin/gcc -v
Using built-in specs.
COLLECT_GCC=/home/gcc-releases/gcc-12-0630/bin/gcc
COLLECT_LTO_WRAPPER=/home/gcc-releases/gcc-12-0630/libexec/gcc/x86_64-pc-linux-gnu/12.3.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ./configure --prefix=/home/gcc-releases/gcc-12-0630/
--disable-multilib --enable-languages=c,c++
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.3.1 20230630 (GCC)
*******************************************************************************
Command Lines:
# (ulimit -t 60; /home/gcc-releases/gcc-12-0630/bin/gcc -I
/home/csmith_record/include/csmith-2.3.0/ -O3
-fno-aggressive-loop-optimizations -fno-align-functions -fno-align-jumps
-fno-align-labels -fno-align-loops -fno-allocation-dce
-fno-asynchronous-unwind-tables -fno-auto-inc-dec -fno-bit-tests
-fno-branch-count-reg -fno-caller-saves -fno-code-hoisting
-fno-combine-stack-adjustments -fno-compare-elim -fno-cprop-registers
-fno-crossjumping -fno-cse-follow-jumps -fno-dce -fno-defer-pop
-fno-devirtualize -fno-devirtualize-speculatively -fno-dse -fno-early-inlining
-fno-expensive-optimizations -fno-forward-propagate -fno-fp-int-builtin-inexact
-fno-function-cse -fno-gcse -fno-gcse-after-reload -fno-gcse-lm
-fno-guess-branch-probability -fno-hoist-adjacent-loads -fno-if-conversion
-fno-if-conversion2 -fno-indirect-inlining -fno-inline -fno-inline-atomics
-fno-inline-functions -fno-inline-functions-called-once
-fno-inline-small-functions -fno-ipa-bit-cp -fno-ipa-cp -fno-ipa-cp-clone
-fno-ipa-icf -fno-ipa-icf-functions -fno-ipa-icf-variables -fno-ipa-modref
-fno-ipa-profile -fno-ipa-pure-const -fno-ipa-ra -fno-ipa-reference
-fno-ipa-reference-addressable -fno-ipa-sra -fno-ipa-stack-alignment
-fno-ipa-strict-aliasing -fno-ipa-vrp -fno-ira-hoist-pressure
-fno-ira-share-save-slots -fno-ira-share-spill-slots
-fno-isolate-erroneous-paths-dereference -fno-ivopts -fno-jump-tables
-fno-lifetime-dse -fno-loop-interchange -fno-loop-unroll-and-jam -fno-lra-remat
-fno-math-errno -fno-move-loop-invariants -fno-move-loop-stores
-fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-optimize-strlen
-fno-partial-inlining -fno-peel-loops -fno-peephole -fno-peephole2 -fno-plt
-fno-predictive-commoning -fno-printf-return-value -fno-ree
-fno-reg-struct-return -fno-reorder-blocks -fno-reorder-blocks-and-partition
-fno-reorder-functions -fno-rerun-cse-after-loop
-fno-sched-critical-path-heuristic -fno-sched-dep-count-heuristic
-fno-sched-group-heuristic -fno-sched-interblock -fno-sched-last-insn-heuristic
-fno-sched-rank-heuristic -fno-sched-spec -fno-sched-spec-insn-heuristic
-fno-sched-stalled-insns-dep -fno-schedule-fusion -fno-schedule-insns2
-fno-semantic-interposition -fno-short-enums -fno-shrink-wrap
-fno-shrink-wrap-separate -fno-signed-zeros -fno-split-ivs-in-unroller
-fno-split-loops -fno-split-paths -fno-split-wide-types -fno-ssa-backprop
-fno-ssa-phiopt -fno-stdarg-opt -fno-store-merging -fno-strict-aliasing
-fno-thread-jumps -fno-toplevel-reorder -fno-trapping-math -fno-tree-bit-ccp
-fno-tree-builtin-call-dce -fno-tree-ccp -fno-tree-ch -fno-tree-coalesce-vars
-fno-tree-copy-prop -fno-tree-dce -fno-tree-dominator-opts -fno-tree-dse
-fno-tree-forwprop -fno-tree-fre -fno-tree-loop-distribute-patterns
-fno-tree-loop-distribution -fno-tree-loop-im -fno-tree-loop-ivcanon
-fno-tree-loop-optimize -fno-tree-loop-vectorize -fno-tree-partial-pre
-fno-tree-phiprop -fno-tree-pre -fno-tree-pta -fno-tree-reassoc
-fno-tree-scev-cprop -fno-tree-sink -fno-tree-slp-vectorize -fno-tree-slsr
-fno-tree-sra -fno-tree-switch-conversion -fno-tree-tail-merge -fno-tree-ter
-fno-tree-vrp -fno-unroll-completely-grow-size -fno-unswitch-loops
-fno-unwind-tables -fno-version-loops-for-strides -fno-allow-store-data-races
-fno-associative-math -fno-branch-probabilities -fno-conserve-stack
-fno-cx-fortran-rules -fno-cx-limited-range -fno-delayed-branch
-fno-delete-dead-exceptions -fno-exceptions -fno-finite-loops
-fno-finite-math-only -fno-float-store -fno-gcse-las -fno-gcse-sm -fno-graphite
-fno-graphite-identity -fno-harden-compares -fno-harden-conditional-branches
-fno-ipa-pta -fno-ira-loop-pressure -fno-isolate-erroneous-paths-attribute
-fno-keep-gc-roots-live -fno-limit-function-alignment -fno-live-range-shrinkage
-fno-loop-nest-optimize -fno-loop-parallelize-all -fno-modulo-sched
-fno-modulo-sched-allow-regmoves -fno-non-call-exceptions -fno-opt-info
-fno-pack-struct -fno-profile-partial-training -fno-profile-reorder-functions
-fno-reciprocal-math -fno-rename-registers
-fno-reschedule-modulo-scheduled-loops -fno-rounding-math
-fno-save-optimization-record -fno-sched-pressure -fno-sched-spec-load
-fno-sched-spec-load-dangerous -fno-sched-stalled-insns
-fno-sched2-use-superblocks -fno-schedule-insns -fno-section-anchors
-fno-sel-sched-pipelining -fno-sel-sched-pipelining-outer-loops
-fno-sel-sched-reschedule-pipelined -fno-selective-scheduling
-fno-selective-scheduling2 -fno-short-wchar -fno-signaling-nans
-fno-single-precision-constant -fno-split-wide-types-early
-fno-stack-clash-protection -fno-tracer -fno-trapv -fno-tree-cselim
-fno-tree-lrs -fno-tree-vectorize -fno-unconstrained-commons
-fno-unroll-all-loops -fno-unroll-loops -fno-unsafe-math-optimizations
-fno-var-tracking -fno-var-tracking-assignments
-fno-var-tracking-assignments-toggle -fno-var-tracking-uninit
-fno-variable-expansion-in-unroller -fno-vpt -fno-web -fno-wrapv
-fno-wrapv-pointer -gno-statement-frontiers -fno-aggressive-loop-optimizations
-fno-align-functions -fno-align-jumps -fno-align-labels -fno-align-loops
-fallocation-dce -fno-asynchronous-unwind-tables -fauto-inc-dec -fno-bit-tests
-fno-branch-count-reg -fno-caller-saves -fcode-hoisting
-fno-combine-stack-adjustments -fcompare-elim -fcprop-registers
-fno-crossjumping -fno-cse-follow-jumps -fdce -fno-defer-pop -fno-devirtualize
-fno-devirtualize-speculatively -fdse -fearly-inlining
-fno-expensive-optimizations -fno-forward-propagate -fno-fp-int-builtin-inexact
-fno-function-cse -fgcse -fno-gcse-after-reload -fno-gcse-lm
-fguess-branch-probability -fhoist-adjacent-loads -fno-if-conversion
-fif-conversion2 -findirect-inlining -fno-inline -finline-atomics
-fno-inline-functions -finline-functions-called-once
-fno-inline-small-functions -fno-ipa-bit-cp -fno-ipa-cp -fno-ipa-cp-clone
-fno-ipa-icf -fipa-icf-functions -fno-ipa-icf-variables -fipa-modref
-fno-ipa-profile -fno-ipa-pure-const -fipa-ra -fipa-reference
-fno-ipa-reference-addressable -fno-ipa-sra -fno-ipa-stack-alignment
-fipa-strict-aliasing -fipa-vrp -fno-ira-hoist-pressure
-fno-ira-share-save-slots -fno-ira-share-spill-slots
-fno-isolate-erroneous-paths-dereference -fivopts -fjump-tables
-fno-lifetime-dse -floop-interchange -fno-loop-unroll-and-jam -flra-remat
-fno-math-errno -fmove-loop-invariants -fno-move-loop-stores
-fomit-frame-pointer -fno-optimize-sibling-calls -fno-optimize-strlen
-fpartial-inlining -fpeel-loops -fpeephole -fpeephole2 -fno-plt
-fpredictive-commoning -fno-printf-return-value -free -freg-struct-return
-fno-reorder-blocks -fno-reorder-blocks-and-partition -fno-reorder-functions
-frerun-cse-after-loop -fno-sched-critical-path-heuristic
-fno-sched-dep-count-heuristic -fno-sched-group-heuristic -fsched-interblock
-fsched-last-insn-heuristic -fno-sched-rank-heuristic -fno-sched-spec
-fsched-spec-insn-heuristic -fno-sched-stalled-insns-dep -fschedule-fusion
-fschedule-insns2 -fsemantic-interposition -fno-short-enums -fshrink-wrap
-fshrink-wrap-separate -fsigned-zeros -fno-split-ivs-in-unroller
-fno-split-loops -fsplit-paths -fsplit-wide-types -fssa-backprop -fssa-phiopt
-fno-stdarg-opt -fno-store-merging -fno-strict-aliasing -fno-thread-jumps
-ftoplevel-reorder -fno-trapping-math -ftree-bit-ccp -fno-tree-builtin-call-dce
-fno-tree-ccp -ftree-ch -fno-tree-coalesce-vars -ftree-copy-prop -ftree-dce
-ftree-dominator-opts -ftree-dse -ftree-forwprop -ftree-fre
-ftree-loop-distribute-patterns -ftree-loop-distribution -ftree-loop-im
-fno-tree-loop-ivcanon -ftree-loop-optimize -ftree-loop-vectorize
-fno-tree-partial-pre -fno-tree-phiprop -fno-tree-pre -ftree-pta -ftree-reassoc
-ftree-scev-cprop -ftree-sink -fno-tree-slp-vectorize -fno-tree-slsr
-fno-tree-sra -ftree-switch-conversion -ftree-tail-merge -ftree-ter -ftree-vrp
-fno-unroll-completely-grow-size -fno-unswitch-loops -funwind-tables
-fno-version-loops-for-strides -fno-allow-store-data-races
-fno-associative-math -fno-branch-probabilities -fno-conserve-stack
-fcx-fortran-rules -fno-cx-limited-range -fdelayed-branch
-fdelete-dead-exceptions -fno-exceptions -fno-finite-loops
-fno-finite-math-only -fno-float-store -fno-gcse-las -fgcse-sm -fno-graphite
-fgraphite-identity -fharden-compares -fharden-conditional-branches
-fno-ipa-pta -fno-ira-loop-pressure -fisolate-erroneous-paths-attribute
-fno-keep-gc-roots-live -flimit-function-alignment -fno-live-range-shrinkage
-fno-loop-nest-optimize -fno-loop-parallelize-all -fmodulo-sched
-fmodulo-sched-allow-regmoves -fno-non-call-exceptions -fopt-info
-fno-pack-struct -fprofile-partial-training -fprofile-reorder-functions
-freciprocal-math -fno-rename-registers -freschedule-modulo-scheduled-loops
-fno-rounding-math -fsave-optimization-record -fno-sched-pressure
-fsched-spec-load -fsched-spec-load-dangerous -fsched-stalled-insns
-fno-sched2-use-superblocks -fschedule-insns -fsection-anchors
-fsel-sched-pipelining -fsel-sched-pipelining-outer-loops
-fno-sel-sched-reschedule-pipelined -fselective-scheduling
-fselective-scheduling2 -fshort-wchar -fno-signaling-nans
-fsingle-precision-constant -fno-split-wide-types-early
-fstack-clash-protection -ftracer -ftrapv -ftree-cselim -fno-tree-lrs
-fno-tree-vectorize -fno-unconstrained-commons -funroll-all-loops
-fno-unroll-loops -fno-unsafe-math-optimizations -fno-var-tracking
-fvar-tracking-assignments -fno-var-tracking-assignments-toggle
-fno-var-tracking-uninit -fno-variable-expansion-in-unroller -fno-vpt -fweb
-fno-wrapv -fwrapv-pointer -gstatement-frontiers tle.c -o tle.o 2>tle.txt)
gcc: fatal error: Killed signal terminated program cc1
compilation terminated.
# (ulimit -t 60; /home/gcc-releases/gcc-12-0630/bin/gcc -I
/home/csmith_record/include/csmith-2.3.0/ tle.c -o tle.o 2>tle.txt)
# ./tle.o
checksum = 8AE6D9A8
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/110528] Timeout with with specific optimizations
2023-07-03 5:47 [Bug c/110528] New: Timeout with with specific optimizations 19373742 at buaa dot edu.cn
@ 2023-07-03 5:48 ` 19373742 at buaa dot edu.cn
2023-07-03 5:58 ` [Bug middle-end/110528] " pinskia at gcc dot gnu.org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: 19373742 at buaa dot edu.cn @ 2023-07-03 5:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110528
--- Comment #1 from CTC <19373742 at buaa dot edu.cn> ---
Created attachment 55461
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55461&action=edit
C Source Code
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug middle-end/110528] Timeout with with specific optimizations
2023-07-03 5:47 [Bug c/110528] New: Timeout with with specific optimizations 19373742 at buaa dot edu.cn
2023-07-03 5:48 ` [Bug c/110528] " 19373742 at buaa dot edu.cn
@ 2023-07-03 5:58 ` pinskia at gcc dot gnu.org
2023-07-03 7:16 ` rguenth at gcc dot gnu.org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-07-03 5:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110528
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Can you attach the preprocessed source?
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug middle-end/110528] Timeout with with specific optimizations
2023-07-03 5:47 [Bug c/110528] New: Timeout with with specific optimizations 19373742 at buaa dot edu.cn
2023-07-03 5:48 ` [Bug c/110528] " 19373742 at buaa dot edu.cn
2023-07-03 5:58 ` [Bug middle-end/110528] " pinskia at gcc dot gnu.org
@ 2023-07-03 7:16 ` rguenth at gcc dot gnu.org
2023-07-03 8:37 ` 19373742 at buaa dot edu.cn
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-03 7:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110528
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2023-07-03
Ever confirmed|0 |1
Status|UNCONFIRMED |WAITING
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug middle-end/110528] Timeout with with specific optimizations
2023-07-03 5:47 [Bug c/110528] New: Timeout with with specific optimizations 19373742 at buaa dot edu.cn
` (2 preceding siblings ...)
2023-07-03 7:16 ` rguenth at gcc dot gnu.org
@ 2023-07-03 8:37 ` 19373742 at buaa dot edu.cn
2023-07-03 8:42 ` pinskia at gcc dot gnu.org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: 19373742 at buaa dot edu.cn @ 2023-07-03 8:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110528
--- Comment #3 from CTC <19373742 at buaa dot edu.cn> ---
Created attachment 55463
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55463&action=edit
The preprocessed file
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug middle-end/110528] Timeout with with specific optimizations
2023-07-03 5:47 [Bug c/110528] New: Timeout with with specific optimizations 19373742 at buaa dot edu.cn
` (3 preceding siblings ...)
2023-07-03 8:37 ` 19373742 at buaa dot edu.cn
@ 2023-07-03 8:42 ` pinskia at gcc dot gnu.org
2023-07-03 22:04 ` [Bug rtl-optimization/110528] selective scheduling seems to go into an infinite loop pinskia at gcc dot gnu.org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-07-03 8:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110528
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|1 |0
Status|WAITING |UNCONFIRMED
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug rtl-optimization/110528] selective scheduling seems to go into an infinite loop
2023-07-03 5:47 [Bug c/110528] New: Timeout with with specific optimizations 19373742 at buaa dot edu.cn
` (4 preceding siblings ...)
2023-07-03 8:42 ` pinskia at gcc dot gnu.org
@ 2023-07-03 22:04 ` pinskia at gcc dot gnu.org
2023-07-04 0:23 ` pinskia at gcc dot gnu.org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-07-03 22:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110528
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|Timeout with with specific |selective scheduling seems
|optimizations |to go into an infinite loop
Target| |x86_64-linux-gnu
Known to fail| |14.0
Component|middle-end |rtl-optimization
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
#0 0x0000000000f67ac0 in vinsn_equal_p(vinsn_def*, vinsn_def*) () at
/home/apinski/src/upstream-gcc/gcc/gcc/sel-sched-ir.cc:1603
#1 0x0000000000f68679 in av_set_lookup (set=<error reading variable:
dwarf2_find_location_expression: Corrupted DWARF expression.>,
sought_vinsn=0x5003ee0) at
/home/apinski/src/upstream-gcc/gcc/gcc/sel-sched-ir.cc:2120
#2 0x0000000000f78747 in compute_av_set_inside_bb(rtx_insn*, _list_node*, int,
bool) () at /home/apinski/src/upstream-gcc/gcc/gcc/vec.h:1504
#3 0x0000000000f7dc9d in compute_av_set (unique_p=<error reading variable:
dwarf2_find_location_expression: Corrupted DWARF expression.>, ws=<error
reading variable: dwarf2_find_location_expression: Corrupted DWARF
expression.>,
p=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF
expression.>, insn=<error reading variable: dwarf2_find_location_expression:
Corrupted DWARF expression.>) at
/home/apinski/src/upstream-gcc/gcc/gcc/sel-sched.cc:5058
#4 compute_av_set_on_boundaries (av_vliw_p=0x7fffffffc008,
av_vliw_p@entry=<error reading variable: dwarf2_find_location_expression:
Corrupted DWARF expression.>, bnds=<optimized out>, fence=<optimized out>) at
/home/apinski/src/upstream-gcc/gcc/gcc/sel-sched.cc:5058
#5 fill_insns (scheduled_insns_tailpp=<synthetic pointer>, seqno=-1,
fence=<optimized out>) at
/home/apinski/src/upstream-gcc/gcc/gcc/sel-sched.cc:5523
#6 schedule_on_fences (scheduled_insns_tailpp=<synthetic pointer>,
max_seqno=1, fences=<optimized out>) at
/home/apinski/src/upstream-gcc/gcc/gcc/sel-sched.cc:7353
#7 sel_sched_region_2(int) () at
/home/apinski/src/upstream-gcc/gcc/gcc/sel-sched.cc:7491
#8 0x0000000000f7ff97 in sel_sched_region_1() () at
/home/apinski/src/upstream-gcc/gcc/gcc/sel-sched.cc:7533
#9 0x0000000000f8157c in sel_sched_region (rgn=20) at
/home/apinski/src/upstream-gcc/gcc/gcc/sel-sched.cc:7634
#10 sel_sched_region(int) () at
/home/apinski/src/upstream-gcc/gcc/gcc/sel-sched.cc:7619
#11 0x0000000000f8174a in run_selective_scheduling () at
/home/apinski/src/upstream-gcc/gcc/gcc/sel-sched.cc:7720
#12 0x0000000000f634ed in rest_of_handle_sched () at
/home/apinski/src/upstream-gcc/gcc/gcc/sched-rgn.cc:3729
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug rtl-optimization/110528] selective scheduling seems to go into an infinite loop
2023-07-03 5:47 [Bug c/110528] New: Timeout with with specific optimizations 19373742 at buaa dot edu.cn
` (5 preceding siblings ...)
2023-07-03 22:04 ` [Bug rtl-optimization/110528] selective scheduling seems to go into an infinite loop pinskia at gcc dot gnu.org
@ 2023-07-04 0:23 ` pinskia at gcc dot gnu.org
2023-07-04 0:29 ` pinskia at gcc dot gnu.org
2024-02-19 13:58 ` rguenth at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-07-04 0:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110528
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Here is a testcase which does not go into an infinite loop but takes a little
more than 4 seconds to compile which is a lot:
```
static unsigned short g_231 = 1UL;
void func_61(unsigned p_62) {
unsigned char g_116 = 0xE3L;
int l_733;
int l_661;
unsigned char l_746;
for (l_733 = 5; (l_733 >= 1); l_733 -= 1)
for (l_746 = 1; (l_746 <= 7); l_746 += 1)
for (g_116 = 2; (g_116 <= 7); g_116 += 1)
for (l_661 = 6; (l_661 >= 0); l_661 -= 1)
{
&g_231;
(g_231) = (0x84EAL <= p_62);
}
}
```
This is with `-gstatement-frontiers -O3 -fselective-scheduling2`.
Without `-fselective-scheduling2` GCC compiles this less than a second.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug rtl-optimization/110528] selective scheduling seems to go into an infinite loop
2023-07-03 5:47 [Bug c/110528] New: Timeout with with specific optimizations 19373742 at buaa dot edu.cn
` (6 preceding siblings ...)
2023-07-04 0:23 ` pinskia at gcc dot gnu.org
@ 2023-07-04 0:29 ` pinskia at gcc dot gnu.org
2024-02-19 13:58 ` rguenth at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-07-04 0:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110528
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
With selective scheduling on my reduced testcase:
```
Time variable usr sys wall
GGC
phase setup : 0.00 ( 0%) 0.01 ( 25%) 0.01 ( 0%)
1825k ( 51%)
phase parsing : 0.00 ( 0%) 0.00 ( 0%) 0.01 ( 0%)
174k ( 5%)
phase opt and generate : 4.03 (100%) 0.03 ( 75%) 4.05 ( 99%)
1563k ( 44%)
phase finalize : 0.00 ( 0%) 0.00 ( 0%) 0.02 ( 0%)
0 ( 0%)
callgraph functions expansion : 4.02 (100%) 0.03 ( 75%) 4.05 ( 99%)
1521k ( 43%)
callgraph ipa passes : 0.01 ( 0%) 0.00 ( 0%) 0.00 ( 0%)
29k ( 1%)
CFG verifier : 0.00 ( 0%) 0.00 ( 0%) 0.01 ( 0%)
0 ( 0%)
df use-def / def-use chains : 0.01 ( 0%) 0.00 ( 0%) 0.01 ( 0%)
0 ( 0%)
lexical analysis : 0.00 ( 0%) 0.00 ( 0%) 0.01 ( 0%)
0 ( 0%)
tree operand scan : 0.01 ( 0%) 0.00 ( 0%) 0.01 ( 0%)
5120 ( 0%)
tree CCP : 0.00 ( 0%) 0.00 ( 0%) 0.01 ( 0%)
224 ( 0%)
complete unrolling : 0.00 ( 0%) 0.01 ( 25%) 0.00 ( 0%)
482k ( 14%)
tree SSA verifier : 0.03 ( 1%) 0.00 ( 0%) 0.01 ( 0%)
0 ( 0%)
tree STMT verifier : 0.04 ( 1%) 0.00 ( 0%) 0.05 ( 1%)
0 ( 0%)
expand : 0.00 ( 0%) 0.00 ( 0%) 0.01 ( 0%)
467k ( 13%)
CSE : 0.01 ( 0%) 0.00 ( 0%) 0.00 ( 0%)
0 ( 0%)
integrated RA : 0.00 ( 0%) 0.00 ( 0%) 0.01 ( 0%)
24k ( 1%)
scheduling 2 : 3.91 ( 97%) 0.02 ( 50%) 3.92 ( 96%)
130k ( 4%)
verify RTL sharing : 0.02 ( 0%) 0.00 ( 0%) 0.01 ( 0%)
0 ( 0%)
TOTAL : 4.03 0.04 4.09
3564k
Extra diagnostic checks enabled; compiler may run slowly.
Configure with --enable-checking=release to disable checks.
```
Without:
```
Time variable usr sys wall
GGC
phase setup : 0.01 ( 7%) 0.00 ( 0%) 0.02 ( 11%)
1825k ( 49%)
phase opt and generate : 0.14 ( 93%) 0.00 ( 0%) 0.14 ( 78%)
1694k ( 46%)
phase finalize : 0.00 ( 0%) 0.00 ( 0%) 0.02 ( 11%)
0 ( 0%)
callgraph functions expansion : 0.13 ( 87%) 0.00 ( 0%) 0.14 ( 78%)
1652k ( 45%)
callgraph ipa passes : 0.01 ( 7%) 0.00 ( 0%) 0.00 ( 0%)
29k ( 1%)
cfg construction : 0.00 ( 0%) 0.00 ( 0%) 0.01 ( 6%)
0 ( 0%)
CFG verifier : 0.02 ( 13%) 0.00 ( 0%) 0.02 ( 11%)
0 ( 0%)
alias analysis : 0.00 ( 0%) 0.00 ( 0%) 0.01 ( 6%)
1640 ( 0%)
tree VRP : 0.01 ( 7%) 0.00 ( 0%) 0.00 ( 0%)
2160 ( 0%)
tree operand scan : 0.01 ( 7%) 0.00 ( 0%) 0.01 ( 6%)
5120 ( 0%)
tree DSE : 0.01 ( 7%) 0.00 ( 0%) 0.00 ( 0%)
0 ( 0%)
complete unrolling : 0.01 ( 7%) 0.00 ( 0%) 0.00 ( 0%)
482k ( 13%)
tree SSA verifier : 0.02 ( 13%) 0.00 ( 0%) 0.00 ( 0%)
0 ( 0%)
tree STMT verifier : 0.03 ( 20%) 0.00 ( 0%) 0.05 ( 28%)
0 ( 0%)
forward prop : 0.01 ( 7%) 0.00 ( 0%) 0.00 ( 0%)
0 ( 0%)
integrated RA : 0.00 ( 0%) 0.00 ( 0%) 0.01 ( 6%)
24k ( 1%)
reload CSE regs : 0.01 ( 7%) 0.00 ( 0%) 0.00 ( 0%)
48 ( 0%)
scheduling 2 : 0.01 ( 7%) 0.00 ( 0%) 0.01 ( 6%)
260k ( 7%)
initialize rtl : 0.00 ( 0%) 0.00 ( 0%) 0.01 ( 6%)
12k ( 0%)
rest of compilation : 0.00 ( 0%) 0.00 ( 0%) 0.01 ( 6%)
3496 ( 0%)
TOTAL : 0.15 0.00 0.18
3695k
Extra diagnostic checks enabled; compiler may run slowly.
Configure with --enable-checking=release to disable checks.
```
You can see selective scheduling is really bad.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug rtl-optimization/110528] selective scheduling seems to go into an infinite loop
2023-07-03 5:47 [Bug c/110528] New: Timeout with with specific optimizations 19373742 at buaa dot edu.cn
` (7 preceding siblings ...)
2023-07-04 0:29 ` pinskia at gcc dot gnu.org
@ 2024-02-19 13:58 ` rguenth at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-02-19 13:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110528
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed|2023-07-03 00:00:00 |2024-02-19
Ever confirmed|0 |1
--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed with -O2 -gstatement-frontiers -fselective-scheduling2 (but oddly not
-O2 -g -fselective-scheduling2).
Samples: 4K of event 'cycles:u', Event count (approx.): 5647511948
Overhead Samples Command Shared Object Symbol
20.82% 901 cc1 cc1 [.] moveup_expr_cached
10.45% 446 cc1 cc1 [.]
schedule_expr_on_boundary
7.60% 328 cc1 cc1 [.] is_ineligible_successor
7.56% 327 cc1 cc1 [.] bitmap_bit_p
7.30% 315 cc1 cc1 [.] sel_bb_head
possibly because of
/* Same as moveup_expr, but first looks up the result of
transformation in caches. */
static enum MOVEUP_EXPR_CODE
moveup_expr_cached (expr_t expr, insn_t insn, bool inside_insn_group)
{
...
if (DEBUG_INSN_P (EXPR_INSN_RTX (expr))
&& BLOCK_FOR_INSN (EXPR_INSN_RTX (expr))
&& (sel_bb_head (BLOCK_FOR_INSN (EXPR_INSN_RTX (expr)))
== EXPR_INSN_RTX (expr)))
/* Don't use cached information for debug insns that are heads of
basic blocks. */;
and likely -gstatement-frontiers puts debug insns right there.
It reads like a band-aid fix for a compare-debug issue that was then traded
for this compile-time one ...
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2024-02-19 13:58 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-03 5:47 [Bug c/110528] New: Timeout with with specific optimizations 19373742 at buaa dot edu.cn
2023-07-03 5:48 ` [Bug c/110528] " 19373742 at buaa dot edu.cn
2023-07-03 5:58 ` [Bug middle-end/110528] " pinskia at gcc dot gnu.org
2023-07-03 7:16 ` rguenth at gcc dot gnu.org
2023-07-03 8:37 ` 19373742 at buaa dot edu.cn
2023-07-03 8:42 ` pinskia at gcc dot gnu.org
2023-07-03 22:04 ` [Bug rtl-optimization/110528] selective scheduling seems to go into an infinite loop pinskia at gcc dot gnu.org
2023-07-04 0:23 ` pinskia at gcc dot gnu.org
2023-07-04 0:29 ` pinskia at gcc dot gnu.org
2024-02-19 13:58 ` rguenth at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).