Deferring FMA transformations in tight loops

Programming / Compilers / GCC - jamborm [138bc75d-0d04-0410-961f-82ee72b054a4] - 12 January 2018 14:06 EST

2018-01-12 Martin Jambor

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.

ed306e55b84 Deferring FMA transformations in tight loops
gcc/ChangeLog | 23 ++
gcc/config/i386/i386.c | 5 +
gcc/config/i386/x86-tune.def | 4 +
gcc/params.def | 5 +
gcc/tree-ssa-math-opts.c | 517 ++++++++++++++++++++++++++++++++-----------
5 files changed, 426 insertions(+), 128 deletions(-)

Upstream: gcc.gnu.org


  • Share