]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
tree-core.h (tree_block::abstract_flag): Remove.
authorRichard Biener <rguenther@suse.de>
Fri, 5 Oct 2018 11:46:12 +0000 (11:46 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 5 Oct 2018 11:46:12 +0000 (11:46 +0000)
2018-10-05  Richard Biener  <rguenther@suse.de>

* tree-core.h (tree_block::abstract_flag): Remove.
(tree_block::block_num): Make full 32bits.
* tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
* tree.h (BLOCK_ABSTRACT): Remove.
* dwarf2out.c (gen_lexical_block_die): Remove dead code
resulting from BLOCK_ABSTRACT being always false.
(gen_inlined_subroutine_die): Likewise.
(gen_block_die): Likewise.
* tree.c (block_ultimate_origin): Likewise.
* tree-pretty-print.c (dump_block_node): Remove code dealing
with BLOCK_ABSTRACT.
* tree-ssa-live.c (dump_scope_block): Likewise.
* tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
* tree-streamer-out.c (pack_ts_block_value_fields): Likewise.

From-SVN: r264868

gcc/ChangeLog
gcc/dwarf2out.c
gcc/tree-core.h
gcc/tree-pretty-print.c
gcc/tree-ssa-live.c
gcc/tree-streamer-in.c
gcc/tree-streamer-out.c
gcc/tree.c
gcc/tree.def
gcc/tree.h

index b8d4c9cbb7cfe8184569dd4091422c5613870b26..087a37dd5620e48fb53bc5064397613e9e0c23a3 100644 (file)
@@ -1,3 +1,20 @@
+2018-10-05  Richard Biener  <rguenther@suse.de>
+
+       * tree-core.h (tree_block::abstract_flag): Remove.
+       (tree_block::block_num): Make full 32bits.
+       * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
+       * tree.h (BLOCK_ABSTRACT): Remove.
+       * dwarf2out.c (gen_lexical_block_die): Remove dead code
+       resulting from BLOCK_ABSTRACT being always false.
+       (gen_inlined_subroutine_die): Likewise.
+       (gen_block_die): Likewise.
+       * tree.c (block_ultimate_origin): Likewise.
+       * tree-pretty-print.c (dump_block_node): Remove code dealing
+       with BLOCK_ABSTRACT.
+       * tree-ssa-live.c (dump_scope_block): Likewise.
+       * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
+       * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
+
 2018-10-05   Richard Biener  <rguenther@suse.de>
 
        * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
index a63a645e84ad50c9ea69656af8bdece1f475ec42..0772b364919454428075c560851744e7214f43da 100644 (file)
@@ -24009,7 +24009,7 @@ add_high_low_attributes (tree stmt, dw_die_ref die)
        }
       if (attr != NULL
          && ((*ranges_table)[attr->dw_attr_val.v.val_offset].num
-             == BLOCK_NUMBER (superblock))
+             == (int)BLOCK_NUMBER (superblock))
          && BLOCK_FRAGMENT_CHAIN (superblock))
        {
          unsigned long off = attr->dw_attr_val.v.val_offset;
@@ -24019,7 +24019,7 @@ add_high_low_attributes (tree stmt, dw_die_ref die)
            {
              ++supercnt;
              gcc_checking_assert ((*ranges_table)[off + supercnt].num
-                                  == BLOCK_NUMBER (chain));
+                                  == (int)BLOCK_NUMBER (chain));
            }
          gcc_checking_assert ((*ranges_table)[off + supercnt + 1].num == 0);
          for (chain = BLOCK_FRAGMENT_CHAIN (stmt);
@@ -24071,25 +24071,7 @@ gen_lexical_block_die (tree stmt, dw_die_ref context_die)
       equate_block_to_die (stmt, stmt_die);
     }
 
-  if (BLOCK_ABSTRACT (stmt))
-    {
-      if (old_die)
-       {
-         /* This must have been generated early and it won't even
-            need location information since it's a DW_AT_inline
-            function.  */
-         if (flag_checking)
-           for (dw_die_ref c = context_die; c; c = c->die_parent)
-             if (c->die_tag == DW_TAG_inlined_subroutine
-                 || c->die_tag == DW_TAG_subprogram)
-               {
-                 gcc_assert (get_AT (c, DW_AT_inline));
-                 break;
-               }
-         return;
-       }
-    }
-  else if (BLOCK_ABSTRACT_ORIGIN (stmt))
+  if (BLOCK_ABSTRACT_ORIGIN (stmt))
     {
       /* If this is an inlined or conrecte instance, create a new lexical
         die for anything below to attach DW_AT_abstract_origin to.  */
@@ -24109,7 +24091,7 @@ gen_lexical_block_die (tree stmt, dw_die_ref context_die)
   /* A non abstract block whose blocks have already been reordered
      should have the instruction range for this block.  If so, set the
      high/low attributes.  */
-  if (!early_dwarf && !BLOCK_ABSTRACT (stmt) && TREE_ASM_WRITTEN (stmt))
+  if (!early_dwarf && TREE_ASM_WRITTEN (stmt))
     {
       gcc_assert (stmt_die);
       add_high_low_attributes (stmt, stmt_die);
@@ -24123,48 +24105,38 @@ gen_lexical_block_die (tree stmt, dw_die_ref context_die)
 static void
 gen_inlined_subroutine_die (tree stmt, dw_die_ref context_die)
 {
-  tree decl;
-
-  /* The instance of function that is effectively being inlined shall not
-     be abstract.  */
-  gcc_assert (! BLOCK_ABSTRACT (stmt));
-
-  decl = block_ultimate_origin (stmt);
+  tree decl = block_ultimate_origin (stmt);
 
   /* Make sure any inlined functions are known to be inlineable.  */
   gcc_checking_assert (DECL_ABSTRACT_P (decl)
                       || cgraph_function_possibly_inlined_p (decl));
 
-  if (! BLOCK_ABSTRACT (stmt))
-    {
-      dw_die_ref subr_die
-       = new_die (DW_TAG_inlined_subroutine, context_die, stmt);
+  dw_die_ref subr_die = new_die (DW_TAG_inlined_subroutine, context_die, stmt);
 
-      if (call_arg_locations || debug_inline_points)
-       equate_block_to_die (stmt, subr_die);
-      add_abstract_origin_attribute (subr_die, decl);
-      if (TREE_ASM_WRITTEN (stmt))
-        add_high_low_attributes (stmt, subr_die);
-      add_call_src_coords_attributes (stmt, subr_die);
+  if (call_arg_locations || debug_inline_points)
+    equate_block_to_die (stmt, subr_die);
+  add_abstract_origin_attribute (subr_die, decl);
+  if (TREE_ASM_WRITTEN (stmt))
+    add_high_low_attributes (stmt, subr_die);
+  add_call_src_coords_attributes (stmt, subr_die);
 
-      /* The inliner creates an extra BLOCK for the parameter setup,
-         we want to merge that with the actual outermost BLOCK of the
-        inlined function to avoid duplicate locals in consumers.
-        Do that by doing the recursion to subblocks on the single subblock
-        of STMT.  */
-      bool unwrap_one = false;
-      if (BLOCK_SUBBLOCKS (stmt) && !BLOCK_CHAIN (BLOCK_SUBBLOCKS (stmt)))
-       {
-         tree origin = block_ultimate_origin (BLOCK_SUBBLOCKS (stmt));
-         if (origin
-             && TREE_CODE (origin) == BLOCK
-             && BLOCK_SUPERCONTEXT (origin) == decl)
-           unwrap_one = true;
-       }
-      decls_for_scope (stmt, subr_die, !unwrap_one);
-      if (unwrap_one)
-       decls_for_scope (BLOCK_SUBBLOCKS (stmt), subr_die);
+  /* The inliner creates an extra BLOCK for the parameter setup,
+     we want to merge that with the actual outermost BLOCK of the
+     inlined function to avoid duplicate locals in consumers.
+     Do that by doing the recursion to subblocks on the single subblock
+     of STMT.  */
+  bool unwrap_one = false;
+  if (BLOCK_SUBBLOCKS (stmt) && !BLOCK_CHAIN (BLOCK_SUBBLOCKS (stmt)))
+    {
+      tree origin = block_ultimate_origin (BLOCK_SUBBLOCKS (stmt));
+      if (origin
+         && TREE_CODE (origin) == BLOCK
+         && BLOCK_SUPERCONTEXT (origin) == decl)
+       unwrap_one = true;
     }
+  decls_for_scope (stmt, subr_die, !unwrap_one);
+  if (unwrap_one)
+    decls_for_scope (BLOCK_SUBBLOCKS (stmt), subr_die);
 }
 
 /* Generate a DIE for a field in a record, or structure.  CTX is required: see
@@ -25663,8 +25635,7 @@ gen_block_die (tree stmt, dw_die_ref context_die)
        still want to generate high/low PC attributes so output it.  */
     must_output_die = 1;
   else if (TREE_USED (stmt)
-          || TREE_ASM_WRITTEN (stmt)
-          || BLOCK_ABSTRACT (stmt))
+          || TREE_ASM_WRITTEN (stmt))
     {
       /* Determine if this block directly contains any "significant"
         local declarations which we will need to output DIEs for.  */
@@ -25697,23 +25668,7 @@ gen_block_die (tree stmt, dw_die_ref context_die)
   if (must_output_die)
     {
       if (inlined_func)
-       {
-         /* If STMT block is abstract, that means we have been called
-            indirectly from dwarf2out_abstract_function.
-            That function rightfully marks the descendent blocks (of
-            the abstract function it is dealing with) as being abstract,
-            precisely to prevent us from emitting any
-            DW_TAG_inlined_subroutine DIE as a descendent
-            of an abstract function instance. So in that case, we should
-            not call gen_inlined_subroutine_die.
-
-            Later though, when cgraph asks dwarf2out to emit info
-            for the concrete instance of the function decl into which
-            the concrete instance of STMT got inlined, the later will lead
-            to the generation of a DW_TAG_inlined_subroutine DIE.  */
-         if (! BLOCK_ABSTRACT (stmt))
-           gen_inlined_subroutine_die (stmt, context_die);
-       }
+       gen_inlined_subroutine_die (stmt, context_die);
       else
        gen_lexical_block_die (stmt, context_die);
     }
index cd3a2bad08ce5109db3134ce1faad3220fd704ef..7df5c40a3a4e28b13e3fdff6497f2ee961411e0c 100644 (file)
@@ -1481,8 +1481,7 @@ struct GTY(()) tree_block {
   struct tree_base base;
   tree chain;
 
-  unsigned abstract_flag : 1;
-  unsigned block_num : 31;
+  unsigned block_num;
 
   location_t locus;
   location_t end_locus;
index 75b939a9418df970d04e6a134602618e7a5a986a..81414d117e154bd393c2b96a03ebe1ff8213739e 100644 (file)
@@ -1124,9 +1124,6 @@ dump_block_node (pretty_printer *pp, tree block, int spc, dump_flags_t flags)
   if (flags & TDF_ADDRESS)
     pp_printf (pp, "[%p] ", (void *) block);
 
-  if (BLOCK_ABSTRACT (block))
-    pp_string (pp, "[abstract] ");
-
   if (TREE_ASM_WRITTEN (block))
     pp_string (pp, "[written] ");
 
index eee21a63bd708072f8f7cdbe7faf48d7fc681643..3febde886d02543728ef604a2e89be787b629af8 100644 (file)
@@ -643,9 +643,8 @@ dump_scope_block (FILE *file, int indent, tree scope, dump_flags_t flags)
   tree var, t;
   unsigned int i;
 
-  fprintf (file, "\n%*s{ Scope block #%i%s%s",indent, "" , BLOCK_NUMBER (scope),
-          TREE_USED (scope) ? "" : " (unused)",
-          BLOCK_ABSTRACT (scope) ? " (abstract)": "");
+  fprintf (file, "\n%*s{ Scope block #%i%s",indent, "" , BLOCK_NUMBER (scope),
+          TREE_USED (scope) ? "" : " (unused)");
   if (LOCATION_LOCUS (BLOCK_SOURCE_LOCATION (scope)) != UNKNOWN_LOCATION)
     {
       expanded_location s = expand_location (BLOCK_SOURCE_LOCATION (scope));
index 8d8f86957182cdff82333ddc5d6cb850492d0699..bd98ed0b128f27dc7a94bb61b10dd2a36f25f405 100644 (file)
@@ -398,7 +398,6 @@ static void
 unpack_ts_block_value_fields (struct data_in *data_in,
                              struct bitpack_d *bp, tree expr)
 {
-  BLOCK_ABSTRACT (expr) = (unsigned) bp_unpack_value (bp, 1);
   /* BLOCK_NUMBER is recomputed.  */
   stream_input_location (&BLOCK_SOURCE_LOCATION (expr), bp, data_in);
 }
index 60ec1788bf3a6548b6e4aad1667c0220fe9cd7c6..7f97c40277aaade545494216895aa529ad079ce9 100644 (file)
@@ -344,7 +344,6 @@ static void
 pack_ts_block_value_fields (struct output_block *ob,
                            struct bitpack_d *bp, tree expr)
 {
-  bp_pack_value (bp, BLOCK_ABSTRACT (expr), 1);
   /* BLOCK_NUMBER is recomputed.  */
   /* Stream BLOCK_SOURCE_LOCATION for the limited cases we can handle - those
      that represent inlined function scopes.
index d7dca77d2b2af30aed91ef4c0c8b32b4eb772825..f87bc373f566224e8ff7a7619c8b9922a21588d2 100644 (file)
@@ -12142,11 +12142,6 @@ block_ultimate_origin (const_tree block)
 {
   tree origin = BLOCK_ABSTRACT_ORIGIN (block);
 
-  /* BLOCK_ABSTRACT_ORIGIN can point to itself; ignore that if
-     we're trying to output the abstract instance of this function.  */
-  if (BLOCK_ABSTRACT (block) && origin == block)
-    return NULL_TREE;
-
   if (origin == NULL_TREE)
     return NULL_TREE;
   else
index a6882d9288d0044c7e1ec13379611a8cb48437f0..78b499a1d21268e2ef33e2b9b1aab53f49712995 100644 (file)
@@ -70,9 +70,6 @@ DEFTREECODE (TREE_VEC, "tree_vec", tcc_exceptional, 0)
    could either point to another BLOCK node or it could point to a
    FUNCTION_DECL node (e.g. in the case of a block representing the
    outermost scope of a particular inlining of a function).
-   BLOCK_ABSTRACT is nonzero if the block represents an abstract
-   instance of a block (i.e. one which is nested within an abstract
-   instance of an inline function).
    TREE_ASM_WRITTEN is nonzero if the block was actually referenced
    in the generated assembly.  */
 DEFTREECODE (BLOCK, "block", tcc_exceptional, 0)
index 1e59dd59cf39ea8d487be66c88d4288611ceee63..2e45f9db2e34ddccbef87a57a335d03bdcb0f5a2 100644 (file)
@@ -1791,7 +1791,6 @@ extern tree maybe_wrap_with_location (tree, location_t);
 #define BLOCK_ABSTRACT_ORIGIN(NODE) (BLOCK_CHECK (NODE)->block.abstract_origin)
 #define BLOCK_ORIGIN(NODE) \
   (BLOCK_ABSTRACT_ORIGIN(NODE) ? BLOCK_ABSTRACT_ORIGIN(NODE) : (NODE))
-#define BLOCK_ABSTRACT(NODE) (BLOCK_CHECK (NODE)->block.abstract_flag)
 #define BLOCK_DIE(NODE) (BLOCK_CHECK (NODE)->block.die)
 
 /* True if BLOCK has the same ranges as its BLOCK_SUPERCONTEXT.  */