This is the mail archive of the gcc@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]

question on find_if_case_2 in ifcvt.c


Hi,
In ifcvt.c's function find_if_case_2, it uses cheap_bb_rtx_cost_p to
judge the conversion.

Function cheap_bb_rtx_cost_p checks whether the total insn_rtx_cost on
non-jump insns in
basic block BB is less than MAX_COST.

So the question is why uses cheap_bb_rtx_cost_p, even when we know the
ELSE is predicted,
which means there is benefit from this conversion anyway.
Second, should cheap_bb_rtx_cost_p be tuned as "checks whether the
total insn_rtx_cost on
non-jump insns in basic block BB is no larger than MAX_COST." to
prefer normal instructions
than branch even there have same costs.

Any suggestions? Thanks in advance.
-- 
Best Regards.


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