aboutsummaryrefslogtreecommitdiff
path: root/gcc/cfgcleanup.cc
diff options
context:
space:
mode:
authorJeff Law <jeffreyalaw@gmail.com>2022-09-25 12:23:59 -0400
committerJeff Law <jeffreyalaw@gmail.com>2022-09-26 09:40:41 -0400
commit1b74b5cb4e9d7191f298245063a8f9c3a1bbeff4 (patch)
tree49bc167265f9dd5ef9e7fa564d63d0ad64227712 /gcc/cfgcleanup.cc
parent386ebf75f4c0342b1f823f4e4aba07abda3288d1 (diff)
downloadgcc-1b74b5cb4e9d7191f298245063a8f9c3a1bbeff4.zip
gcc-1b74b5cb4e9d7191f298245063a8f9c3a1bbeff4.tar.gz
gcc-1b74b5cb4e9d7191f298245063a8f9c3a1bbeff4.tar.bz2
[RFA] Minor improvement to coremark, avoid unconditional jump to return
gcc/ * cfgcleanup.cc (bb_is_just_return): No longer static. * cfgcleanup.h (bb_is_just_return): Add prototype. * cfgrtl.cc (fixup_reorder_chain): Do not create an unconditional jump to a return block. Conditionally remove unreachable blocks. gcc/testsuite/ * gcc.target/riscv/ret-1.c: New test.
Diffstat (limited to 'gcc/cfgcleanup.cc')
-rw-r--r--gcc/cfgcleanup.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cfgcleanup.cc b/gcc/cfgcleanup.cc
index a8b0139..a363e0b 100644
--- a/gcc/cfgcleanup.cc
+++ b/gcc/cfgcleanup.cc
@@ -2599,7 +2599,7 @@ trivially_empty_bb_p (basic_block bb)
return value. Fill in *RET and *USE with the return and use insns
if any found, otherwise NULL. All CLOBBERs are ignored. */
-static bool
+bool
bb_is_just_return (basic_block bb, rtx_insn **ret, rtx_insn **use)
{
*ret = *use = NULL;