[PATCH] Fix PR rtl-optimization/34999 (re-submission)

Revital1 Eres ERES@il.ibm.com
Wed Feb 20 13:25:00 GMT 2008


Hello,

This patch contains a fix for fallthru edges that cross between hot and
cold sections.  It is a slightly different version from the original
posting in - http://gcc.gnu.org/ml/gcc-patches/2008-01/msg01511.html

Here is again the description of the problem -

The code for fixing up fallthru edges that cross between hot and cold
sections is in add_labels_and_missing_jumps () and fix_up_fall_thru_edges
() functions.  The first function deals with fallthru edges with
single successor and the later deals with fallthru edges with more
than one successor.  Both of the functions do not take into account the
fact that a basic-block with a crossing edge can end with a call insn.
This patch tries to address this scenario.

The patch was tested with -O2 on powerpc64-linux and x86_64.

OK for mainline?

Thanks,
Revital


PR rtl-optimization/34999
        * bb-reorder.c (add_labels_and_missing_jumps): Do not handle
        crossing edges that ends with a call insn.
        (fix_up_fall_thru_edges): Handle crossing edges that ends with a
        call insn and clear the EDGE_CROSSING flag of the crossing edge
        when fixing fallthru edges.

testuite:

        PR rtl-optimization/34999
        * gcc.dg/tree-prof/pr34999.c: New.

(See attached file: pr34999.c.txt)(See attached file: patch_pr34999.txt)
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pr34999.c.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20080220/a3565d03/attachment.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch_pr34999.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20080220/a3565d03/attachment-0001.txt>


More information about the Gcc-patches mailing list