summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-phiopt.c
diff options
context:
space:
mode:
authorwschmidt <wschmidt@138bc75d-0d04-0410-961f-82ee72b054a4>2012-06-13 12:33:55 +0000
committerwschmidt <wschmidt@138bc75d-0d04-0410-961f-82ee72b054a4>2012-06-13 12:33:55 +0000
commit6f0ddab12afc5d7427c48bc7d9c26e3629875bd5 (patch)
tree7319899bbd978efd17dfe32407a4db522cad804b /gcc/tree-ssa-phiopt.c
parentd13adc778dc54efc4fdd0aba6c72a6e50296bf08 (diff)
downloadgcc-6f0ddab12afc5d7427c48bc7d9c26e3629875bd5.tar.gz
2012-06-13 Bill Schmidt <wschmidt@linux.ibm.com>
PR tree-optimization/53647 * tree-ssa-phiopt.c (gate_hoist_loads): Skip transformation for targets with no defined cache line size. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@188509 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-phiopt.c')
-rw-r--r--gcc/tree-ssa-phiopt.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/tree-ssa-phiopt.c b/gcc/tree-ssa-phiopt.c
index 6e47f6f85b3..c64e8e2a984 100644
--- a/gcc/tree-ssa-phiopt.c
+++ b/gcc/tree-ssa-phiopt.c
@@ -1976,12 +1976,14 @@ hoist_adjacent_loads (basic_block bb0, basic_block bb1,
/* Determine whether we should attempt to hoist adjacent loads out of
diamond patterns in pass_phiopt. Always hoist loads if
-fhoist-adjacent-loads is specified and the target machine has
- a conditional move instruction. */
+ both a conditional move instruction and a defined cache line size. */
static bool
gate_hoist_loads (void)
{
- return (flag_hoist_adjacent_loads == 1 && HAVE_conditional_move);
+ return (flag_hoist_adjacent_loads == 1
+ && PARAM_VALUE (PARAM_L1_CACHE_LINE_SIZE)
+ && HAVE_conditional_move);
}
/* Always do these optimizations if we have SSA