aboutsummaryrefslogtreecommitdiff
path: root/libobjc/objc-private/sarray.h
diff options
context:
space:
mode:
authorAndrew Pinski <quic_apinski@quicinc.com>2024-07-25 17:07:28 -0700
committerThomas Koenig <tkoenig@gcc.gnu.org>2024-07-28 19:06:00 +0200
commitf9caac3ac9c1de99092433c4480a6a59c0078790 (patch)
tree064c33124e4dec1c7fd2931888a471ce3bb7944a /libobjc/objc-private/sarray.h
parent9e74470d64f3fb4086b7f29303b74ae23c39abb8 (diff)
downloadgcc-f9caac3ac9c1de99092433c4480a6a59c0078790.zip
gcc-f9caac3ac9c1de99092433c4480a6a59c0078790.tar.gz
gcc-f9caac3ac9c1de99092433c4480a6a59c0078790.tar.bz2
isel: Small cleanup of duplicating comparisons
This is a small cleanup of the duplicating comparison code. There is code generation difference but only for -O0 and -fno-tree-ter (both of which will be fixed in a later patch). The difference is instead of skipping the first use if the comparison uses are only in cond_expr we skip the last use. Also we go through the uses list in the opposite order now too. The cleanups are the following: * Don't call has_single_use as we will do the loop anyways * Change the order of the checks slightly, it is better to check for cond_expr earlier * Use cond_exprs as a stack and pop from it. Skipping the top if the use is only from cond_expr. Bootstrapped and tested on x86_64-linux-gnu with no regressions. gcc/ChangeLog: * gimple-isel.cc (duplicate_comparison): Rename to ... (maybe_duplicate_comparison): This. Add check for use here rather than in its caller. (pass_gimple_isel::execute): Don't check how many uses the comparison had and call maybe_duplicate_comparison instead of duplicate_comparison. Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
Diffstat (limited to 'libobjc/objc-private/sarray.h')
0 files changed, 0 insertions, 0 deletions