Message ID | alpine.LFD.2.21.2012031055400.656242@eddie.linux-mips.org |
---|---|
State | Accepted |
Headers | show |
Series | Add missing calls to `onlyjump_p' | expand |
On 12/3/20 4:34 AM, Maciej W. Rozycki wrote: > If any unconditional jumps within a block have side effects then the > block cannot be considered empty. > > gcc/ > * cfgrtl.c (rtl_block_empty_p): Return false if `!onlyjump_p' > too. OK jeff
Index: gcc/gcc/cfgrtl.c =================================================================== --- gcc.orig/gcc/cfgrtl.c +++ gcc/gcc/cfgrtl.c @@ -4860,7 +4860,8 @@ rtl_block_empty_p (basic_block bb) return true; FOR_BB_INSNS (bb, insn) - if (NONDEBUG_INSN_P (insn) && !any_uncondjump_p (insn)) + if (NONDEBUG_INSN_P (insn) + && (!any_uncondjump_p (insn) || !onlyjump_p (insn))) return false; return true;