diff options
author | James Greenhalgh <james.greenhalgh@arm.com> | 2014-11-06 14:18:52 +0000 |
---|---|---|
committer | James Greenhalgh <jgreenhalgh@gcc.gnu.org> | 2014-11-06 14:18:52 +0000 |
commit | 5a6bc9c7188163b20276d6dd80c7c76165fdf9c2 (patch) | |
tree | 162af30bab815fda1ca85c7ea7dcbb61d48d87e8 /gcc/tree-sra.c | |
parent | 34896cd612476e1ee0937ff5bd32f597da944866 (diff) | |
download | gcc-5a6bc9c7188163b20276d6dd80c7c76165fdf9c2.zip gcc-5a6bc9c7188163b20276d6dd80c7c76165fdf9c2.tar.gz gcc-5a6bc9c7188163b20276d6dd80c7c76165fdf9c2.tar.bz2 |
[Patchv3] Control SRA and IPA-SRA by a param rather than MOVE_RATIO
gcc/
* params.def (sra-max-scalarization-size-Ospeed): New.
(sra-max-scalarization-size-Osize): Likewise.
* doc/invoke.texi (sra-max-scalarization-size-Ospeed): Document.
(sra-max-scalarization-size-Osize): Likewise.
* toplev.c (process_options): Set default values for new
parameters.
* tree-sra.c (analyze_all_variable_accesses): Use new parameters.
* targhooks.c (get_move_ratio): Remove static designator.
* target.h (get_move_ratio): Declare.
From-SVN: r217191
Diffstat (limited to 'gcc/tree-sra.c')
-rw-r--r-- | gcc/tree-sra.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c index b723ca5..1e629bc 100644 --- a/gcc/tree-sra.c +++ b/gcc/tree-sra.c @@ -2511,10 +2511,12 @@ analyze_all_variable_accesses (void) int res = 0; bitmap tmp = BITMAP_ALLOC (NULL); bitmap_iterator bi; - unsigned i, max_total_scalarization_size; - - max_total_scalarization_size = UNITS_PER_WORD * BITS_PER_UNIT - * MOVE_RATIO (optimize_function_for_speed_p (cfun)); + unsigned i; + unsigned max_scalarization_size + = (optimize_function_for_size_p (cfun) + ? PARAM_VALUE (PARAM_SRA_MAX_SCALARIZATION_SIZE_SIZE) + : PARAM_VALUE (PARAM_SRA_MAX_SCALARIZATION_SIZE_SPEED)) + * BITS_PER_UNIT; EXECUTE_IF_SET_IN_BITMAP (candidate_bitmap, 0, i, bi) if (bitmap_bit_p (should_scalarize_away_bitmap, i) @@ -2526,7 +2528,7 @@ analyze_all_variable_accesses (void) && type_consists_of_records_p (TREE_TYPE (var))) { if (tree_to_uhwi (TYPE_SIZE (TREE_TYPE (var))) - <= max_total_scalarization_size) + <= max_scalarization_size) { completely_scalarize_var (var); if (dump_file && (dump_flags & TDF_DETAILS)) |