Deferring FMA transformations in tight loops
authorMartin Jambor <mjambor@suse.cz>
Fri, 12 Jan 2018 14:06:10 +0000 (15:06 +0100)
committerMartin Jambor <jamborm@gcc.gnu.org>
Fri, 12 Jan 2018 14:06:10 +0000 (15:06 +0100)
commit4a0d0ed28fe9695b95e30b5aea4e45c78420d359
tree5e18b1f41b0315bea315561fce77a37210e2e2f9
parent80c93fa982c59cb94183d225d28e6763f5707025
Deferring FMA transformations in tight loops

2018-01-12  Martin Jambor  <mjambor@suse.cz>

PR target/81616
* params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
* tree-ssa-math-opts.c: Include domwalk.h.
(convert_mult_to_fma_1): New function.
(fma_transformation_info): New type.
(fma_deferring_state): Likewise.
(cancel_fma_deferring): New function.
(result_of_phi): Likewise.
(last_fma_candidate_feeds_initial_phi): Likewise.
(convert_mult_to_fma): Added deferring logic, split actual
transformation to convert_mult_to_fma_1.
(math_opts_dom_walker): New type.
(math_opts_dom_walker::after_dom_children): New method, body moved
here from pass_optimize_widening_mul::execute, added deferring logic
bits.
(pass_optimize_widening_mul::execute): Moved most of code to
math_opts_dom_walker::after_dom_children.
* config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
* config/i386/i386.c (ix86_option_override_internal): Added
maybe_setting of PARAM_AVOID_FMA_MAX_BITS.

From-SVN: r256581
gcc/ChangeLog
gcc/config/i386/i386.c
gcc/config/i386/x86-tune.def
gcc/params.def
gcc/tree-ssa-math-opts.c