aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vectorizer.h
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2024-11-16 14:04:32 +0100
committerJan Hubicka <hubicka@ucw.cz>2024-11-16 14:05:26 +0100
commitcee7d080d5c2a5fb8125878998b742c040ec88b4 (patch)
tree397771abea3e060969f9fbb45fa3bd113e925816 /gcc/tree-vectorizer.h
parent064c6493c879c4c1a989e67ce5adc32c1be83d67 (diff)
downloadgcc-cee7d080d5c2a5fb8125878998b742c040ec88b4.zip
gcc-cee7d080d5c2a5fb8125878998b742c040ec88b4.tar.gz
gcc-cee7d080d5c2a5fb8125878998b742c040ec88b4.tar.bz2
Ignore conditions guarding __builtin_unreachable in inliner metrics
This extends my last year attempt to make inliner metric ignore conditionals guarding __builtin_unreachable. Compared to previous patch, this one implements a "mini-dce" in ipa-fnsummary to avoid accounting all statements that are only used to determine conditionals guarding __builtin_unnecesary. These will be removed later once value ranges are determined. While working on this, I noticed that we do have a lot of dead code while computing fnsummary for early inline. Those are only used to apply large-function growth, but it seems there is enough dead code to make this valud kind of irrelevant. Also there seems to be quite a lot of const/pure calls that can be cheaply removed before we inline them. So I wonder if we want to run one DCE before early inlining. gcc/ChangeLog: PR tree-optimization/109442 * ipa-fnsummary.cc (builtin_unreachable_bb_p): New function. (guards_builtin_unreachable): New function. (STMT_NECESSARY): New macro. (mark_stmt_necessary): New function. (mark_operand_necessary): New function. (find_necessary_statements): New function. (analyze_function_body): Use it. gcc/testsuite/ChangeLog: * gcc.dg/ipa/fnsummary-1.c: New test.
Diffstat (limited to 'gcc/tree-vectorizer.h')
0 files changed, 0 insertions, 0 deletions