On 12/19/13 13:34, Jakub Jelinek wrote:
On Thu, Dec 19, 2013 at 12:38:49PM +0100, Steven Bosscher wrote:
Why not use active_insn_p instead of hand-checks for USE and CLOBBER insns?

Because it brings in the JUMP_TABLE_DATA mess into the picture?

Not as long as you look only between BB_HEAD and BB_END
(JUMP_TABLE_DATA only appears outside basic blocks). AFAICT the code
your patch touches only looks at insns contained in basic blocks.

So like this instead?  Bootstrapped/regtested on x86_64-linux and
i686-linux.  For 4.8 I'd still prefer the earlier patch though.

2013-12-18  Jakub Jelinek  <ja...@redhat.com>

        PR rtl-optimization/58668
        * cfgcleanup.c (flow_find_cross_jump): Don't count
        any jumps if dir_p is NULL.  Remove p1 variable, use active_insn_p
        to determine what is counted.
        (flow_find_head_matching_sequence): Use active_insn_p to determine
        what is counted.
        (try_head_merge_bb): Adjust for the flow_find_head_matching_sequence
        counting change.
        * ifcvt.c (count_bb_insns): Use active_insn_p && !JUMP_P to
        determine what is counted.

        * gcc.dg/pr58668.c: New test.
This is fine for the trunk. Release manager's call for what they'd prefer on the 4.8 branch.
jeff

Reply via email to