aboutsummaryrefslogtreecommitdiff
path: root/libgo/sysinfo.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2022-07-29 10:40:34 +0200
committerRichard Biener <rguenther@suse.de>2022-07-29 12:05:35 +0200
commit49ba4fdeb648c149fa7d964ba812084262c3d06f (patch)
tree02b07dbb3ef6160801c567afab03ff7c8514f5c3 /libgo/sysinfo.c
parentb5f5d1b36edbcd7d923f2e2653e54e52637c715b (diff)
downloadgcc-49ba4fdeb648c149fa7d964ba812084262c3d06f.zip
gcc-49ba4fdeb648c149fa7d964ba812084262c3d06f.tar.gz
gcc-49ba4fdeb648c149fa7d964ba812084262c3d06f.tar.bz2
tree-optimization/105679 - disable backward threading of unlikely entry
The following makes the backward threader reject threads whose entry edge is probably never executed according to the profile. That in particular, for the testcase, avoids threading the irq == 1 check on the path where irq > 31, thereby avoiding spurious -Warray-bounds diagnostics if (irq_1(D) > 31) goto <bb 3>; [0.00%] else goto <bb 4>; [100.00%] ;; basic block 3, loop depth 0, count 0 (precise), probably never executed _2 = (unsigned long) irq_1(D); __builtin___ubsan_handle_shift_out_of_bounds (&*.Lubsan_data0, 1, _2); _3 = 1 << irq_1(D); mask_4 = (u32) _3; entry = instance_5(D)->array[irq_1(D)]; capture (mask_4); if (level_6(D) != 0) goto <bb 7>; [34.00%] else goto <bb 5>; [66.00%] ;; basic block 5, loop depth 0, count 708669600 (estimated locally), maybe hot if (irq_1(D) == 1) goto <bb 7>; [20.97%] else goto <bb 6>; [79.03%] PR tree-optimization/105679 * tree-ssa-threadbackward.cc (back_threader_profitability::profitable_path_p): Avoid threading when the entry edge is probably never executed.
Diffstat (limited to 'libgo/sysinfo.c')
0 files changed, 0 insertions, 0 deletions