aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/may_dangle.rs
diff options
context:
space:
mode:
authorAndrew Pinski <andrew.pinski@oss.qualcomm.com>2025-08-12 23:31:15 -0700
committerAndrew Pinski <andrew.pinski@oss.qualcomm.com>2025-08-14 00:32:18 -0700
commitdf9635322ab8f1297f3774d38a59e13cee4ae79b (patch)
tree88b58bcb62b32e024b6df7d2832fe9b8771b8f1f /gcc/testsuite/rust/compile/may_dangle.rs
parentee67004474d521f7e107ec2795cfbb894a855c87 (diff)
downloadgcc-master.zip
gcc-master.tar.gz
gcc-master.tar.bz2
forwprop: Limit alias walk in some cases [PR121474]HEADtrunkmaster
https://gcc.gnu.org/pipermail/gcc-patches/2025-August/692091.html pointed out: ''' Oh, as we now do alias walks in forwprop maybe we should make this conditional and do this not for all pass instances, since it makes forwprop possibly a lot slower? ''' This does patch limits the walk in a few different ways. First only allow for a full walk in the first 2 forwprop (the one before inlining and the one after inlining). The other 2 forwprop are less likely to find any extra zero prop so limit them so there is no walk. There is an exception to the rule though, allowing to skip over clobbers still since those will not take a long time for the walk and from when looking at benchmarks the only place where forwprop3/4 would cause a zero prop. The other thing is limit a full walk only if flag_expensive_optimizations is true. This limits the walk for -O1 since flag_expensive_optimizations is turned on at -O2+. Bootstrapped and tested on x86_64-linux-gnu. PR tree-optimization/121474 gcc/ChangeLog: * passes.def: Update forwprop1/2 to have full_walk to be true. * tree-ssa-forwprop.cc (optimize_aggr_zeroprop): Add new argument full_walk. Take into account the full_walk and clobbers at the end of the limit can be done always. (simplify_builtin_call): Add new argument, full_walk. Update call to optimize_aggr_zeroprop. (pass_forwprop): Add m_full_walk field. (pass_forwprop::set_pass_param): Update for m_full_walk. (pass_forwprop::execute): Update call to simplify_builtin_call and optimize_aggr_zeroprop. Signed-off-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
Diffstat (limited to 'gcc/testsuite/rust/compile/may_dangle.rs')
0 files changed, 0 insertions, 0 deletions