[Patch 2/2 ifcvt costs] Introduce a new cost model for ifcvt.
authorJames Greenhalgh <james.greenhalgh@arm.com>
Thu, 21 Jul 2016 15:40:24 +0000 (15:40 +0000)
committerJames Greenhalgh <jgreenhalgh@gcc.gnu.org>
Thu, 21 Jul 2016 15:40:24 +0000 (15:40 +0000)
commitebe8f3226c94173073958da74e9acb4e444e4097
tree94d49a3e300111ba52839793deb9962c71231c92
parente914c11a99833c265aef1256fdd113129d4b8a0d
[Patch 2/2 ifcvt costs] Introduce a new cost model for ifcvt.

gcc/

* ifcvt.c (noce_if_info): New fields: speed_p, original_cost,
max_seq_cost.  Removed fields: then_cost, else_cost, branch_cost.
(noce_conversion_profitable_p): New.
(noce_try_store_flag_constants): Use it.
(noce_try_addcc): Likewise.
(noce_try_store_flag_mask): Likewise.
(noce_try_cmove): Likewise.
(noce_try_cmove_arith): Likewise.
(bb_valid_for_noce_process_p): Add to the cost parameter rather than
overwriting it.
(noce_convert_multiple_sets): Move cost model to here, from...
(bb_ok_for_noce_convert_multiple_sets) ...here.
(noce_process_if_block): Update calls for above changes.
(noce_find_if_block): Record new noce_if_info parameters.

gcc/testsuite/

* gcc.dg/ifcvt-2.c: Use parameter to guide if-conversion heuristics.
* gcc.dg/ifcvt-3.c: Use parameter to guide if-conversion heuristics.
* gcc.dg/pr68435.c: Use parameter to guide if-conversion heuristics.
* gcc.dg/ifcvt-4.c: Use parameter to guide if-conversion heuristics.
* gcc.dg/ifcvt-5.c: Use parameter to guide if-conversion heuristics.

From-SVN: r238594
gcc/ChangeLog
gcc/ifcvt.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/ifcvt-2.c
gcc/testsuite/gcc.dg/ifcvt-3.c
gcc/testsuite/gcc.dg/ifcvt-4.c
gcc/testsuite/gcc.dg/ifcvt-5.c
gcc/testsuite/gcc.dg/pr68435.c