[PATCH] Rename/export combine_insn_cost as insn_rtx_cost

Zack Weinberg zack@codesourcery.com
Fri Jul 16 12:53:00 GMT 2004


Roger Sayle <roger@eyesopen.com> writes:

> Finally, I noticed that we were calling rtx_cost with CALL and
> branch instructions.  Asking the backend for the cost of a
> subroutine call doesn't make much sense (yet :>), so this patch
> tightens up the existing INSN_P checks to become NONJUMP_INSN_P
> checks before calling insn_rtx_cost.  Hence, we disable if-conversion
> if a basic block to be unconditionalized contains a subroutine
> call, and we reallow combine to always recombine/merge sequences
> containing call or branch instructions.

Some targets (ARM, ia64) have the ability to conditionalize an entire
call sequence.  I'm not sure about ARM, but on ia64 being able to
rewrite 

        (p6) br.cond.dptk .L1
        ;;
        .mib
        nop.m 0
        nop.i 0
        br.call.sptk.many b0 = foo#
        ;;
        .mii
        mov r1 = r35
        nop.i 0
        nop.i 0
.L1:

into

        (p6) br.call.dpnt.many b0 = foo#
        ;;
        (p6) mov r1 = r35

is definitely a win.  Now I don't think we've ever been able to do
this, but I would hate to rule out the possibility always and
forevermore.

zw



More information about the Gcc-patches mailing list