]> git.ipfire.org Git - thirdparty/gcc.git/commit
forwprop: Move check of limit first [PR121474]
authorAndrew Pinski <andrew.pinski@oss.qualcomm.com>
Wed, 13 Aug 2025 16:19:42 +0000 (09:19 -0700)
committerAndrew Pinski <andrew.pinski@oss.qualcomm.com>
Wed, 13 Aug 2025 16:29:46 +0000 (09:29 -0700)
commit11f7d5648c42cd2ef6f0841cde6292b94831e7b6
tree934c614f23723590253c738dea8498d4853cc616
parenteecff13cdcc625f6112b12c899f2d3a4c868273a
forwprop: Move check of limit first [PR121474]

This is the first step in handling the review part of:
https://gcc.gnu.org/pipermail/gcc-patches/2025-August/692091.html
'''
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?
'''

The check of the limit was after the alias check which could slow down things.
This moves the check of the limit to begining of the if.

Bootstrapped and tested on x86_64-linux-gnu.

Pushed as obvious.

PR tree-optimization/121474
gcc/ChangeLog:

* tree-ssa-forwprop.cc (optimize_aggr_zeroprop): Move the check
for limit before the alias check.

Signed-off-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
gcc/tree-ssa-forwprop.cc