aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimplify.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2008-09-01 09:27:39 +0000
committerJan Hubicka <hubicka@gcc.gnu.org>2008-09-01 09:27:39 +0000
commite04ad03daeeb2f8120bd399d54563f085035391d (patch)
treec411e2176e124778ff2eefc610f88cabc4e42a85 /gcc/gimplify.c
parente855c69d162c023bae5236ea75bab646c5e84fed (diff)
downloadgcc-e04ad03daeeb2f8120bd399d54563f085035391d.zip
gcc-e04ad03daeeb2f8120bd399d54563f085035391d.tar.gz
gcc-e04ad03daeeb2f8120bd399d54563f085035391d.tar.bz2
expr.c (MOVE_BY_PIECES_P, [...]): Pass speed operand.
* expr.c (MOVE_BY_PIECES_P, CLEAR_BY_PIECES_P, SET_BY_PIECES_P): Pass speed operand. * expr.h (MOVE_RATIO, CLEAR_RATIO, SET_RATIO): Update. * gimplify.c (gimplify_init_constructor): Add speed operand. * tree-sra.c (decide_block_copy): Likewise. * tree-inline.c (estimate_move_cost): Likewise. * config/alpha/alpha.h (MOVE_RATIO): Update. * config/frv/frv.c (MOVE_RATIO): Update. * config/spu/spu.h (MOVE_RATIO): Update. * config/sparc/sparc.h (MOVE_RATIO): Update. * config/i386/i386.h (MOVE_RATIO, CLEAR_RATIO): Update. * config/m68hc11/m68hc11.h (MOVE_RATIO): Update. * config/cris/cris.h (MOVE_RATIO): Update. * config/mn10300/mn10300.h (MOVE_RATIO): Update. * config/arm/arm.h (MOVE_RATIO): Update. * config/pa/pa.md: Update uses of MOVE_RATIO * config/pa/pa.h (MOVE_RATIO): Update. * config/mips/mips.h (MOVE_RATIO, MOVE_BY_PIECES, CLEAR_RATIO, SET_RATIO): Update. * config/h8300/h8300.h (MOVE_RATIO): Update. * config/v850/v850.h (MOVE_RATIO): Update. * config/bfin/bfin.h (MOVE_RATIO): Update. From-SVN: r139855
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r--gcc/gimplify.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index b0b5e78..0515aac 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -3595,7 +3595,8 @@ gimplify_init_constructor (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p,
if (num_type_elements < 0 && int_size_in_bytes (type) >= 0)
cleared = true;
/* If there are "lots" of zeros, then block clear the object first. */
- else if (num_type_elements - num_nonzero_elements > CLEAR_RATIO
+ else if (num_type_elements - num_nonzero_elements
+ > CLEAR_RATIO (optimize_function_for_speed_p (cfun))
&& num_nonzero_elements < num_type_elements/4)
cleared = true;
/* ??? This bit ought not be needed. For any element not present