aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/parser.cc
diff options
context:
space:
mode:
authorAndrew Pinski <quic_apinski@quicinc.com>2024-05-14 06:29:18 -0700
committerAndrew Pinski <quic_apinski@quicinc.com>2024-05-15 01:07:55 -0700
commit642f31d6286b8a342130fbface51530befd975fd (patch)
treed07c867b9cdf14c2274e47eb8df4a13fa186d31e /gcc/cp/parser.cc
parente410ad74e5e4589aeb666aa298b2f933e7b5d9e7 (diff)
downloadgcc-642f31d6286b8a342130fbface51530befd975fd.zip
gcc-642f31d6286b8a342130fbface51530befd975fd.tar.gz
gcc-642f31d6286b8a342130fbface51530befd975fd.tar.bz2
tree-cfg: Move the returns_twice check to be last statement only [PR114301]
When I was checking to making sure that all of the bugs dealing with the case where gimple_can_duplicate_bb_p would return false was fixed, I noticed that the code which was checking if a call statement was returns_twice was checking all call statements rather than just the last statement. Since calling gimple_call_flags has a small non-zero overhead due to a few string comparison, removing the uses of it can have a small performance improvement. In the case of returns_twice functions calls, will always end the basic-block due to the check in stmt_can_terminate_bb_p (and others). So checking only the last statement is a small optimization and will be safe. Bootstrapped and tested pon x86_64-linux-gnu with no regressions. PR tree-optimization/114301 gcc/ChangeLog: * tree-cfg.cc (gimple_can_duplicate_bb_p): Check returns_twice only on the last call statement rather than all. Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
Diffstat (limited to 'gcc/cp/parser.cc')
0 files changed, 0 insertions, 0 deletions