diff options
author | hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-09-06 16:42:47 +0000 |
---|---|---|
committer | hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-09-06 16:42:47 +0000 |
commit | 5b1c765da5574d7586afc19c043d00b17490694a (patch) | |
tree | 1f9104f6409decb81158ba4c73d5eed24b186893 /gcc/hooks.c | |
parent | 9d17b4a85800417f8125b21a4c1c686e4017e1f6 (diff) | |
download | gcc-5b1c765da5574d7586afc19c043d00b17490694a.tar.gz |
PR middle-end/44382: Tree reassociation improvement
gcc/
2011-09-06 Enkovich Ilya <ilya.enkovich@intel.com>
PR middle-end/44382
* target.def (reassociation_width): New hook.
* doc/tm.texi.in (reassociation_width): Likewise.
* doc/tm.texi (reassociation_width): Likewise.
* doc/invoke.texi (tree-reassoc-width): New param documented.
* hooks.h (hook_int_uint_mode_1): New default hook.
* hooks.c (hook_int_uint_mode_1): Likewise.
* config/i386/i386.h (ix86_tune_indices): Add
X86_TUNE_REASSOC_INT_TO_PARALLEL and
X86_TUNE_REASSOC_FP_TO_PARALLEL.
(TARGET_REASSOC_INT_TO_PARALLEL): New.
(TARGET_REASSOC_FP_TO_PARALLEL): Likewise.
* config/i386/i386.c (initial_ix86_tune_features): Add
X86_TUNE_REASSOC_INT_TO_PARALLEL and
X86_TUNE_REASSOC_FP_TO_PARALLEL.
(ix86_reassociation_width) implementation of
new hook for i386 target.
* params.def (PARAM_TREE_REASSOC_WIDTH): New param added.
* tree-ssa-reassoc.c (get_required_cycles): New function.
(get_reassociation_width): Likewise.
(swap_ops_for_binary_stmt): Likewise.
(rewrite_expr_tree_parallel): Likewise.
(rewrite_expr_tree): Refactored. Part of code moved into
swap_ops_for_binary_stmt.
(reassociate_bb): Now checks reassociation width to be used
and call rewrite_expr_tree_parallel instead of rewrite_expr_tree
if needed.
gcc/testsuite/
2011-09-06 Enkovich Ilya <ilya.enkovich@intel.com>
* gcc.dg/tree-ssa/pr38533.c (dg-options): Added option
--param tree-reassoc-width=1.
* gcc.dg/tree-ssa/reassoc-24.c: New test.
* gcc.dg/tree-ssa/reassoc-25.c: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178602 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/hooks.c')
-rw-r--r-- | gcc/hooks.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/hooks.c b/gcc/hooks.c index 90251834e4e..1ba44f9c7bb 100644 --- a/gcc/hooks.c +++ b/gcc/hooks.c @@ -161,6 +161,13 @@ default_can_output_mi_thunk_no_vcall (const_tree a ATTRIBUTE_UNUSED, } int +hook_int_uint_mode_1 (unsigned int a ATTRIBUTE_UNUSED, + enum machine_mode b ATTRIBUTE_UNUSED) +{ + return 1; +} + +int hook_int_const_tree_0 (const_tree a ATTRIBUTE_UNUSED) { return 0; |