]> gcc.gnu.org Git - gcc.git/commitdiff
Convert TYPE_ALIGN_OK to a TYPE_LANG_FLAG.
authorBernd Edlinger <edlinger@gcc.gnu.org>
Mon, 11 Jul 2016 15:02:12 +0000 (15:02 +0000)
committerBernd Edlinger <edlinger@gcc.gnu.org>
Mon, 11 Jul 2016 15:02:12 +0000 (15:02 +0000)
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

33 files changed:
gcc/ChangeLog
gcc/ada/ChangeLog
gcc/ada/gcc-interface/ada-tree.h
gcc/ada/gcc-interface/trans.c
gcc/ada/gcc-interface/utils2.c
gcc/asan.c
gcc/builtins.c
gcc/cfgexpand.c
gcc/config/mips/mips.c
gcc/config/pa/pa.c
gcc/dbxout.c
gcc/dwarf2out.c
gcc/emit-rtl.c
gcc/expr.c
gcc/fold-const.c
gcc/gimple-laddress.c
gcc/gimple-ssa-strength-reduction.c
gcc/gimplify.c
gcc/hsa-gen.c
gcc/print-tree.c
gcc/simplify-rtx.c
gcc/tree-affine.c
gcc/tree-core.h
gcc/tree-data-ref.c
gcc/tree-scalar-evolution.c
gcc/tree-sra.c
gcc/tree-ssa-loop-ivopts.c
gcc/tree-ssa-math-opts.c
gcc/tree-vect-data-refs.c
gcc/tree.c
gcc/tree.h
gcc/tsan.c
gcc/ubsan.c

index 1abee42bb9bd10d772a3e20b5059dedf9482dae9..8ddd878527a4b5c9379dda730918aa6e6d23dcba 100644 (file)
@@ -1,3 +1,53 @@
+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.
+
 2016-07-11  David Malcolm  <dmalcolm@redhat.com>
 
        * Makefile.in (selftest-valgrind): New phony target.
@@ -32,7 +82,7 @@
        * lra-constraints.c (process_alt_operands): Check combination of
        reg class and mode.
 
-2016-06-25  Jason Merrill  <jason@redhat.com>
+2016-07-08  Jason Merrill  <jason@redhat.com>
            Richard Biener  <rguenther@suse.de>
 
        P0145: Refining Expression Order for C++.
index 24756a3d570bbd1bcb47ee6cc03d25c0e84a6952..ba624df07f1d142d92e090af8648df8eb3c83482 100644 (file)
@@ -1,3 +1,11 @@
+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.
+
 2016-07-11  Eric Botcazou  <ebotcazou@adacore.com>
 
        * gcc-interface/trans.c (add_decl_expr): Minor tweak.
index cf75ea4000b8fd69a7ffca289a04130d3625ee89..a3d38b1b22e9fd2415fd4451f78919947c87451a 100644 (file)
@@ -199,6 +199,9 @@ do {                                                         \
    alignment value the type ought to have.  */
 #define TYPE_MAX_ALIGN(NODE) (TYPE_PRECISION (RECORD_OR_UNION_CHECK (NODE)))
 
+/* True if objects of tagged types are guaranteed to be properly aligned.  */
+#define TYPE_ALIGN_OK(NODE) TYPE_LANG_FLAG_7 (NODE)
+
 /* For an UNCONSTRAINED_ARRAY_TYPE, this is the record containing both the
    template and the object.
 
index 9d76fb94a733312497f16d8d98daf15003dadb84..57d5235c4a5ce77b507c11e0597be7074feb8b7f 100644 (file)
@@ -2181,7 +2181,7 @@ Attribute_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p, int attribute)
                          && TREE_CODE (gnu_prefix) == FIELD_DECL));
 
        get_inner_reference (gnu_prefix, &bitsize, &bitpos, &gnu_offset,
-                            &mode, &unsignedp, &reversep, &volatilep, false);
+                            &mode, &unsignedp, &reversep, &volatilep);
 
        if (TREE_CODE (gnu_prefix) == COMPONENT_REF)
          {
index 638d59b6f9ca392cd2265b4de607e7f7e6af3f38..1e5b3ef6611045211cdaefef19491a004097e041 100644 (file)
@@ -1419,7 +1419,7 @@ build_unary_op (enum tree_code op_code, tree result_type, tree operand)
 
              inner = get_inner_reference (operand, &bitsize, &bitpos, &offset,
                                           &mode, &unsignedp, &reversep,
-                                          &volatilep, false);
+                                          &volatilep);
 
              /* If INNER is a padding type whose field has a self-referential
                 size, convert to that inner type.  We know the offset is zero
index 71095fb9b1fd2107fb5b2936cbc1b24066052d93..0900634f8ee5da48c2a0097761547edaf7cfad7d 100644 (file)
@@ -1793,7 +1793,7 @@ instrument_derefs (gimple_stmt_iterator *iter, tree t,
   machine_mode mode;
   int unsignedp, reversep, volatilep = 0;
   tree inner = get_inner_reference (t, &bitsize, &bitpos, &offset, &mode,
-                                   &unsignedp, &reversep, &volatilep, false);
+                                   &unsignedp, &reversep, &volatilep);
 
   if (TREE_CODE (t) == COMPONENT_REF
       && DECL_BIT_FIELD_REPRESENTATIVE (TREE_OPERAND (t, 1)) != NULL_TREE)
index 1465c60c98fada5b134593dcd41f2952dda966e2..5f1fd82be926b298ededa0092cc3f6bd0029b0b0 100644 (file)
@@ -259,7 +259,7 @@ get_object_alignment_2 (tree exp, unsigned int *alignp,
   /* Get the innermost object and the constant (bitpos) and possibly
      variable (offset) offset of the access.  */
   exp = get_inner_reference (exp, &bitsize, &bitpos, &offset, &mode,
-                            &unsignedp, &reversep, &volatilep, true);
+                            &unsignedp, &reversep, &volatilep);
 
   /* Extract alignment information from the innermost object and
      possibly adjust bitpos and offset.  */
@@ -289,10 +289,6 @@ get_object_alignment_2 (tree exp, unsigned int *alignp,
       align = DECL_ALIGN (exp);
       known_alignment = true;
     }
-  else if (TREE_CODE (exp) == VIEW_CONVERT_EXPR)
-    {
-      align = TYPE_ALIGN (TREE_TYPE (exp));
-    }
   else if (TREE_CODE (exp) == INDIRECT_REF
           || TREE_CODE (exp) == MEM_REF
           || TREE_CODE (exp) == TARGET_MEM_REF)
index e4ddb3aac9fdd56c0a96b3bc2f7a69ce578f8c21..43a655b01e512dda0dadd422dc6b133c870205b1 100644 (file)
@@ -4444,7 +4444,7 @@ expand_debug_expr (tree exp)
        int reversep, volatilep = 0;
        tree tem
          = get_inner_reference (exp, &bitsize, &bitpos, &offset, &mode1,
-                                &unsignedp, &reversep, &volatilep, false);
+                                &unsignedp, &reversep, &volatilep);
        rtx orig_op0;
 
        if (bitsize == 0)
index df7b1da42ffe76546b1d84a2f1af422d672fb04c..d9edb39c302a40c8f231e1eb73c30a2aa5a71501 100644 (file)
@@ -17470,7 +17470,7 @@ r10k_safe_mem_expr_p (tree expr, unsigned HOST_WIDE_INT offset)
   int unsigned_p, reverse_p, volatile_p;
 
   inner = get_inner_reference (expr, &bitsize, &bitoffset, &var_offset, &mode,
-                              &unsigned_p, &reverse_p, &volatile_p, false);
+                              &unsigned_p, &reverse_p, &volatile_p);
   if (!DECL_P (inner) || !DECL_SIZE_UNIT (inner) || var_offset)
     return false;
 
index 1047f3d61eb28cec5d128f16fc6f655078d9ddd7..2b5a579b34f5ebff46a5917b53ba386b3ed36b8f 100644 (file)
@@ -1929,16 +1929,7 @@ pa_emit_move_sequence (rtx *operands, machine_mode mode, rtx scratch_reg)
                  type = strip_array_types (type);
 
                  if (POINTER_TYPE_P (type))
-                   {
-                     int align;
-
-                     type = TREE_TYPE (type);
-                     /* Using TYPE_ALIGN_OK is rather conservative as
-                        only the ada frontend actually sets it.  */
-                     align = (TYPE_ALIGN_OK (type) ? TYPE_ALIGN (type)
-                              : BITS_PER_UNIT);
-                     mark_reg_pointer (operand0, align);
-                   }
+                   mark_reg_pointer (operand0, BITS_PER_UNIT);
                }
            }
 
index 25a03ef70a38ed9d570f0f69ea29c355cbd5c826..da0987f0f43be65c3f576267760cfefed24bdcbb 100644 (file)
@@ -2485,7 +2485,7 @@ dbxout_expand_expr (tree expr)
        rtx x;
 
        tem = get_inner_reference (expr, &bitsize, &bitpos, &offset, &mode,
-                                  &unsignedp, &reversep, &volatilep, true);
+                                  &unsignedp, &reversep, &volatilep);
 
        x = dbxout_expand_expr (tem);
        if (x == NULL || !MEM_P (x))
index 14dcdf91a57d47d05fac9f7251be6362b204eae6..4c0332f86e998272de2e6f2b3c8c917e0c0387e4 100644 (file)
@@ -15136,7 +15136,7 @@ loc_list_for_address_of_addr_expr_of_indirect_ref (tree loc, bool toplev,
 
   obj = get_inner_reference (TREE_OPERAND (loc, 0),
                             &bitsize, &bitpos, &offset, &mode,
-                            &unsignedp, &reversep, &volatilep, false);
+                            &unsignedp, &reversep, &volatilep);
   STRIP_NOPS (obj);
   if (bitpos % BITS_PER_UNIT)
     {
@@ -16073,7 +16073,7 @@ loc_list_from_tree_1 (tree loc, int want_address,
        int unsignedp, reversep, volatilep = 0;
 
        obj = get_inner_reference (loc, &bitsize, &bitpos, &offset, &mode,
-                                  &unsignedp, &reversep, &volatilep, false);
+                                  &unsignedp, &reversep, &volatilep);
 
        gcc_assert (obj != loc);
 
@@ -17548,7 +17548,7 @@ fortran_common (tree decl, HOST_WIDE_INT *value)
     return NULL_TREE;
 
   cvar = get_inner_reference (val_expr, &bitsize, &bitpos, &offset, &mode,
-                             &unsignedp, &reversep, &volatilep, true);
+                             &unsignedp, &reversep, &volatilep);
 
   if (cvar == NULL_TREE
       || TREE_CODE (cvar) != VAR_DECL
index 4e5ba41565b0679ca685d13449b0426aec628154..055cee9e7a02fe255e8b09781f0aee4ce158b81f 100644 (file)
@@ -1813,9 +1813,9 @@ set_mem_attributes_minus_bitpos (rtx ref, tree t, int objectp,
         able to simply always use TYPE_ALIGN?  */
     }
 
-  /* We can set the alignment from the type if we are making an object,
-     this is an INDIRECT_REF, or if TYPE_ALIGN_OK.  */
-  if (objectp || TREE_CODE (t) == INDIRECT_REF || TYPE_ALIGN_OK (type))
+  /* We can set the alignment from the type if we are making an object or if
+     this is an INDIRECT_REF.  */
+  if (objectp || TREE_CODE (t) == INDIRECT_REF)
     attrs.align = MAX (attrs.align, TYPE_ALIGN (type));
 
   /* If the size is known, we can set that.  */
index 6547be1c377c77aae8aa89a1366a707f666bd30d..fbc91ad667fd46bfe4c6e5e8812ee12019d9ea77 100644 (file)
@@ -4828,7 +4828,7 @@ get_bit_range (unsigned HOST_WIDE_INT *bitstart,
       int unsignedp, reversep, volatilep = 0;
       get_inner_reference (TREE_OPERAND (exp, 0), &rbitsize, &rbitpos,
                           &roffset, &rmode, &unsignedp, &reversep,
-                          &volatilep, false);
+                          &volatilep);
       if ((rbitpos % BITS_PER_UNIT) != 0)
        {
          *bitstart = *bitend = 0;
@@ -4984,7 +4984,7 @@ expand_assignment (tree to, tree from, bool nontemporal)
 
       push_temp_slots ();
       tem = get_inner_reference (to, &bitsize, &bitpos, &offset, &mode1,
-                                &unsignedp, &reversep, &volatilep, true);
+                                &unsignedp, &reversep, &volatilep);
 
       /* Make sure bitpos is not negative, it can wreak havoc later.  */
       if (bitpos < 0)
@@ -6971,27 +6971,13 @@ store_field (rtx target, HOST_WIDE_INT bitsize, HOST_WIDE_INT bitpos,
 
    If the field describes a variable-sized object, *PMODE is set to
    BLKmode and *PBITSIZE is set to -1.  An access cannot be made in
-   this case, but the address of the object can be found.
-
-   If KEEP_ALIGNING is true and the target is STRICT_ALIGNMENT, we don't
-   look through nodes that serve as markers of a greater alignment than
-   the one that can be deduced from the expression.  These nodes make it
-   possible for front-ends to prevent temporaries from being created by
-   the middle-end on alignment considerations.  For that purpose, the
-   normal operating mode at high-level is to always pass FALSE so that
-   the ultimate containing object is really returned; moreover, the
-   associated predicate handled_component_p will always return TRUE
-   on these nodes, thus indicating that they are essentially handled
-   by get_inner_reference.  TRUE should only be passed when the caller
-   is scanning the expression in order to build another representation
-   and specifically knows how to handle these nodes; as such, this is
-   the normal operating mode in the RTL expanders.  */
+   this case, but the address of the object can be found.  */
 
 tree
 get_inner_reference (tree exp, HOST_WIDE_INT *pbitsize,
                     HOST_WIDE_INT *pbitpos, tree *poffset,
                     machine_mode *pmode, int *punsignedp,
-                    int *preversep, int *pvolatilep, bool keep_aligning)
+                    int *preversep, int *pvolatilep)
 {
   tree size_tree = 0;
   machine_mode mode = VOIDmode;
@@ -7113,14 +7099,6 @@ get_inner_reference (tree exp, HOST_WIDE_INT *pbitsize,
          break;
 
        case VIEW_CONVERT_EXPR:
-         if (keep_aligning && STRICT_ALIGNMENT
-             && (TYPE_ALIGN (TREE_TYPE (exp))
-              > TYPE_ALIGN (TREE_TYPE (TREE_OPERAND (exp, 0))))
-             && (TYPE_ALIGN (TREE_TYPE (TREE_OPERAND (exp, 0)))
-                 < BIGGEST_ALIGNMENT)
-             && (TYPE_ALIGN_OK (TREE_TYPE (exp))
-                 || TYPE_ALIGN_OK (TREE_TYPE (TREE_OPERAND (exp, 0)))))
-           goto done;
          break;
 
        case MEM_REF:
@@ -7839,7 +7817,7 @@ expand_expr_addr_expr_1 (tree exp, rtx target, machine_mode tmode,
         they won't change the final object whose address will be returned
         (they actually exist only for that purpose).  */
       inner = get_inner_reference (exp, &bitsize, &bitpos, &offset, &mode1,
-                                  &unsignedp, &reversep, &volatilep, false);
+                                  &unsignedp, &reversep, &volatilep);
       break;
     }
 
@@ -10369,7 +10347,7 @@ expand_expr_real_1 (tree exp, rtx target, machine_mode tmode,
        int reversep, volatilep = 0, must_force_mem;
        tree tem
          = get_inner_reference (exp, &bitsize, &bitpos, &offset, &mode1,
-                                &unsignedp, &reversep, &volatilep, true);
+                                &unsignedp, &reversep, &volatilep);
        rtx orig_op0, memloc;
        bool clear_mem_expr = false;
 
@@ -10767,7 +10745,7 @@ expand_expr_real_1 (tree exp, rtx target, machine_mode tmode,
        int unsignedp, reversep, volatilep = 0;
        tree tem
          = get_inner_reference (treeop0, &bitsize, &bitpos, &offset, &mode1,
-                                &unsignedp, &reversep, &volatilep, true);
+                                &unsignedp, &reversep, &volatilep);
        rtx orig_op0;
 
        /* ??? We should work harder and deal with non-zero offsets.  */
@@ -10878,20 +10856,11 @@ expand_expr_real_1 (tree exp, rtx target, machine_mode tmode,
        {
          enum insn_code icode;
 
-         if (TYPE_ALIGN_OK (type))
-           {
-             /* ??? Copying the MEM without substantially changing it might
-                run afoul of the code handling volatile memory references in
-                store_expr, which assumes that TARGET is returned unmodified
-                if it has been used.  */
-             op0 = copy_rtx (op0);
-             set_mem_align (op0, MAX (MEM_ALIGN (op0), TYPE_ALIGN (type)));
-           }
-         else if (modifier != EXPAND_WRITE
-                  && modifier != EXPAND_MEMORY
-                  && !inner_reference_p
-                  && mode != BLKmode
-                  && MEM_ALIGN (op0) < GET_MODE_ALIGNMENT (mode))
+         if (modifier != EXPAND_WRITE
+             && modifier != EXPAND_MEMORY
+             && !inner_reference_p
+             && mode != BLKmode
+             && MEM_ALIGN (op0) < GET_MODE_ALIGNMENT (mode))
            {
              /* If the target does have special handling for unaligned
                 loads of mode then use them.  */
index ac051ff96ef619499e7c010af89e1c4b0ebd0000..40a8de1c93d607960a6319162efab43bd971f55b 100644 (file)
@@ -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
index 4560b862ffdad5936f1b1bef006e4c1e89662f58..4cc57cf17d27158e2d4d87c9b5aaa4fa3e233643 100644 (file)
@@ -105,7 +105,7 @@ pass_laddress::execute (function *fun)
          int volatilep = 0, reversep, unsignedp = 0;
          base = get_inner_reference (TREE_OPERAND (expr, 0), &bitsize,
                                      &bitpos, &offset, &mode, &unsignedp,
-                                     &reversep, &volatilep, false);
+                                     &reversep, &volatilep);
          gcc_assert (base != NULL_TREE && (bitpos % BITS_PER_UNIT) == 0);
          if (offset != NULL_TREE)
            {
index 0824f17eb00788d14aae0ac7979621e1e1e96675..6e277e7ecde11914911b64c39c7613cbbb973770 100644 (file)
@@ -987,7 +987,7 @@ slsr_process_ref (gimple *gs)
     return;
 
   base = get_inner_reference (ref_expr, &bitsize, &bitpos, &offset, &mode,
-                             &unsignedp, &reversep, &volatilep, false);
+                             &unsignedp, &reversep, &volatilep);
   if (reversep)
     return;
   widest_int index = bitpos;
index 393bcc12208b2b81e334e68a1e20b9217ce0cc28..2ea1e571bdd39f8594dde17d487f5d89000fa690 100644 (file)
@@ -7071,7 +7071,7 @@ gimplify_scan_omp_clauses (tree *list_p, gimple_seq *pre_p,
                    base = TREE_OPERAND (base, 0);
                  base = get_inner_reference (base, &bitsize, &bitpos, &offset,
                                              &mode, &unsignedp, &reversep,
-                                             &volatilep, false);
+                                             &volatilep);
                  tree orig_base = base;
                  if ((TREE_CODE (base) == INDIRECT_REF
                       || (TREE_CODE (base) == MEM_REF
@@ -7207,8 +7207,7 @@ gimplify_scan_omp_clauses (tree *list_p, gimple_seq *pre_p,
                            base = get_inner_reference (base, &bitsize2,
                                                        &bitpos2, &offset2,
                                                        &mode, &unsignedp,
-                                                       &reversep, &volatilep,
-                                                       false);
+                                                       &reversep, &volatilep);
                            if ((TREE_CODE (base) == INDIRECT_REF
                                 || (TREE_CODE (base) == MEM_REF
                                     && integer_zerop (TREE_OPERAND (base,
index cf7d434bce406f554ce45d35033362f47765f9f5..6cf153843636e1b1a595e1262c19e66a780726b5 100644 (file)
@@ -2045,7 +2045,7 @@ gen_hsa_addr (tree ref, hsa_bb *hbb, HOST_WIDE_INT *output_bitsize = NULL,
       int unsignedp, volatilep, preversep;
 
       ref = get_inner_reference (ref, &bitsize, &bitpos, &varoffset, &mode,
-                                &unsignedp, &preversep, &volatilep, false);
+                                &unsignedp, &preversep, &volatilep);
 
       offset = bitpos;
       offset = wi::rshift (offset, LOG2_BITS_PER_UNIT, SIGNED);
index 58b611891e39ecf24dd46bbe713cda256b5557c9..468f1ff49e1deca66630877bd19e2289516fc588 100644 (file)
@@ -316,7 +316,7 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
   if (TREE_USED (node))
     fputs (" used", file);
   if (TREE_NOTHROW (node))
-    fputs (TYPE_P (node) ? " align-ok" : " nothrow", file);
+    fputs (" nothrow", file);
   if (TREE_PUBLIC (node))
     fputs (" public", file);
   if (TREE_PRIVATE (node))
@@ -601,6 +601,8 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
        fputs (" type_5", file);
       if (TYPE_LANG_FLAG_6 (node))
        fputs (" type_6", file);
+      if (TYPE_LANG_FLAG_7 (node))
+       fputs (" type_7", file);
 
       mode = TYPE_MODE (node);
       fprintf (file, " %s", GET_MODE_NAME (mode));
index a23a6f51cde61d57de8d334f6b7b950784cb6a2c..f5c530a45032db8d1ac8c99f3bdbb61f51593c60 100644 (file)
@@ -305,7 +305,7 @@ delegitimize_mem_from_attrs (rtx x)
 
            decl
              = get_inner_reference (decl, &bitsize, &bitpos, &toffset, &mode,
-                                    &unsignedp, &reversep, &volatilep, false);
+                                    &unsignedp, &reversep, &volatilep);
            if (bitsize != GET_MODE_BITSIZE (mode)
                || (bitpos % BITS_PER_UNIT)
                || (toffset && !tree_fits_shwi_p (toffset)))
index 4884241134a7faa0f069a0470ba5ea769d3ddd44..5c4b52101314477ae96de9670209e7cd46178be2 100644 (file)
@@ -318,7 +318,7 @@ tree_to_aff_combination (tree expr, tree type, aff_tree *comb)
        }
       core = get_inner_reference (TREE_OPERAND (expr, 0), &bitsize, &bitpos,
                                  &toffset, &mode, &unsignedp, &reversep,
-                                 &volatilep, false);
+                                 &volatilep);
       if (bitpos % BITS_PER_UNIT != 0)
        break;
       aff_combination_const (comb, type, bitpos / BITS_PER_UNIT);
@@ -888,7 +888,7 @@ get_inner_reference_aff (tree ref, aff_tree *addr, widest_int *size)
   int uns, rev, vol;
   aff_tree tmp;
   tree base = get_inner_reference (ref, &bitsize, &bitpos, &toff, &mode,
-                                  &uns, &rev, &vol, false);
+                                  &uns, &rev, &vol);
   tree base_addr = build_fold_addr_expr (base);
 
   /* ADDR = &BASE + TOFF + BITPOS / BITS_PER_UNIT.  */
index db5b470ea6e7cc130eb12de0e00efee148e22d08..6e8595c3855c69d8a3f4673e2d5e59112db0d13a 100644 (file)
@@ -1154,9 +1154,6 @@ struct GTY(()) tree_base {
            CALL_EXPR
            FUNCTION_DECL
 
-       TYPE_ALIGN_OK in
-           all types
-
        TREE_THIS_NOTRAP in
           INDIRECT_REF, MEM_REF, TARGET_MEM_REF, ARRAY_REF, ARRAY_RANGE_REF
 
@@ -1447,6 +1444,7 @@ struct GTY(()) tree_type_common {
   unsigned lang_flag_4 : 1;
   unsigned lang_flag_5 : 1;
   unsigned lang_flag_6 : 1;
+  unsigned lang_flag_7 : 1;
 
   /* TYPE_ALIGN in log2; this has to be large enough to hold values
      of the maximum of BIGGEST_ALIGNMENT and MAX_OFILE_ALIGNMENT,
@@ -1454,7 +1452,7 @@ struct GTY(()) tree_type_common {
      so we need to store the value 32 (not 31, as we need the zero
      as well), hence six bits.  */
   unsigned align : 6;
-  unsigned spare : 26;
+  unsigned spare : 25;
   alias_set_type alias_set;
   tree pointer_to;
   tree reference_to;
index ed28ca1d6e5a665883ffbf8f8016299d42b6f44f..522ac2c4dc677b5f0debf390381db83cc2d255be 100644 (file)
@@ -618,7 +618,7 @@ split_constant_offset_1 (tree type, tree op0, enum tree_code code, tree op1,
        op0 = TREE_OPERAND (op0, 0);
        base
          = get_inner_reference (op0, &pbitsize, &pbitpos, &poffset, &pmode,
-                                &punsignedp, &preversep, &pvolatilep, false);
+                                &punsignedp, &preversep, &pvolatilep);
 
        if (pbitpos % BITS_PER_UNIT != 0)
          return false;
@@ -771,7 +771,7 @@ dr_analyze_innermost (struct data_reference *dr, struct loop *nest)
     fprintf (dump_file, "analyze_innermost: ");
 
   base = get_inner_reference (ref, &pbitsize, &pbitpos, &poffset, &pmode,
-                             &punsignedp, &preversep, &pvolatilep, false);
+                             &punsignedp, &preversep, &pvolatilep);
   gcc_assert (base != NULL_TREE);
 
   if (pbitpos % BITS_PER_UNIT != 0)
index 2097d81b6cbb25e7e048e44d7d7c49831f6307e1..ae5e907932868c158fd4bf5007e5a003b0dd4fa8 100644 (file)
@@ -1744,8 +1744,7 @@ interpret_rhs_expr (struct loop *loop, gimple *at_stmt,
 
          base = get_inner_reference (TREE_OPERAND (rhs1, 0),
                                      &bitsize, &bitpos, &offset, &mode,
-                                     &unsignedp, &reversep, &volatilep,
-                                     false);
+                                     &unsignedp, &reversep, &volatilep);
 
          if (TREE_CODE (base) == MEM_REF)
            {
index 7c0e90d84bc5fae842e801653b672aa5f1e31ef1..3c7e4c0c9ccf51615f28d656174364288798f15a 100644 (file)
@@ -5230,7 +5230,7 @@ ipa_sra_check_caller (struct cgraph_node *node, void *data)
          machine_mode mode;
          int unsignedp, reversep, volatilep = 0;
          get_inner_reference (arg, &bitsize, &bitpos, &offset, &mode,
-                              &unsignedp, &reversep, &volatilep, false);
+                              &unsignedp, &reversep, &volatilep);
          if (bitpos % BITS_PER_UNIT)
            {
              iscc->bad_arg_alignment = true;
index 6b403f5b72fb4e668a7ee2f8c1a9f2f6032d8505..f5f6e78bff06b1644249c460a3dcf6cdfbd706a8 100644 (file)
@@ -4526,7 +4526,7 @@ split_address_cost (struct ivopts_data *data,
   int unsignedp, reversep, volatilep;
 
   core = get_inner_reference (addr, &bitsize, &bitpos, &toffset, &mode,
-                             &unsignedp, &reversep, &volatilep, false);
+                             &unsignedp, &reversep, &volatilep);
 
   if (toffset != 0
       || bitpos % BITS_PER_UNIT != 0
index d31c12fd818a713ca3d251b9464015b147235bbe..b93bcf348d18a1a68e1def466427815c85a6fd1f 100644 (file)
@@ -2097,7 +2097,7 @@ find_bswap_or_nop_load (gimple *stmt, tree ref, struct symbolic_number *n)
     return false;
 
   base_addr = get_inner_reference (ref, &bitsize, &bitpos, &offset, &mode,
-                                  &unsignedp, &reversep, &volatilep, false);
+                                  &unsignedp, &reversep, &volatilep);
 
   if (TREE_CODE (base_addr) == MEM_REF)
     {
@@ -2640,7 +2640,7 @@ bswap_replace (gimple *cur_stmt, gimple *src_stmt, tree fndecl,
          tree offset;
 
          get_inner_reference (src, &bitsize, &bitpos, &offset, &mode,
-                              &unsignedp, &reversep, &volatilep, false);
+                              &unsignedp, &reversep, &volatilep);
          if (n->range < (unsigned HOST_WIDE_INT) bitsize)
            {
              load_offset = (bitsize - n->range) / BITS_PER_UNIT;
index 6fddd3a1c6894c988751d436df31806bff796b10..353d1df25d494ee17370901b22942f29326f7c21 100644 (file)
@@ -3239,7 +3239,7 @@ vect_check_gather_scatter (gimple *stmt, loop_vec_info loop_vinfo,
      SSA_NAME OFF and put the loop invariants into a tree BASE
      that can be gimplified before the loop.  */
   base = get_inner_reference (base, &pbitsize, &pbitpos, &off, &pmode,
-                             &punsignedp, &reversep, &pvolatilep, false);
+                             &punsignedp, &reversep, &pvolatilep);
   gcc_assert (base && (pbitpos % BITS_PER_UNIT) == 0 && !reversep);
 
   if (TREE_CODE (base) == MEM_REF)
@@ -3709,7 +3709,7 @@ again:
 
          outer_base = get_inner_reference (inner_base, &pbitsize, &pbitpos,
                                            &poffset, &pmode, &punsignedp,
-                                           &preversep, &pvolatilep, false);
+                                           &preversep, &pvolatilep);
          gcc_assert (outer_base != NULL_TREE);
 
          if (pbitpos % BITS_PER_UNIT != 0)
index 22951118e4c47ad3936ec203cbdb1f0ac3d87f23..768424459249b94d43f0afa15c478b089a5bc422 100644 (file)
@@ -13204,7 +13204,6 @@ verify_type_variant (const_tree t, tree tv)
     verify_variant_match (TYPE_REF_CAN_ALIAS_ALL);
   /* FIXME: TYPE_SIZES_GIMPLIFIED may differs for Ada build.  */
   verify_variant_match (TYPE_UNSIGNED);
-  verify_variant_match (TYPE_ALIGN_OK);
   verify_variant_match (TYPE_PACKED);
   if (TREE_CODE (t) == REFERENCE_TYPE)
     verify_variant_match (TYPE_REF_IS_RVALUE);
index 99ed8ffc554b8ba39658ad5b304a92ab30f2ee76..3dcc5600d8e9d945d256f8dc0015c09baeaf209a 100644 (file)
@@ -916,14 +916,6 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int,
 /* In a CALL_EXPR, means call was instrumented by Pointer Bounds Checker.  */
 #define CALL_WITH_BOUNDS_P(NODE) (CALL_EXPR_CHECK (NODE)->base.deprecated_flag)
 
-/* In a type, nonzero means that all objects of the type are guaranteed by the
-   language or front-end to be properly aligned, so we can indicate that a MEM
-   of this type is aligned at least to the alignment of the type, even if it
-   doesn't appear that it is.  We see this, for example, in object-oriented
-   languages where a tag field may show this is an object of a more-aligned
-   variant of the more generic type.  */
-#define TYPE_ALIGN_OK(NODE) (TYPE_CHECK (NODE)->base.nothrow_flag)
-
 /* Used in classes in C++.  */
 #define TREE_PRIVATE(NODE) ((NODE)->base.private_flag)
 /* Used in classes in C++. */
@@ -1960,6 +1952,7 @@ extern machine_mode element_mode (const_tree t);
 #define TYPE_LANG_FLAG_4(NODE) (TYPE_CHECK (NODE)->type_common.lang_flag_4)
 #define TYPE_LANG_FLAG_5(NODE) (TYPE_CHECK (NODE)->type_common.lang_flag_5)
 #define TYPE_LANG_FLAG_6(NODE) (TYPE_CHECK (NODE)->type_common.lang_flag_6)
+#define TYPE_LANG_FLAG_7(NODE) (TYPE_CHECK (NODE)->type_common.lang_flag_7)
 
 /* Used to keep track of visited nodes in tree traversals.  This is set to
    0 by copy_node and make_node.  */
@@ -5387,8 +5380,7 @@ extern bool complete_ctor_at_level_p (const_tree, HOST_WIDE_INT, const_tree);
    look for the ultimate containing object, which is returned and specify
    the access position and size.  */
 extern tree get_inner_reference (tree, HOST_WIDE_INT *, HOST_WIDE_INT *,
-                                tree *, machine_mode *, int *, int *,
-                                int *, bool);
+                                tree *, machine_mode *, int *, int *, int *);
 
 extern tree build_personality_function (const char *);
 
index 47764bc5689e6a8aa5844696bc612826327fb7ff..aa95f4ee69e0eaf0e5a8e9651733c663b0d7ae76 100644 (file)
@@ -110,7 +110,7 @@ instrument_expr (gimple_stmt_iterator gsi, tree expr, bool is_write)
   machine_mode mode;
   int unsignedp, reversep, volatilep = 0;
   base = get_inner_reference (expr, &bitsize, &bitpos, &offset, &mode,
-                             &unsignedp, &reversep, &volatilep, false);
+                             &unsignedp, &reversep, &volatilep);
 
   /* No need to instrument accesses to decls that don't escape,
      they can't escape to other threads then.  */
index c5543f821d8bcf761889d7b75606f29de1da0c79..322fe30720a8e4ea65ce059f6a11cce1f4308485 100644 (file)
@@ -1360,7 +1360,7 @@ instrument_bool_enum_load (gimple_stmt_iterator *gsi)
   machine_mode mode;
   int volatilep = 0, reversep, unsignedp = 0;
   tree base = get_inner_reference (rhs, &bitsize, &bitpos, &offset, &mode,
-                                  &unsignedp, &reversep, &volatilep, false);
+                                  &unsignedp, &reversep, &volatilep);
   tree utype = build_nonstandard_integer_type (modebitsize, 1);
 
   if ((TREE_CODE (base) == VAR_DECL && DECL_HARD_REGISTER (base))
@@ -1781,7 +1781,7 @@ instrument_object_size (gimple_stmt_iterator *gsi, bool is_lhs)
   machine_mode mode;
   int volatilep = 0, reversep, unsignedp = 0;
   tree inner = get_inner_reference (t, &bitsize, &bitpos, &offset, &mode,
-                                   &unsignedp, &reversep, &volatilep, false);
+                                   &unsignedp, &reversep, &volatilep);
 
   if (bitpos % BITS_PER_UNIT != 0
       || bitsize != size_in_bytes * BITS_PER_UNIT)
This page took 0.239458 seconds and 5 git commands to generate.