This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
question on find_if_case_2 in ifcvt.c
- From: "Amker.Cheng" <amker dot cheng at gmail dot com>
- To: gcc at gcc dot gnu dot org
- Date: Fri, 9 Sep 2011 10:20:00 +0800
- Subject: 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.