PR tree-optimization/79390
commite000adb99a2cbe03e98b79878c28f1ca6fe986ef
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 4 Apr 2017 17:52:27 +0000 (4 17:52 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 4 Apr 2017 17:52:27 +0000 (4 17:52 +0000)
tree90baf0fa1babd2f5a7a6862baa9740fc718762aa
parent3494d6a26d52e0773821977722aea5a7809af9b5
PR tree-optimization/79390
* target.h (struct noce_if_info): Declare.
* targhooks.h (default_noce_conversion_profitable_p): Declare.
* target.def (noce_conversion_profitable_p): New target hook.
* ifcvt.h (struct noce_if_info): New type, moved from ...
* ifcvt.c (struct noce_if_info): ... here.
(noce_conversion_profitable_p): Renamed to ...
(default_noce_conversion_profitable_p): ... this.  No longer
static nor inline.
(noce_try_store_flag_constants, noce_try_addcc,
noce_try_store_flag_mask, noce_try_cmove, noce_try_cmove_arith,
noce_convert_multiple_sets): Use targetm.noce_conversion_profitable_p
instead of noce_conversion_profitable_p.
* config/i386/i386.c: Include ifcvt.h.
(ix86_option_override_internal): Don't override
PARAM_MAX_RTL_IF_CONVERSION_INSNS default.
(ix86_noce_conversion_profitable_p): New function.
(TARGET_NOCE_CONVERSION_PROFITABLE_P): Redefine.
* config/i386/x86-tune.def (X86_TUNE_ONE_IF_CONV_INSN): Adjust comment.
* doc/tm.texi.in (TARGET_NOCE_CONVERSION_PROFITABLE_P): Add.
* doc/tm.texi: Regenerated.

* gcc.target/i386/pr79390.c: New test.
* gcc.dg/ifcvt-4.c: Use -mtune-ctrl=^one_if_conv_insn for i?86/x86_64.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@246686 138bc75d-0d04-0410-961f-82ee72b054a4
13 files changed:
gcc/ChangeLog
gcc/config/i386/i386.c
gcc/config/i386/x86-tune.def
gcc/doc/tm.texi
gcc/doc/tm.texi.in
gcc/ifcvt.c
gcc/ifcvt.h
gcc/target.def
gcc/target.h
gcc/targhooks.h
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/ifcvt-4.c
gcc/testsuite/gcc.target/i386/pr79390.c [new file with mode: 0644]