diff options
author | Bernd Edlinger <edlinger@gcc.gnu.org> | 2016-07-11 15:02:12 +0000 |
---|---|---|
committer | Bernd Edlinger <edlinger@gcc.gnu.org> | 2016-07-11 15:02:12 +0000 |
commit | 25b75a48d2a2d0a4d65708da7402f238a10da115 (patch) | |
tree | a354fec980b4a777495acfd3885fe5e1fdd28ff4 /gcc/fold-const.c | |
parent | 9e34db2e031f28f7cc622b6955c241b47bbc081e (diff) | |
download | gcc-25b75a48d2a2d0a4d65708da7402f238a10da115.zip gcc-25b75a48d2a2d0a4d65708da7402f238a10da115.tar.gz gcc-25b75a48d2a2d0a4d65708da7402f238a10da115.tar.bz2 |
Convert TYPE_ALIGN_OK to a TYPE_LANG_FLAG.
2016-07-11 Bernd Edlinger <bernd.edlinger@hotmail.de>
Convert TYPE_ALIGN_OK to a TYPE_LANG_FLAG.
* tree-core.h (tree_base::nothrow_flag): Adjust comment.
(tree_type_common::lang_flag_7): New.
(tree_type_common::spare): Reduce size.
* tree.h (TYPE_ALIGN_OK): Remove.
(TYPE_LANG_FLAG_7): New.
(get_inner_reference): Adjust header.
* print-tree.c (print_node): Adjust.
* expr.c (get_inner_reference): Remove parameter keep_aligning.
(get_bit_range, expand_assignment, expand_expr_addr_expr_1): Adjust
calls to get_inner_reference.
(expand_expr_real_1): Adjust call to get_inner_reference. Remove
handling of TYPE_ALIGN_OK.
* builtins.c (get_object_alignment_2): Adjust call to
get_inner_reference. Remove handling of VIEW_CONVERT_EXPR.
* emit-rtl.c (set_mem_attributes_minus_bitpos): Remove handling of
TYPE_ALIGN_OK.
* asan.c (instrument_derefs): Adjust calls to get_inner_reference.
* cfgexpand.c (expand_debug_expr): Likewise.
* dbxout.c (dbxout_expand_expr): Likewise.
* dwarf2out.c (loc_list_for_address_of_addr_expr_of_indirect_ref,
loc_list_from_tree, fortran_common): Likewise.
* fold-const.c (optimize_bit_field_compare,
decode_field_reference, fold_unary_loc, fold_comparison,
split_address_to_core_and_offset): Likewise.
* gimple-laddress.c (execute): Likewise.
* gimple-ssa-strength-reduction.c (slsr_process_ref): Likewise.
* gimplify.c (gimplify_scan_omp_clauses): Likewise.
* hsa-gen.c (gen_hsa_addr): Likewise.
* simplifx-rtx.c (delegitimize_mem_from_attrs): Likewise.
* tsan.c (instrument_expr): Likewise.
* ubsan.c (instrument_bool_enum_load, instrument_object_size): Likewise.
* tree.c (verify_type_variant): Remove handling of TYPE_ALIGN_OK.
* tree-affine.c (tree_to_aff_combination,
get_inner_reference_aff): Adjust calls to get_inner_reference.
* tree-data-ref.c (split_constant_offset_1,
dr_analyze_innermost): Likewise.
* tree-scalar-evolution.c (interpret_rhs_expr): Likewise.
* tree-sra.c (ipa_sra_check_caller): Likewise.
* tree-ssa-loop-ivopts.c (split_address_cost): Likewise.
* tree-ssa-math-opts.c (find_bswap_or_nop_load,
bswap_replace): Likewise.
* tree-vect-data-refs.c (vect_check_gather,
vect_analyze_data_refs): Likewise.
* config/mips/mips.c (r10k_safe_mem_expr_p): Likewise.
* config/pa/pa.c (pa_emit_move_sequence): Remove handling of
TYPE_ALIGN_OK.
ada:
2016-07-11 Bernd Edlinger <bernd.edlinger@hotmail.de>
Convert TYPE_ALIGN_OK to a TYPE_LANG_FLAG.
* gcc-interface/ada-tree.h (TYPE_ALIGN_OK): Define.
* gcc-interface/trans.c (Attribute_to_gnu): Adjust call to
get_inner_reference.
* gcc-interface/utils2.c (build_unary_op): Likewise.
From-SVN: r238210
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index ac051ff..40a8de1 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -3880,7 +3880,7 @@ optimize_bit_field_compare (location_t loc, enum tree_code code, do anything if the inner expression is a PLACEHOLDER_EXPR since we then will no longer be able to replace it. */ linner = get_inner_reference (lhs, &lbitsize, &lbitpos, &offset, &lmode, - &lunsignedp, &lreversep, &lvolatilep, false); + &lunsignedp, &lreversep, &lvolatilep); if (linner == lhs || lbitsize == GET_MODE_BITSIZE (lmode) || lbitsize < 0 || offset != 0 || TREE_CODE (linner) == PLACEHOLDER_EXPR || lvolatilep) return 0; @@ -3893,7 +3893,7 @@ optimize_bit_field_compare (location_t loc, enum tree_code code, sizes, signedness and storage order are the same. */ rinner = get_inner_reference (rhs, &rbitsize, &rbitpos, &offset, &rmode, - &runsignedp, &rreversep, &rvolatilep, false); + &runsignedp, &rreversep, &rvolatilep); if (rinner == rhs || lbitpos != rbitpos || lbitsize != rbitsize || lunsignedp != runsignedp || lreversep != rreversep || offset != 0 @@ -4075,7 +4075,7 @@ decode_field_reference (location_t loc, tree *exp_, HOST_WIDE_INT *pbitsize, } inner = get_inner_reference (exp, pbitsize, pbitpos, &offset, pmode, - punsignedp, preversep, pvolatilep, false); + punsignedp, preversep, pvolatilep); if ((inner == exp && and_mask == 0) || *pbitsize < 0 || offset != 0 || TREE_CODE (inner) == PLACEHOLDER_EXPR) @@ -7730,7 +7730,7 @@ fold_unary_loc (location_t loc, enum tree_code code, tree type, tree op0) tree base = get_inner_reference (TREE_OPERAND (op0, 0), &bitsize, &bitpos, &offset, &mode, &unsignedp, &reversep, - &volatilep, false); + &volatilep); /* If the reference was to a (constant) zero offset, we can use the address of the base if it has the same base type as the result type and the pointer type is unqualified. */ @@ -8334,7 +8334,7 @@ fold_comparison (location_t loc, enum tree_code code, tree type, base0 = get_inner_reference (TREE_OPERAND (arg0, 0), &bitsize, &bitpos0, &offset0, &mode, - &unsignedp, &reversep, &volatilep, false); + &unsignedp, &reversep, &volatilep); if (TREE_CODE (base0) == INDIRECT_REF) base0 = TREE_OPERAND (base0, 0); else @@ -8349,8 +8349,7 @@ fold_comparison (location_t loc, enum tree_code code, tree type, base0 = get_inner_reference (TREE_OPERAND (base0, 0), &bitsize, &bitpos0, &offset0, &mode, - &unsignedp, &reversep, &volatilep, - false); + &unsignedp, &reversep, &volatilep); if (TREE_CODE (base0) == INDIRECT_REF) base0 = TREE_OPERAND (base0, 0); else @@ -8381,7 +8380,7 @@ fold_comparison (location_t loc, enum tree_code code, tree type, base1 = get_inner_reference (TREE_OPERAND (arg1, 0), &bitsize, &bitpos1, &offset1, &mode, - &unsignedp, &reversep, &volatilep, false); + &unsignedp, &reversep, &volatilep); if (TREE_CODE (base1) == INDIRECT_REF) base1 = TREE_OPERAND (base1, 0); else @@ -8396,8 +8395,7 @@ fold_comparison (location_t loc, enum tree_code code, tree type, base1 = get_inner_reference (TREE_OPERAND (base1, 0), &bitsize, &bitpos1, &offset1, &mode, - &unsignedp, &reversep, &volatilep, - false); + &unsignedp, &reversep, &volatilep); if (TREE_CODE (base1) == INDIRECT_REF) base1 = TREE_OPERAND (base1, 0); else @@ -14295,7 +14293,7 @@ split_address_to_core_and_offset (tree exp, { core = get_inner_reference (TREE_OPERAND (exp, 0), &bitsize, pbitpos, poffset, &mode, &unsignedp, &reversep, - &volatilep, false); + &volatilep); core = build_fold_addr_expr_loc (loc, core); } else |