aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimplify.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2012-07-25 19:43:15 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2012-07-25 19:43:15 +0000
commitea814c6675874dae704d3ee33b7146c3f5132688 (patch)
treebc5598b0791be6690f4675fc60b70ba3484f2c18 /gcc/gimplify.c
parent2514d7f1ffa6049efcf198c373c4d13cef266b03 (diff)
downloadgcc-ea814c6675874dae704d3ee33b7146c3f5132688.zip
gcc-ea814c6675874dae704d3ee33b7146c3f5132688.tar.gz
gcc-ea814c6675874dae704d3ee33b7146c3f5132688.tar.bz2
expr.c (expand_expr_real_1): Do not expand operand #1 and #2 of BIT_FIELD_REF for ignored results.
* expr.c (expand_expr_real_1): Do not expand operand #1 and #2 of BIT_FIELD_REF for ignored results. * fold-const.c (fold_ternary_loc) <BIT_FIELD_REF>: Check that the CONSTRUCTOR has vector type before using vector accessors on it. * gimplify.c (gimplify_compound_lval): Do not gimplify operand #1 and #2 of BIT_FIELD_REF. (gimplify_expr) <BIT_FIELD_REF>: Likewise. * tree-nested.c (convert_nonlocal_reference_op) <BIT_FIELD_REF>: Do not process operand #1 and #2. (convert_local_reference_op): Likewise. * tree-ssa-pre.c (create_component_ref_by_pieces_1): Remove superfluous breaks throughout. <BIT_FIELD_REF>: Reuse operand #1 and #2 directly. * tree.c (stabilize_reference) <BIT_FIELD_REF>: Do not stabilize operand #1 and #2. (UPDATE_FLAGS): Do not consider operand #2 of BIT_FIELD_REF. (build6_stat): Delete. * tree.h (build6_stat, build6, build6_stat_loc, build6_loc): Likewise. ada/ * gcc-interface/utils2.c (gnat_stabilize_reference) <BIT_FIELD_REF>: Do not stabilize operand #1 and #2. From-SVN: r189864
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r--gcc/gimplify.c27
1 files changed, 4 insertions, 23 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index e14f727..f48b81f 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -2257,7 +2257,7 @@ gimplify_compound_lval (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p,
fallback | fb_lvalue);
ret = MIN (ret, tret);
- /* And finally, the indices and operands to BIT_FIELD_REF. During this
+ /* And finally, the indices and operands of ARRAY_REF. During this
loop we also remove any useless conversions. */
for (; VEC_length (tree, stack) > 0; )
{
@@ -2273,15 +2273,6 @@ gimplify_compound_lval (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p,
ret = MIN (ret, tret);
}
}
- else if (TREE_CODE (t) == BIT_FIELD_REF)
- {
- tret = gimplify_expr (&TREE_OPERAND (t, 1), pre_p, post_p,
- is_gimple_val, fb_rvalue);
- ret = MIN (ret, tret);
- tret = gimplify_expr (&TREE_OPERAND (t, 2), pre_p, post_p,
- is_gimple_val, fb_rvalue);
- ret = MIN (ret, tret);
- }
STRIP_USELESS_TYPE_CONVERSION (TREE_OPERAND (t, 0));
@@ -7406,19 +7397,9 @@ gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p,
break;
case BIT_FIELD_REF:
- {
- enum gimplify_status r0, r1, r2;
-
- r0 = gimplify_expr (&TREE_OPERAND (*expr_p, 0), pre_p,
- post_p, is_gimple_lvalue, fb_either);
- r1 = gimplify_expr (&TREE_OPERAND (*expr_p, 1), pre_p,
- post_p, is_gimple_val, fb_rvalue);
- r2 = gimplify_expr (&TREE_OPERAND (*expr_p, 2), pre_p,
- post_p, is_gimple_val, fb_rvalue);
- recalculate_side_effects (*expr_p);
-
- ret = MIN (r0, MIN (r1, r2));
- }
+ ret = gimplify_expr (&TREE_OPERAND (*expr_p, 0), pre_p,
+ post_p, is_gimple_lvalue, fb_either);
+ recalculate_side_effects (*expr_p);
break;
case TARGET_MEM_REF: