This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Unroller with branch and count patch


This patch is intended for GCC mainline. It enables the GCC 3.4 new
unroller to work with loops ending with an branch and count instruction
(this is a frequent case on Power due to the doloop optimization).
It corrects the regression seen for the GCC 3.4 new unroller on Power
platforms for the option -funroll-loops (we intend to submit this patch
also to GCC 3.4).

Testing was done on Power4. Bootstrapping was done by
adding -funroll-loops to -O2 level of optimization (as our changes
affect the unrolling). Regression test passed successfully.

Mircea Namolaru

2004-02-15  Mircea Namolaru  <namolaru@il.ibm.com>

        * cfgloop.h (get_var_set_from_bct, is_bct_cond): Declaration of 
new
        functions.
        * cfgloopanal.c: Include loop.h.
        (get_var_set_from_bct, is_bct_cond): New functions.
        (blocks_single_set_registers, count_loop_iterations, 
simple_increment):
        Handle branch and count jumps.
        * doloop.c (doloop_condition_get): Export.
        * loop-init.c (fixup_loop_exit_succesor): New function.
        (loop_optimizer_finalize): Handle loops ending with branch and 
count
        jumps.
        * loop-unroll.c: Include toplev.h
        (discard_increment, expand_bct): New functions.
        (peel_loop_completely,
        unroll_loop_constant_iterations, unroll_loop_runtime_iterations):
        Handle the removal of branch and count jumps.
        * loop.h (doloop_condition_get): Declare.

Attachment: uroll.patch
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]