]> git.ipfire.org Git - thirdparty/gcc.git/commit
rtlanal.c (insn_rtx_cost): New function, moved and renamed from combine.c's combine_i...
authorRoger Sayle <roger@eyesopen.com>
Sun, 11 Jul 2004 14:37:57 +0000 (14:37 +0000)
committerRoger Sayle <sayle@gcc.gnu.org>
Sun, 11 Jul 2004 14:37:57 +0000 (14:37 +0000)
commit6fd21094e5a9d8517b00bffa08f132759baefbbc
treead634004c869136a8ba76616632680e13bc31501
parent06a67bdd66ac806bea322b14f4e94fd03ad444f2
rtlanal.c (insn_rtx_cost): New function, moved and renamed from combine.c's combine_insn_cost.

* rtlanal.c (insn_rtx_cost): New function, moved and renamed from
combine.c's combine_insn_cost.
* rtl.h (insn_rtx_cost): Prototype here.
* combine.c (combine_insn_cost): Delete function.
(combine_validate_cost): Update callers of combine_insn_cost to
call insn_rtx_cost instead.
(combine_instructions): Likewise.  Use NONJUMP_INSN_P to avoid
requesting the rtx_cost of call and/or jump instructions.

* ifcvt.c (total_bb_rtx_cost): Use insn_rtx_cost instead of calling
rtx_cost directly.  Don't request/use the cost of call or jump
instructions.  Return -1 if the cost of any instruction can't be
determined (or the BB contains a function call).
(find_if_case_1): Abort transformation if total_bb_rtx_cost returns
-1 (i.e. can't determine the cost of any instruction or the basic
block contains a subroutine call).
(find_if_case_2): Likewise.

From-SVN: r84513
gcc/ChangeLog
gcc/combine.c
gcc/ifcvt.c
gcc/rtl.h
gcc/rtlanal.c