aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/class.cc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2022-01-21 10:19:58 +0100
committerRichard Biener <rguenther@suse.de>2022-01-21 12:18:59 +0100
commitf953c8bc5bf314a57a6ba347ee6f5f5e3f1dad53 (patch)
tree1cc019018d877b61e224cf210476570fc58de252 /gcc/cp/class.cc
parent1ad72811242eb84dde1bb2e97d0804d6eabeac8a (diff)
downloadgcc-f953c8bc5bf314a57a6ba347ee6f5f5e3f1dad53.zip
gcc-f953c8bc5bf314a57a6ba347ee6f5f5e3f1dad53.tar.gz
gcc-f953c8bc5bf314a57a6ba347ee6f5f5e3f1dad53.tar.bz2
tree-optimization/104156 - fix unswitching compare-debug issue
When hoisting guards the unswitching pass does not properly ignore debug stmts when looking for uses outside of the loop of defs produced in the skipped region. The following rectifies this by instead collecting them and resetting them after the transform. 2022-01-21 Richard Biener <rguenther@suse.de> PR tree-optimization/104156 * tree-ssa-loop-unswitch.cc (tree_unswitch_outer_loop): Collect and reset debug stmts with out-of-loop uses when hoisting guards. (find_loop_guard): Adjust. (empty_bb_without_guard_p): Likewise. Ignore debug stmts. (used_outside_loop_p): Push debug uses to a vector of debug stmts to reset. (hoist_guard): Adjust -fopt-info category. * gcc.dg/loop-unswitch-6.c: New testcase.
Diffstat (limited to 'gcc/cp/class.cc')
0 files changed, 0 insertions, 0 deletions