public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 06/10] tree-ssa-ter.c: remove typedefs that hide pointerness
  2015-09-03  5:26 [PATCH 00/10] removal of typedefs that hide pointerness episode 1 tbsaunde+gcc
@ 2015-09-03  5:26 ` tbsaunde+gcc
  2015-09-03  5:27 ` [PATCH 02/10] dse.c: remove some " tbsaunde+gcc
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 16+ messages in thread
From: tbsaunde+gcc @ 2015-09-03  5:26 UTC (permalink / raw)
  To: gcc-patches

From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org>

gcc/ChangeLog:

2015-09-03  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* tree-ssa-ter.c (temp_expr_table_d): Rename to temp_expr_table
	and remove typedef.
	(new_temp_expr_table): Adjust.
	(free_temp_expr_table): Likewise.
	(version_to_be_replaced_p): Likewise.
	(make_dependent_on_partition): Likewise.
	(add_to_partition_kill_list): Likewise.
	(remove_from_partition_kill_list): Likewise.
	(add_dependence): Likewise.
	(finished_with_expr): Likewise.
	(process_replaceable): Likewise.
	(kill_expr): Likewise.
	(kill_virtual_exprs): Likewise.
	(mark_replaceable): Likewise.
	(find_replaceable_in_bb): Likewise.
	(find_replaceable_exprs): Likewise.
	(debug_ter): Likewise.
---
 gcc/tree-ssa-ter.c | 39 +++++++++++++++++++--------------------
 1 file changed, 19 insertions(+), 20 deletions(-)

diff --git a/gcc/tree-ssa-ter.c b/gcc/tree-ssa-ter.c
index f7ca95b..17686a9 100644
--- a/gcc/tree-ssa-ter.c
+++ b/gcc/tree-ssa-ter.c
@@ -162,7 +162,7 @@ along with GCC; see the file COPYING3.  If not see
 
 /* Temporary Expression Replacement (TER) table information.  */
 
-typedef struct temp_expr_table_d
+struct temp_expr_table
 {
   var_map map;
   bitmap *partition_dependencies;	/* Partitions expr is dependent on.  */
@@ -174,7 +174,7 @@ typedef struct temp_expr_table_d
   bitmap new_replaceable_dependencies;	/* Holding place for pending dep's.  */
   int *num_in_part;			/* # of ssa_names in a partition.  */
   int *call_cnt;			/* Call count at definition.  */
-} *temp_expr_table_p;
+};
 
 /* Used to indicate a dependency on VDEFs.  */
 #define VIRTUAL_PARTITION(table)	(table->virtual_partition)
@@ -183,19 +183,18 @@ typedef struct temp_expr_table_d
 static bitmap_obstack ter_bitmap_obstack;
 
 #ifdef ENABLE_CHECKING
-extern void debug_ter (FILE *, temp_expr_table_p);
+extern void debug_ter (FILE *, temp_expr_table *);
 #endif
 
 
 /* Create a new TER table for MAP.  */
 
-static temp_expr_table_p
+static temp_expr_table *
 new_temp_expr_table (var_map map)
 {
-  temp_expr_table_p t;
   unsigned x;
 
-  t = XNEW (struct temp_expr_table_d);
+  temp_expr_table *t = XNEW (struct temp_expr_table);
   t->map = map;
 
   t->partition_dependencies = XCNEWVEC (bitmap, num_ssa_names + 1);
@@ -229,7 +228,7 @@ new_temp_expr_table (var_map map)
    vector.  */
 
 static bitmap
-free_temp_expr_table (temp_expr_table_p t)
+free_temp_expr_table (temp_expr_table *t)
 {
   bitmap ret = NULL;
 
@@ -264,7 +263,7 @@ free_temp_expr_table (temp_expr_table_p t)
 /* Return TRUE if VERSION is to be replaced by an expression in TAB.  */
 
 static inline bool
-version_to_be_replaced_p (temp_expr_table_p tab, int version)
+version_to_be_replaced_p (temp_expr_table *tab, int version)
 {
   if (!tab->replaceable_expressions)
     return false;
@@ -276,7 +275,7 @@ version_to_be_replaced_p (temp_expr_table_p tab, int version)
    the expression table */
 
 static inline void
-make_dependent_on_partition (temp_expr_table_p tab, int version, int p)
+make_dependent_on_partition (temp_expr_table *tab, int version, int p)
 {
   if (!tab->partition_dependencies[version])
     tab->partition_dependencies[version] = BITMAP_ALLOC (&ter_bitmap_obstack);
@@ -288,7 +287,7 @@ make_dependent_on_partition (temp_expr_table_p tab, int version, int p)
 /* Add VER to the kill list for P.  TAB is the expression table */
 
 static inline void
-add_to_partition_kill_list (temp_expr_table_p tab, int p, int ver)
+add_to_partition_kill_list (temp_expr_table *tab, int p, int ver)
 {
   if (!tab->kill_list[p])
     {
@@ -303,7 +302,7 @@ add_to_partition_kill_list (temp_expr_table_p tab, int p, int ver)
    table.  */
 
 static inline void
-remove_from_partition_kill_list (temp_expr_table_p tab, int p, int version)
+remove_from_partition_kill_list (temp_expr_table *tab, int p, int version)
 {
   gcc_checking_assert (tab->kill_list[p]);
   bitmap_clear_bit (tab->kill_list[p], version);
@@ -321,7 +320,7 @@ remove_from_partition_kill_list (temp_expr_table_p tab, int p, int version)
    expression table.  */
 
 static void
-add_dependence (temp_expr_table_p tab, int version, tree var)
+add_dependence (temp_expr_table *tab, int version, tree var)
 {
   int i;
   bitmap_iterator bi;
@@ -372,7 +371,7 @@ add_dependence (temp_expr_table_p tab, int version, tree var)
    expression from consideration as well by freeing the decl uid bitmap.  */
 
 static void
-finished_with_expr (temp_expr_table_p tab, int version, bool free_expr)
+finished_with_expr (temp_expr_table *tab, int version, bool free_expr)
 {
   unsigned i;
   bitmap_iterator bi;
@@ -444,7 +443,7 @@ ter_is_replaceable_p (gimple stmt)
 /* Create an expression entry for a replaceable expression.  */
 
 static void
-process_replaceable (temp_expr_table_p tab, gimple stmt, int call_cnt)
+process_replaceable (temp_expr_table *tab, gimple stmt, int call_cnt)
 {
   tree var, def, basevar;
   int version;
@@ -493,7 +492,7 @@ process_replaceable (temp_expr_table_p tab, gimple stmt, int call_cnt)
    from consideration, making it not replaceable.  */
 
 static inline void
-kill_expr (temp_expr_table_p tab, int partition)
+kill_expr (temp_expr_table *tab, int partition)
 {
   unsigned version;
 
@@ -513,7 +512,7 @@ kill_expr (temp_expr_table_p tab, int partition)
    partitions.  */
 
 static inline void
-kill_virtual_exprs (temp_expr_table_p tab)
+kill_virtual_exprs (temp_expr_table *tab)
 {
   kill_expr (tab, VIRTUAL_PARTITION (tab));
 }
@@ -524,7 +523,7 @@ kill_virtual_exprs (temp_expr_table_p tab)
    MORE_REPLACING is true, accumulate the pending partition dependencies.  */
 
 static void
-mark_replaceable (temp_expr_table_p tab, tree var, bool more_replacing)
+mark_replaceable (temp_expr_table *tab, tree var, bool more_replacing)
 {
   int version = SSA_NAME_VERSION (var);
 
@@ -572,7 +571,7 @@ find_ssaname_in_store (gimple, tree, tree t, void *data)
    be replaced by their expressions.  Results are stored in the table TAB.  */
 
 static void
-find_replaceable_in_bb (temp_expr_table_p tab, basic_block bb)
+find_replaceable_in_bb (temp_expr_table *tab, basic_block bb)
 {
   gimple_stmt_iterator bsi;
   gimple stmt;
@@ -712,7 +711,7 @@ bitmap
 find_replaceable_exprs (var_map map)
 {
   basic_block bb;
-  temp_expr_table_p table;
+  temp_expr_table *table;
   bitmap ret;
 
   bitmap_obstack_initialize (&ter_bitmap_obstack);
@@ -755,7 +754,7 @@ dump_replaceable_exprs (FILE *f, bitmap expr)
    table being debugged.  */
 
 DEBUG_FUNCTION void
-debug_ter (FILE *f, temp_expr_table_p t)
+debug_ter (FILE *f, temp_expr_table *t)
 {
   unsigned x, y;
   bitmap_iterator bi;
-- 
2.4.0

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 00/10] removal of typedefs that hide pointerness episode 1
@ 2015-09-03  5:26 tbsaunde+gcc
  2015-09-03  5:26 ` [PATCH 06/10] tree-ssa-ter.c: remove typedefs that hide pointerness tbsaunde+gcc
                   ` (11 more replies)
  0 siblings, 12 replies; 16+ messages in thread
From: tbsaunde+gcc @ 2015-09-03  5:26 UTC (permalink / raw)
  To: gcc-patches

From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org>

Hi,

Personally I think hiding that variables are pointers is confusing, and I
believe consensus is we should move away from this style.  So this series
starts to do that.

patches individually bootstrapped + regtested on x86_64-linux-gnu, ok?

Trev

Trevor Saunders (10):
  don't typedef alias_set_entry and unhide pointerness
  dse.c: remove some typedefs that hide pointerness
  var-tracking.c: remove typedef of location_chain
  var-tracking.c: remove typedef of shared_hash
  bt-load.c: remove typedefs that hide pointerness
  tree-ssa-ter.c: remove typedefs that hide pointerness
  tree-vrp.c: remove typedefs that hide pointerness
  dwarf2cfi.c: remove typedef that hides pointerness
  dwarf2out.c: remove typedefs that hide pointerness
  tree-ssa-loop-im.c: remove typedefs that hide pointerness

 gcc/alias.c            |  31 +++--
 gcc/bt-load.c          | 140 ++++++++++----------
 gcc/dse.c              | 115 ++++++++---------
 gcc/dwarf2cfi.c        |   5 +-
 gcc/dwarf2out.c        | 340 ++++++++++++++++++++++++-------------------------
 gcc/tree-ssa-loop-im.c |  98 +++++++-------
 gcc/tree-ssa-ter.c     |  39 +++---
 gcc/tree-vrp.c         |  22 ++--
 gcc/var-tracking.c     | 192 ++++++++++++++--------------
 9 files changed, 479 insertions(+), 503 deletions(-)

-- 
2.4.0

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 02/10] dse.c: remove some typedefs that hide pointerness
  2015-09-03  5:26 [PATCH 00/10] removal of typedefs that hide pointerness episode 1 tbsaunde+gcc
  2015-09-03  5:26 ` [PATCH 06/10] tree-ssa-ter.c: remove typedefs that hide pointerness tbsaunde+gcc
@ 2015-09-03  5:27 ` tbsaunde+gcc
  2015-09-04 20:30   ` Jeff Law
  2015-09-03  5:27 ` [PATCH 05/10] bt-load.c: remove " tbsaunde+gcc
                   ` (9 subsequent siblings)
  11 siblings, 1 reply; 16+ messages in thread
From: tbsaunde+gcc @ 2015-09-03  5:27 UTC (permalink / raw)
  To: gcc-patches

From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org>

gcc/ChangeLog:

2015-09-02  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* dse.c (store_info_t): Remove typedef.
	(group_info_t): Likewise.
	(const_group_info_t): Likewise.
	(deferred_change_t): Likewise.
	(get_group_info): Adjust.
	(free_store_info): Likewise.
	(canon_address): Likewise.
	(clear_rhs_from_active_local_stores): Likewise.
	(record_store): Likewise.
	(replace_read): Likewise.
	(check_mem_read_rtx): Likewise.
	(scan_insn): Likewise.
	(remove_useless_values): Likewise.
	(dse_step1): Likewise.
	(dse_step2_init): Likewise.
	(dse_step2_nospill): Likewise.
	(scan_stores_nospill): Likewise.
	(scan_reads_nospill): Likewise.
	(dse_step3_exit_block_scan): Likewise.
	(dse_step3): Likewise.
	(dse_step5_nospill): Likewise.
	(dse_step6): Likewise.
---
 gcc/dse.c | 115 ++++++++++++++++++++++++++++++--------------------------------
 1 file changed, 55 insertions(+), 60 deletions(-)

diff --git a/gcc/dse.c b/gcc/dse.c
index 780379a..0634d9d 100644
--- a/gcc/dse.c
+++ b/gcc/dse.c
@@ -307,7 +307,6 @@ lowpart_bitmask (int n)
   return mask >> (HOST_BITS_PER_WIDE_INT - n);
 }
 
-typedef struct store_info *store_info_t;
 static object_allocator<store_info> cse_store_info_pool ("cse_store_info_pool",
 						       100);
 
@@ -400,7 +399,7 @@ struct insn_info_type
      But it could also contain clobbers.  Insns that contain more than
      one mem set are not deletable, but each of those mems are here in
      order to provide info to delete other insns.  */
-  store_info_t store_rec;
+  store_info *store_rec;
 
   /* The linked list of mem uses in this insn.  Only the reads from
      rtx bases are listed here.  The reads to cselib bases are
@@ -564,8 +563,6 @@ struct group_info
   int *offset_map_n, *offset_map_p;
   int offset_map_size_n, offset_map_size_p;
 };
-typedef struct group_info *group_info_t;
-typedef const struct group_info *const_group_info_t;
 
 static object_allocator<group_info> group_info_pool
   ("rtx_group_info_pool", 100);
@@ -574,7 +571,7 @@ static object_allocator<group_info> group_info_pool
 static int rtx_group_next_id;
 
 
-static vec<group_info_t> rtx_group_vec;
+static vec<group_info *> rtx_group_vec;
 
 
 /* This structure holds the set of changes that are being deferred
@@ -591,15 +588,13 @@ struct deferred_change
   struct deferred_change *next;
 };
 
-typedef struct deferred_change *deferred_change_t;
-
 static object_allocator<deferred_change> deferred_change_pool
   ("deferred_change_pool", 10);
 
-static deferred_change_t deferred_change_list = NULL;
+static deferred_change *deferred_change_list = NULL;
 
 /* The group that holds all of the clear_alias_sets.  */
-static group_info_t clear_alias_group;
+static group_info *clear_alias_group;
 
 /* The modes of the clear_alias_sets.  */
 static htab_t clear_alias_mode_table;
@@ -680,11 +675,11 @@ static hash_table<invariant_group_base_hasher> *rtx_group_table;
 
 /* Get the GROUP for BASE.  Add a new group if it is not there.  */
 
-static group_info_t
+static group_info *
 get_group_info (rtx base)
 {
   struct group_info tmp_gi;
-  group_info_t gi;
+  group_info *gi;
   group_info **slot;
 
   if (base)
@@ -693,7 +688,7 @@ get_group_info (rtx base)
 	 if necessary.  */
       tmp_gi.rtx_base = base;
       slot = rtx_group_table->find_slot (&tmp_gi, INSERT);
-      gi = (group_info_t) *slot;
+      gi = *slot;
     }
   else
     {
@@ -790,17 +785,17 @@ dse_step0 (void)
 static void
 free_store_info (insn_info_t insn_info)
 {
-  store_info_t store_info = insn_info->store_rec;
-  while (store_info)
+  store_info *cur = insn_info->store_rec;
+  while (cur)
     {
-      store_info_t next = store_info->next;
-      if (store_info->is_large)
-	BITMAP_FREE (store_info->positions_needed.large.bmap);
-      if (store_info->cse_base)
-	cse_store_info_pool.remove (store_info);
+      store_info *next = cur->next;
+      if (cur->is_large)
+	BITMAP_FREE (cur->positions_needed.large.bmap);
+      if (cur->cse_base)
+	cse_store_info_pool.remove (cur);
       else
-	rtx_store_info_pool.remove (store_info);
-      store_info = next;
+	rtx_store_info_pool.remove (cur);
+      cur = next;
     }
 
   insn_info->cannot_delete = true;
@@ -1015,7 +1010,7 @@ can_escape (tree expr)
    OFFSET and WIDTH.  */
 
 static void
-set_usage_bits (group_info_t group, HOST_WIDE_INT offset, HOST_WIDE_INT width,
+set_usage_bits (group_info *group, HOST_WIDE_INT offset, HOST_WIDE_INT width,
                 tree expr)
 {
   HOST_WIDE_INT i;
@@ -1240,7 +1235,7 @@ canon_address (rtx mem,
       if (ADDR_SPACE_GENERIC_P (MEM_ADDR_SPACE (mem))
 	  && const_or_frame_p (address))
 	{
-	  group_info_t group = get_group_info (address);
+	  group_info *group = get_group_info (address);
 
 	  if (dump_file && (dump_flags & TDF_DETAILS))
 	    fprintf (dump_file, "  gid=%d offset=%d \n",
@@ -1276,7 +1271,7 @@ clear_rhs_from_active_local_stores (void)
 
   while (ptr)
     {
-      store_info_t store_info = ptr->store_rec;
+      store_info *store_info = ptr->store_rec;
       /* Skip the clobbers.  */
       while (!store_info->is_set)
 	store_info = store_info->next;
@@ -1292,7 +1287,7 @@ clear_rhs_from_active_local_stores (void)
 /* Mark byte POS bytes from the beginning of store S_INFO as unneeded.  */
 
 static inline void
-set_position_unneeded (store_info_t s_info, int pos)
+set_position_unneeded (store_info *s_info, int pos)
 {
   if (__builtin_expect (s_info->is_large, false))
     {
@@ -1307,7 +1302,7 @@ set_position_unneeded (store_info_t s_info, int pos)
 /* Mark the whole store S_INFO as unneeded.  */
 
 static inline void
-set_all_positions_unneeded (store_info_t s_info)
+set_all_positions_unneeded (store_info *s_info)
 {
   if (__builtin_expect (s_info->is_large, false))
     {
@@ -1323,7 +1318,7 @@ set_all_positions_unneeded (store_info_t s_info)
 /* Return TRUE if any bytes from S_INFO store are needed.  */
 
 static inline bool
-any_positions_needed_p (store_info_t s_info)
+any_positions_needed_p (store_info *s_info)
 {
   if (__builtin_expect (s_info->is_large, false))
     return (s_info->positions_needed.large.count
@@ -1337,7 +1332,7 @@ any_positions_needed_p (store_info_t s_info)
    store are needed.  */
 
 static inline bool
-all_positions_needed_p (store_info_t s_info, int start, int width)
+all_positions_needed_p (store_info *s_info, int start, int width)
 {
   if (__builtin_expect (s_info->is_large, false))
     {
@@ -1355,7 +1350,7 @@ all_positions_needed_p (store_info_t s_info, int start, int width)
 }
 
 
-static rtx get_stored_val (store_info_t, machine_mode, HOST_WIDE_INT,
+static rtx get_stored_val (store_info *, machine_mode, HOST_WIDE_INT,
 			   HOST_WIDE_INT, basic_block, bool);
 
 
@@ -1371,7 +1366,7 @@ record_store (rtx body, bb_info_t bb_info)
   HOST_WIDE_INT width = 0;
   alias_set_type spill_alias_set;
   insn_info_t insn_info = bb_info->last_insn;
-  store_info_t store_info = NULL;
+  store_info *store_info = NULL;
   int group_id;
   cselib_val *base = NULL;
   insn_info_t ptr, last, redundant_reason;
@@ -1467,7 +1462,7 @@ record_store (rtx body, bb_info_t bb_info)
       /* In the restrictive case where the base is a constant or the
 	 frame pointer we can do global analysis.  */
 
-      group_info_t group
+      group_info *group
 	= rtx_group_vec[group_id];
       tree expr = MEM_EXPR (mem);
 
@@ -1537,7 +1532,7 @@ record_store (rtx body, bb_info_t bb_info)
 	mem_addr = base->val_rtx;
       else
 	{
-	  group_info_t group
+	  group_info *group
 	    = rtx_group_vec[group_id];
 	  mem_addr = group->canon_base_addr;
 	}
@@ -1552,7 +1547,7 @@ record_store (rtx body, bb_info_t bb_info)
   while (ptr)
     {
       insn_info_t next = ptr->next_local_store;
-      store_info_t s_info = ptr->store_rec;
+      struct store_info *s_info = ptr->store_rec;
       bool del = true;
 
       /* Skip the clobbers. We delete the active insn if this insn
@@ -1722,7 +1717,7 @@ dump_insn_info (const char * start, insn_info_t insn_info)
 
 static rtx
 find_shift_sequence (int access_size,
-		     store_info_t store_info,
+		     store_info *store_info,
 		     machine_mode read_mode,
 		     int shift, bool speed, bool require_cst)
 {
@@ -1854,7 +1849,7 @@ look_for_hardregs (rtx x, const_rtx pat ATTRIBUTE_UNUSED, void *data)
    if not successful.  If REQUIRE_CST is true, return always constant.  */
 
 static rtx
-get_stored_val (store_info_t store_info, machine_mode read_mode,
+get_stored_val (store_info *store_info, machine_mode read_mode,
 		HOST_WIDE_INT read_begin, HOST_WIDE_INT read_end,
 		basic_block bb, bool require_cst)
 {
@@ -1954,7 +1949,7 @@ get_stored_val (store_info_t store_info, machine_mode read_mode,
    went ok.  */
 
 static bool
-replace_read (store_info_t store_info, insn_info_t store_insn,
+replace_read (store_info *store_info, insn_info_t store_insn,
 	      read_info_t read_info, insn_info_t read_insn, rtx *loc,
 	      bitmap regs_live)
 {
@@ -2029,7 +2024,7 @@ replace_read (store_info_t store_info, insn_info_t store_insn,
 
   if (validate_change (read_insn->insn, loc, read_reg, 0))
     {
-      deferred_change_t change = deferred_change_pool.allocate ();
+      deferred_change *change = deferred_change_pool.allocate ();
 
       /* Insert this right before the store insn where it will be safe
 	 from later insns that might change it before the read.  */
@@ -2150,7 +2145,7 @@ check_mem_read_rtx (rtx *loc, bb_info_t bb_info)
 	mem_addr = base->val_rtx;
       else
 	{
-	  group_info_t group
+	  group_info *group
 	    = rtx_group_vec[group_id];
 	  mem_addr = group->canon_base_addr;
 	}
@@ -2176,7 +2171,7 @@ check_mem_read_rtx (rtx *loc, bb_info_t bb_info)
 
       while (i_ptr)
 	{
-	  store_info_t store_info = i_ptr->store_rec;
+	  store_info *store_info = i_ptr->store_rec;
 
 	  /* Skip the clobbers.  */
 	  while (!store_info->is_set)
@@ -2218,7 +2213,7 @@ check_mem_read_rtx (rtx *loc, bb_info_t bb_info)
       while (i_ptr)
 	{
 	  bool remove = false;
-	  store_info_t store_info = i_ptr->store_rec;
+	  store_info *store_info = i_ptr->store_rec;
 
 	  /* Skip the clobbers.  */
 	  while (!store_info->is_set)
@@ -2302,7 +2297,7 @@ check_mem_read_rtx (rtx *loc, bb_info_t bb_info)
       while (i_ptr)
 	{
 	  bool remove = false;
-	  store_info_t store_info = i_ptr->store_rec;
+	  store_info *store_info = i_ptr->store_rec;
 
 	  if (dump_file && (dump_flags & TDF_DETAILS))
 	    fprintf (dump_file, " processing cselib load against insn %d\n",
@@ -2532,7 +2527,7 @@ scan_insn (bb_info_t bb_info, rtx_insn *insn)
 	      /* If the frame is read, the frame related stores are killed.  */
 	      else if (insn_info->frame_read)
 		{
-		  store_info_t store_info = i_ptr->store_rec;
+		  store_info *store_info = i_ptr->store_rec;
 
 		  /* Skip the clobbers.  */
 		  while (!store_info->is_set)
@@ -2659,7 +2654,7 @@ remove_useless_values (cselib_val *base)
 
   while (insn_info)
     {
-      store_info_t store_info = insn_info->store_rec;
+      store_info *store_info = insn_info->store_rec;
       bool del = false;
 
       /* If ANY of the store_infos match the cselib group that is
@@ -2756,7 +2751,7 @@ dse_step1 (void)
 	      insn_info_t i_ptr = active_local_stores;
 	      while (i_ptr)
 		{
-		  store_info_t store_info = i_ptr->store_rec;
+		  store_info *store_info = i_ptr->store_rec;
 
 		  /* Skip the clobbers.  */
 		  while (!store_info->is_set)
@@ -2766,7 +2761,7 @@ dse_step1 (void)
 		  else
 		    if (store_info->group_id >= 0)
 		      {
-			group_info_t group
+			group_info *group
 			  = rtx_group_vec[store_info->group_id];
 			if (group->frame_related && !i_ptr->cannot_delete)
 			  delete_dead_store_insn (i_ptr);
@@ -2780,7 +2775,7 @@ dse_step1 (void)
 	     replace_read.  Cselib is finished with this block.  */
 	  while (deferred_change_list)
 	    {
-	      deferred_change_t next = deferred_change_list->next;
+	      deferred_change *next = deferred_change_list->next;
 
 	      /* There is no reason to validate this change.  That was
 		 done earlier.  */
@@ -2797,7 +2792,7 @@ dse_step1 (void)
 	    {
 	      if (ptr->contains_cselib_groups)
 		{
-		  store_info_t s_info = ptr->store_rec;
+		  store_info *s_info = ptr->store_rec;
 		  while (s_info && !s_info->is_set)
 		    s_info = s_info->next;
 		  if (s_info
@@ -2818,7 +2813,7 @@ dse_step1 (void)
 		}
 	      else
 		{
-		  store_info_t s_info;
+		  store_info *s_info;
 
 		  /* Free at least positions_needed bitmaps.  */
 		  for (s_info = ptr->store_rec; s_info; s_info = s_info->next)
@@ -2854,7 +2849,7 @@ static void
 dse_step2_init (void)
 {
   unsigned int i;
-  group_info_t group;
+  group_info *group;
 
   FOR_EACH_VEC_ELT (rtx_group_vec, i, group)
     {
@@ -2905,7 +2900,7 @@ static bool
 dse_step2_nospill (void)
 {
   unsigned int i;
-  group_info_t group;
+  group_info *group;
   /* Position 0 is unused because 0 is used in the maps to mean
      unused.  */
   current_position = 1;
@@ -2954,7 +2949,7 @@ dse_step2_nospill (void)
    there, return 0.  */
 
 static int
-get_bitmap_index (group_info_t group_info, HOST_WIDE_INT offset)
+get_bitmap_index (group_info *group_info, HOST_WIDE_INT offset)
 {
   if (offset < 0)
     {
@@ -2976,12 +2971,12 @@ get_bitmap_index (group_info_t group_info, HOST_WIDE_INT offset)
    may be NULL. */
 
 static void
-scan_stores_nospill (store_info_t store_info, bitmap gen, bitmap kill)
+scan_stores_nospill (store_info *store_info, bitmap gen, bitmap kill)
 {
   while (store_info)
     {
       HOST_WIDE_INT i;
-      group_info_t group_info
+      group_info *group_info
 	= rtx_group_vec[store_info->group_id];
       if (group_info->process_globally)
 	for (i = store_info->begin; i < store_info->end; i++)
@@ -3003,7 +2998,7 @@ scan_stores_nospill (store_info_t store_info, bitmap gen, bitmap kill)
    may be NULL. */
 
 static void
-scan_stores_spill (store_info_t store_info, bitmap gen, bitmap kill)
+scan_stores_spill (store_info *store_info, bitmap gen, bitmap kill)
 {
   while (store_info)
     {
@@ -3031,7 +3026,7 @@ scan_reads_nospill (insn_info_t insn_info, bitmap gen, bitmap kill)
 {
   read_info_t read_info = insn_info->read_rec;
   int i;
-  group_info_t group;
+  group_info *group;
 
   /* If this insn reads the frame, kill all the frame related stores.  */
   if (insn_info->frame_read)
@@ -3239,7 +3234,7 @@ dse_step3_exit_block_scan (bb_info_t bb_info)
   if (stores_off_frame_dead_at_return)
     {
       unsigned int i;
-      group_info_t group;
+      group_info *group;
 
       FOR_EACH_VEC_ELT (rtx_group_vec, i, group)
 	{
@@ -3320,7 +3315,7 @@ dse_step3 (bool for_spills)
 	  if (!all_ones)
 	    {
 	      unsigned int j;
-	      group_info_t group;
+	      group_info *group;
 
 	      all_ones = BITMAP_ALLOC (&dse_bitmap_obstack);
 	      FOR_EACH_VEC_ELT (rtx_group_vec, j, group)
@@ -3524,7 +3519,7 @@ dse_step5_nospill (void)
 	      && (!insn_info->cannot_delete)
 	      && (!bitmap_empty_p (v)))
 	    {
-	      store_info_t store_info = insn_info->store_rec;
+	      store_info *store_info = insn_info->store_rec;
 
 	      /* Try to delete the current insn.  */
 	      deleted = true;
@@ -3538,7 +3533,7 @@ dse_step5_nospill (void)
 	      else
 		{
 		  HOST_WIDE_INT i;
-		  group_info_t group_info
+		  group_info *group_info
 		    = rtx_group_vec[store_info->group_id];
 
 		  for (i = store_info->begin; i < store_info->end; i++)
@@ -3624,7 +3619,7 @@ dse_step6 (void)
 	      && INSN_P (insn_info->insn)
 	      && !insn_info->cannot_delete)
 	    {
-	      store_info_t s_info = insn_info->store_rec;
+	      store_info *s_info = insn_info->store_rec;
 
 	      while (s_info && !s_info->is_set)
 		s_info = s_info->next;
-- 
2.4.0

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 07/10] tree-vrp.c: remove typedefs that hide pointerness
  2015-09-03  5:26 [PATCH 00/10] removal of typedefs that hide pointerness episode 1 tbsaunde+gcc
                   ` (2 preceding siblings ...)
  2015-09-03  5:27 ` [PATCH 05/10] bt-load.c: remove " tbsaunde+gcc
@ 2015-09-03  5:27 ` tbsaunde+gcc
  2015-09-03  5:27 ` [PATCH 01/10] don't typedef alias_set_entry and unhide pointerness tbsaunde+gcc
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 16+ messages in thread
From: tbsaunde+gcc @ 2015-09-03  5:27 UTC (permalink / raw)
  To: gcc-patches

From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org>

gcc/ChangeLog:

2015-09-03  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* tree-vrp.c (struct assert_locus_d): Rename to assert_locus.
	(dump_asserts_for): Adjust.
	(register_new_assert_for): Likewise.
	(process_assert_insertions): Likewise.
	(insert_range_assertions): Likewise.
---
 gcc/tree-vrp.c | 22 ++++++++++------------
 1 file changed, 10 insertions(+), 12 deletions(-)

diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c
index 21fbed0..c45daba 100644
--- a/gcc/tree-vrp.c
+++ b/gcc/tree-vrp.c
@@ -126,7 +126,7 @@ static tree vrp_evaluate_conditional_warnv_with_ops (enum tree_code,
    SSA name may have more than one assertion associated with it, these
    locations are kept in a linked list attached to the corresponding
    SSA name.  */
-struct assert_locus_d
+struct assert_locus
 {
   /* Basic block where the assertion would be inserted.  */
   basic_block bb;
@@ -148,11 +148,9 @@ struct assert_locus_d
   tree expr;
 
   /* Next node in the linked list.  */
-  struct assert_locus_d *next;
+  assert_locus *next;
 };
 
-typedef struct assert_locus_d *assert_locus_t;
-
 /* If bit I is present, it means that SSA name N_i has a list of
    assertions that should be inserted in the IL.  */
 static bitmap need_assert_for;
@@ -160,7 +158,7 @@ static bitmap need_assert_for;
 /* Array of locations lists where to insert assertions.  ASSERTS_FOR[I]
    holds a list of ASSERT_LOCUS_T nodes that describe where
    ASSERT_EXPRs for SSA name N_I should be inserted.  */
-static assert_locus_t *asserts_for;
+static assert_locus **asserts_for;
 
 /* Value range array.  After propagation, VR_VALUE[I] holds the range
    of values that SSA name N_I may take.  */
@@ -4897,7 +4895,7 @@ void debug_all_asserts (void);
 void
 dump_asserts_for (FILE *file, tree name)
 {
-  assert_locus_t loc;
+  assert_locus *loc;
 
   fprintf (file, "Assertions to be inserted for ");
   print_generic_expr (file, name, 0);
@@ -4979,7 +4977,7 @@ register_new_assert_for (tree name, tree expr,
 			 edge e,
 			 gimple_stmt_iterator si)
 {
-  assert_locus_t n, loc, last_loc;
+  assert_locus *n, *loc, *last_loc;
   basic_block dest_bb;
 
   gcc_checking_assert (bb == NULL || e == NULL);
@@ -5054,7 +5052,7 @@ register_new_assert_for (tree name, tree expr,
   /* If we didn't find an assertion already registered for
      NAME COMP_CODE VAL, add a new one at the end of the list of
      assertions associated with NAME.  */
-  n = XNEW (struct assert_locus_d);
+  n = XNEW (struct assert_locus);
   n->bb = dest_bb;
   n->e = e;
   n->si = si;
@@ -6333,7 +6331,7 @@ find_assert_locations (void)
    indicated by LOC.  Return true if we made any edge insertions.  */
 
 static bool
-process_assert_insertions_for (tree name, assert_locus_t loc)
+process_assert_insertions_for (tree name, assert_locus *loc)
 {
   /* Build the comparison expression NAME_i COMP_CODE VAL.  */
   gimple stmt;
@@ -6401,12 +6399,12 @@ process_assert_insertions (void)
 
   EXECUTE_IF_SET_IN_BITMAP (need_assert_for, 0, i, bi)
     {
-      assert_locus_t loc = asserts_for[i];
+      assert_locus *loc = asserts_for[i];
       gcc_assert (loc);
 
       while (loc)
 	{
-	  assert_locus_t next = loc->next;
+	  assert_locus *next = loc->next;
 	  update_edges_p |= process_assert_insertions_for (ssa_name (i), loc);
 	  free (loc);
 	  loc = next;
@@ -6458,7 +6456,7 @@ static void
 insert_range_assertions (void)
 {
   need_assert_for = BITMAP_ALLOC (NULL);
-  asserts_for = XCNEWVEC (assert_locus_t, num_ssa_names);
+  asserts_for = XCNEWVEC (assert_locus *, num_ssa_names);
 
   calculate_dominance_info (CDI_DOMINATORS);
 
-- 
2.4.0

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 01/10] don't typedef alias_set_entry and unhide pointerness
  2015-09-03  5:26 [PATCH 00/10] removal of typedefs that hide pointerness episode 1 tbsaunde+gcc
                   ` (3 preceding siblings ...)
  2015-09-03  5:27 ` [PATCH 07/10] tree-vrp.c: " tbsaunde+gcc
@ 2015-09-03  5:27 ` tbsaunde+gcc
  2015-09-04 20:28   ` Jeff Law
  2015-09-03  5:27 ` [PATCH 10/10] tree-ssa-loop-im.c: remove typedefs that hide pointerness tbsaunde+gcc
                   ` (6 subsequent siblings)
  11 siblings, 1 reply; 16+ messages in thread
From: tbsaunde+gcc @ 2015-09-03  5:27 UTC (permalink / raw)
  To: gcc-patches

From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org>

gcc/ChangeLog:

2015-09-02  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* alias.c (alias_set_entry_d): Rename to alias_set_entry.
	(alias_set_entry): Remove typedef.
	(alias_set_subset_of): Adjust.
	(alias_sets_conflict_p): Likewise.
	(init_alias_set_entry): Likewise.
	(get_alias_set): Likewise.
	(new_alias_set): Likewise.
	(record_alias_subset): Likewise.
---
 gcc/alias.c | 31 +++++++++++++++----------------
 1 file changed, 15 insertions(+), 16 deletions(-)

diff --git a/gcc/alias.c b/gcc/alias.c
index 4681e3f..a0e8616 100644
--- a/gcc/alias.c
+++ b/gcc/alias.c
@@ -134,7 +134,7 @@ along with GCC; see the file COPYING3.  If not see
 
 struct alias_set_hash : int_hash <int, INT_MIN, INT_MIN + 1> {};
 
-struct GTY(()) alias_set_entry_d {
+struct GTY(()) alias_set_entry {
   /* The alias set number, as stored in MEM_ALIAS_SET.  */
   alias_set_type alias_set;
 
@@ -158,7 +158,6 @@ struct GTY(()) alias_set_entry_d {
   /* Nonzero if is_pointer or if one of childs have has_pointer set.  */
   bool has_pointer;
 };
-typedef struct alias_set_entry_d *alias_set_entry;
 
 static int rtx_equal_for_memref_p (const_rtx, const_rtx);
 static int memrefs_conflict_p (int, rtx, int, rtx, HOST_WIDE_INT);
@@ -167,7 +166,7 @@ static int base_alias_check (rtx, rtx, rtx, rtx, machine_mode,
 			     machine_mode);
 static rtx find_base_value (rtx);
 static int mems_in_disjoint_alias_sets_p (const_rtx, const_rtx);
-static alias_set_entry get_alias_set_entry (alias_set_type);
+static alias_set_entry *get_alias_set_entry (alias_set_type);
 static tree decl_for_component_ref (tree);
 static int write_dependence_p (const_rtx,
 			       const_rtx, machine_mode, rtx,
@@ -288,7 +287,7 @@ static bool copying_arguments;
 
 
 /* The splay-tree used to store the various alias set entries.  */
-static GTY (()) vec<alias_set_entry, va_gc> *alias_sets;
+static GTY (()) vec<alias_set_entry *, va_gc> *alias_sets;
 \f
 /* Build a decomposed reference object for querying the alias-oracle
    from the MEM rtx and store it in *REF.
@@ -395,7 +394,7 @@ rtx_refs_may_alias_p (const_rtx x, const_rtx mem, bool tbaa_p)
 /* Returns a pointer to the alias set entry for ALIAS_SET, if there is
    such an entry, or NULL otherwise.  */
 
-static inline alias_set_entry
+static inline alias_set_entry *
 get_alias_set_entry (alias_set_type alias_set)
 {
   return (*alias_sets)[alias_set];
@@ -417,7 +416,7 @@ mems_in_disjoint_alias_sets_p (const_rtx mem1, const_rtx mem2)
 bool
 alias_set_subset_of (alias_set_type set1, alias_set_type set2)
 {
-  alias_set_entry ase2;
+  alias_set_entry *ase2;
 
   /* Everything is a subset of the "aliases everything" set.  */
   if (set2 == 0)
@@ -453,7 +452,7 @@ alias_set_subset_of (alias_set_type set1, alias_set_type set2)
      get_alias_set for more details.  */
   if (ase2 && ase2->has_pointer)
     {
-      alias_set_entry ase1 = get_alias_set_entry (set1);
+      alias_set_entry *ase1 = get_alias_set_entry (set1);
 
       if (ase1 && ase1->is_pointer)
 	{
@@ -477,8 +476,8 @@ alias_set_subset_of (alias_set_type set1, alias_set_type set2)
 int
 alias_sets_conflict_p (alias_set_type set1, alias_set_type set2)
 {
-  alias_set_entry ase1;
-  alias_set_entry ase2;
+  alias_set_entry *ase1;
+  alias_set_entry *ase2;
 
   /* The easy case.  */
   if (alias_sets_must_conflict_p (set1, set2))
@@ -808,10 +807,10 @@ alias_ptr_types_compatible_p (tree t1, tree t2)
 
 /* Create emptry alias set entry.  */
 
-alias_set_entry
+alias_set_entry *
 init_alias_set_entry (alias_set_type set)
 {
-  alias_set_entry ase = ggc_alloc<alias_set_entry_d> ();
+  alias_set_entry *ase = ggc_alloc<alias_set_entry> ();
   ase->alias_set = set;
   ase->children = NULL;
   ase->has_zero_child = false;
@@ -1057,7 +1056,7 @@ get_alias_set (tree t)
   /* We treat pointer types specially in alias_set_subset_of.  */
   if (POINTER_TYPE_P (t) && set)
     {
-      alias_set_entry ase = get_alias_set_entry (set);
+      alias_set_entry *ase = get_alias_set_entry (set);
       if (!ase)
 	ase = init_alias_set_entry (set);
       ase->is_pointer = true;
@@ -1075,8 +1074,8 @@ new_alias_set (void)
   if (flag_strict_aliasing)
     {
       if (alias_sets == 0)
-	vec_safe_push (alias_sets, (alias_set_entry) 0);
-      vec_safe_push (alias_sets, (alias_set_entry) 0);
+	vec_safe_push (alias_sets, (alias_set_entry *) NULL);
+      vec_safe_push (alias_sets, (alias_set_entry *) NULL);
       return alias_sets->length () - 1;
     }
   else
@@ -1099,8 +1098,8 @@ new_alias_set (void)
 void
 record_alias_subset (alias_set_type superset, alias_set_type subset)
 {
-  alias_set_entry superset_entry;
-  alias_set_entry subset_entry;
+  alias_set_entry *superset_entry;
+  alias_set_entry *subset_entry;
 
   /* It is possible in complex type situations for both sets to be the same,
      in which case we can ignore this operation.  */
-- 
2.4.0

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 04/10] var-tracking.c: remove typedef of shared_hash
  2015-09-03  5:26 [PATCH 00/10] removal of typedefs that hide pointerness episode 1 tbsaunde+gcc
                   ` (6 preceding siblings ...)
  2015-09-03  5:27 ` [PATCH 03/10] var-tracking.c: remove typedef of location_chain tbsaunde+gcc
@ 2015-09-03  5:27 ` tbsaunde+gcc
  2015-09-03  5:31 ` [PATCH 09/10] dwarf2out.c: remove typedefs that hide pointerness tbsaunde+gcc
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 16+ messages in thread
From: tbsaunde+gcc @ 2015-09-03  5:27 UTC (permalink / raw)
  To: gcc-patches

From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org>

gcc/ChangeLog:

2015-09-03  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* var-tracking.c (shared_hash_def): Rename to shared_hash.
	(shared_hash): Remove typedef.
	(struct dataflow_set): Adjust.
	(shared_hash_unshare): Likewise.
	(dataflow_set_merge): Likewise.
	(vt_initialize): Likewise.
	(vt_finalize): Likewise.
---
 gcc/var-tracking.c | 56 +++++++++++++++++++++++++++---------------------------
 1 file changed, 28 insertions(+), 28 deletions(-)

diff --git a/gcc/var-tracking.c b/gcc/var-tracking.c
index 5a53a4a..126feee 100644
--- a/gcc/var-tracking.c
+++ b/gcc/var-tracking.c
@@ -525,14 +525,14 @@ struct emit_note_data
 
 /* Structure holding a refcounted hash table.  If refcount > 1,
    it must be first unshared before modified.  */
-typedef struct shared_hash_def
+struct shared_hash
 {
   /* Reference count.  */
   int refcount;
 
   /* Actual hash table.  */
   variable_table_type *htab;
-} *shared_hash;
+};
 
 /* Structure holding the IN or OUT set for a basic block.  */
 struct dataflow_set
@@ -544,10 +544,10 @@ struct dataflow_set
   attrs regs[FIRST_PSEUDO_REGISTER];
 
   /* Variable locations.  */
-  shared_hash vars;
+  shared_hash *vars;
 
   /* Vars that is being traversed.  */
-  shared_hash traversed_vars;
+  shared_hash *traversed_vars;
 };
 
 /* The structure (one for each basic block) containing the information
@@ -593,8 +593,8 @@ static object_allocator<location_chain> location_chain_pool
   ("location_chain pool", 1024);
 
 /* Alloc pool for struct shared_hash_def.  */
-static object_allocator<shared_hash_def> shared_hash_def_pool
-  ("shared_hash_def pool", 256);
+static object_allocator<shared_hash> shared_hash_pool
+  ("shared_hash pool", 256);
 
 /* Alloc pool for struct loc_exp_dep_s for NOT_ONEPART variables.  */
 object_allocator<loc_exp_dep> loc_exp_dep_pool ("loc_exp_dep pool", 64);
@@ -611,7 +611,7 @@ static bool emit_notes;
 static variable_table_type *dropped_values;
 
 /* Empty shared hashtable.  */
-static shared_hash empty_shared_hash;
+static shared_hash *empty_shared_hash;
 
 /* Scratch register bitmap used by cselib_expand_value_rtx.  */
 static bitmap scratch_regs = NULL;
@@ -1571,7 +1571,7 @@ attrs_list_mpdv_union (attrs *dstp, attrs src, attrs src2)
 /* Return true if VARS is shared.  */
 
 static inline bool
-shared_hash_shared (shared_hash vars)
+shared_hash_shared (shared_hash *vars)
 {
   return vars->refcount > 1;
 }
@@ -1579,7 +1579,7 @@ shared_hash_shared (shared_hash vars)
 /* Return the hash table for VARS.  */
 
 static inline variable_table_type *
-shared_hash_htab (shared_hash vars)
+shared_hash_htab (shared_hash *vars)
 {
   return vars->htab;
 }
@@ -1587,7 +1587,7 @@ shared_hash_htab (shared_hash vars)
 /* Return true if VAR is shared, or maybe because VARS is shared.  */
 
 static inline bool
-shared_var_p (variable var, shared_hash vars)
+shared_var_p (variable var, shared_hash *vars)
 {
   /* Don't count an entry in the changed_variables table as a duplicate.  */
   return ((var->refcount > 1 + (int) var->in_changed_variables)
@@ -1596,10 +1596,10 @@ shared_var_p (variable var, shared_hash vars)
 
 /* Copy variables into a new hash table.  */
 
-static shared_hash
-shared_hash_unshare (shared_hash vars)
+static shared_hash *
+shared_hash_unshare (shared_hash *vars)
 {
-  shared_hash new_vars = new shared_hash_def;
+  shared_hash *new_vars = new shared_hash;
   gcc_assert (vars->refcount > 1);
   new_vars->refcount = 1;
   new_vars->htab = new variable_table_type (vars->htab->elements () + 3);
@@ -1610,8 +1610,8 @@ shared_hash_unshare (shared_hash vars)
 
 /* Increment reference counter on VARS and return it.  */
 
-static inline shared_hash
-shared_hash_copy (shared_hash vars)
+static inline shared_hash *
+shared_hash_copy (shared_hash *vars)
 {
   vars->refcount++;
   return vars;
@@ -1621,7 +1621,7 @@ shared_hash_copy (shared_hash vars)
    anymore.  */
 
 static void
-shared_hash_destroy (shared_hash vars)
+shared_hash_destroy (shared_hash *vars)
 {
   gcc_checking_assert (vars->refcount > 0);
   if (--vars->refcount == 0)
@@ -1635,7 +1635,7 @@ shared_hash_destroy (shared_hash vars)
    INSERT, insert it if not already present.  */
 
 static inline variable_def **
-shared_hash_find_slot_unshare_1 (shared_hash *pvars, decl_or_value dv,
+shared_hash_find_slot_unshare_1 (shared_hash **pvars, decl_or_value dv,
 				 hashval_t dvhash, enum insert_option ins)
 {
   if (shared_hash_shared (*pvars))
@@ -1644,7 +1644,7 @@ shared_hash_find_slot_unshare_1 (shared_hash *pvars, decl_or_value dv,
 }
 
 static inline variable_def **
-shared_hash_find_slot_unshare (shared_hash *pvars, decl_or_value dv,
+shared_hash_find_slot_unshare (shared_hash **pvars, decl_or_value dv,
 			       enum insert_option ins)
 {
   return shared_hash_find_slot_unshare_1 (pvars, dv, dv_htab_hash (dv), ins);
@@ -1655,7 +1655,7 @@ shared_hash_find_slot_unshare (shared_hash *pvars, decl_or_value dv,
    return NULL.  */
 
 static inline variable_def **
-shared_hash_find_slot_1 (shared_hash vars, decl_or_value dv, hashval_t dvhash)
+shared_hash_find_slot_1 (shared_hash *vars, decl_or_value dv, hashval_t dvhash)
 {
   return shared_hash_htab (vars)->find_slot_with_hash (dv, dvhash,
 						       shared_hash_shared (vars)
@@ -1663,7 +1663,7 @@ shared_hash_find_slot_1 (shared_hash vars, decl_or_value dv, hashval_t dvhash)
 }
 
 static inline variable_def **
-shared_hash_find_slot (shared_hash vars, decl_or_value dv)
+shared_hash_find_slot (shared_hash *vars, decl_or_value dv)
 {
   return shared_hash_find_slot_1 (vars, dv, dv_htab_hash (dv));
 }
@@ -1671,14 +1671,14 @@ shared_hash_find_slot (shared_hash vars, decl_or_value dv)
 /* Return slot for DV only if it is already present in the hash table.  */
 
 static inline variable_def **
-shared_hash_find_slot_noinsert_1 (shared_hash vars, decl_or_value dv,
+shared_hash_find_slot_noinsert_1 (shared_hash *vars, decl_or_value dv,
 				  hashval_t dvhash)
 {
   return shared_hash_htab (vars)->find_slot_with_hash (dv, dvhash, NO_INSERT);
 }
 
 static inline variable_def **
-shared_hash_find_slot_noinsert (shared_hash vars, decl_or_value dv)
+shared_hash_find_slot_noinsert (shared_hash *vars, decl_or_value dv)
 {
   return shared_hash_find_slot_noinsert_1 (vars, dv, dv_htab_hash (dv));
 }
@@ -1687,13 +1687,13 @@ shared_hash_find_slot_noinsert (shared_hash vars, decl_or_value dv)
    table.  */
 
 static inline variable
-shared_hash_find_1 (shared_hash vars, decl_or_value dv, hashval_t dvhash)
+shared_hash_find_1 (shared_hash *vars, decl_or_value dv, hashval_t dvhash)
 {
   return shared_hash_htab (vars)->find_with_hash (dv, dvhash);
 }
 
 static inline variable
-shared_hash_find (shared_hash vars, decl_or_value dv)
+shared_hash_find (shared_hash *vars, decl_or_value dv)
 {
   return shared_hash_find_1 (vars, dv, dv_htab_hash (dv));
 }
@@ -4226,7 +4226,7 @@ dataflow_set_merge (dataflow_set *dst, dataflow_set *src2)
   dataflow_set_init (dst);
   dst->stack_adjust = cur.stack_adjust;
   shared_hash_destroy (dst->vars);
-  dst->vars = new shared_hash_def;
+  dst->vars = new shared_hash;
   dst->vars->refcount = 1;
   dst->vars->htab = new variable_table_type (MAX (src1_elems, src2_elems));
 
@@ -8946,7 +8946,7 @@ process_changed_values (variable_table_type *htab)
 
 static void
 emit_notes_for_changes (rtx_insn *insn, enum emit_note_where where,
-			shared_hash vars)
+			shared_hash *vars)
 {
   emit_note_data data;
   variable_table_type *htab = shared_hash_htab (vars);
@@ -9859,7 +9859,7 @@ vt_initialize (void)
 
   alloc_aux_for_blocks (sizeof (struct variable_tracking_info_def));
 
-  empty_shared_hash = new shared_hash_def;
+  empty_shared_hash = new shared_hash;
   empty_shared_hash->refcount = 1;
   empty_shared_hash->htab = new variable_table_type (1);
   changed_variables = new variable_table_type (10);
@@ -10220,7 +10220,7 @@ vt_finalize (void)
   attrs_def_pool.release ();
   var_pool.release ();
   location_chain_pool.release ();
-  shared_hash_def_pool.release ();
+  shared_hash_pool.release ();
 
   if (MAY_HAVE_DEBUG_INSNS)
     {
-- 
2.4.0

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 10/10] tree-ssa-loop-im.c: remove typedefs that hide pointerness
  2015-09-03  5:26 [PATCH 00/10] removal of typedefs that hide pointerness episode 1 tbsaunde+gcc
                   ` (4 preceding siblings ...)
  2015-09-03  5:27 ` [PATCH 01/10] don't typedef alias_set_entry and unhide pointerness tbsaunde+gcc
@ 2015-09-03  5:27 ` tbsaunde+gcc
  2015-09-03  5:27 ` [PATCH 03/10] var-tracking.c: remove typedef of location_chain tbsaunde+gcc
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 16+ messages in thread
From: tbsaunde+gcc @ 2015-09-03  5:27 UTC (permalink / raw)
  To: gcc-patches

From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org>

gcc/ChangeLog:

2015-09-03  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* tree-ssa-loop-im.c (mem_ref_loc_p): Remove typedef.
	(mem_ref_p): Likewise.
	(outermost_indep_loop): Adjust.
	(mem_ref_in_stmt): Likewise.
	(determine_max_movement): Likewise.
	(mem_ref_alloc): Likewise.
	(record_mem_ref_loc): Likewise.
	(set_ref_stored_in_loop): Likewise.
	(mark_ref_stored): Likewise.
	(gather_mem_refs_stmt): Likewise.
	(mem_refs_may_alias_p): Likewise.
	(for_all_locs_in_loop): Likewise.
	(struct rewrite_mem_ref_loc): Likewise.
	(rewrite_mem_refs): Likewise.
	(struct first_mem_ref_loc_1): Likewise.
	(first_mem_ref_loc): Likewise.
	(struct sm_set_flag_if_changed): Likewise.
	(execute_sm_if_changed_flag_set): Likewise.
	(execute_sm): Likewise.
	(hoist_memory_references):
	(struct ref_always_accessed): Likewise.
	(ref_always_accessed_p): Likewise.
	(refs_independent_p): Likewise.
	(record_dep_loop): Likewise.
	(ref_indep_loop_p_1): Likewise.
	(ref_indep_loop_p_2): Likewise.
	(ref_indep_loop_p): Likewise.
	(can_sm_ref_p): Likewise.
	(find_refs_for_sm): Likewise.
	(tree_ssa_lim_finalize): Likewise.
---
 gcc/tree-ssa-loop-im.c | 98 +++++++++++++++++++++++++-------------------------
 1 file changed, 49 insertions(+), 49 deletions(-)

diff --git a/gcc/tree-ssa-loop-im.c b/gcc/tree-ssa-loop-im.c
index b85d9cb..f1d4a8c 100644
--- a/gcc/tree-ssa-loop-im.c
+++ b/gcc/tree-ssa-loop-im.c
@@ -102,16 +102,16 @@ static hash_map<gimple, lim_aux_data *> *lim_aux_data_map;
 
 /* Description of a memory reference location.  */
 
-typedef struct mem_ref_loc
+struct mem_ref_loc
 {
   tree *ref;			/* The reference itself.  */
   gimple stmt;			/* The statement in that it occurs.  */
-} *mem_ref_loc_p;
+};
 
 
 /* Description of a memory reference.  */
 
-typedef struct im_mem_ref
+struct im_mem_ref
 {
   unsigned id;			/* ID assigned to the memory reference
 				   (its index in memory_accesses.refs_list)  */
@@ -138,7 +138,7 @@ typedef struct im_mem_ref
 				   If it is only loaded, then it is independent
 				     on all stores in the loop.  */
   bitmap_head dep_loop;		/* The complement of INDEP_LOOP.  */
-} *mem_ref_p;
+};
 
 /* We use two bits per loop in the ref->{in,}dep_loop bitmaps, the first
    to record (in)dependence against stores in the loop and its subloops, the
@@ -181,7 +181,7 @@ static struct
   hash_table<mem_ref_hasher> *refs;
 
   /* The list of memory references.  */
-  vec<mem_ref_p> refs_list;
+  vec<im_mem_ref *> refs_list;
 
   /* The set of memory references accessed in each loop.  */
   vec<bitmap_head> refs_in_loop;
@@ -200,7 +200,7 @@ static struct
 static bitmap_obstack lim_bitmap_obstack;
 static obstack mem_ref_obstack;
 
-static bool ref_indep_loop_p (struct loop *, mem_ref_p);
+static bool ref_indep_loop_p (struct loop *, im_mem_ref *);
 
 /* Minimum cost of an expensive expression.  */
 #define LIM_EXPENSIVE ((unsigned) PARAM_VALUE (PARAM_LIM_EXPENSIVE))
@@ -537,7 +537,7 @@ stmt_cost (gimple stmt)
    instead.  */
 
 static struct loop *
-outermost_indep_loop (struct loop *outer, struct loop *loop, mem_ref_p ref)
+outermost_indep_loop (struct loop *outer, struct loop *loop, im_mem_ref *ref)
 {
   struct loop *aloop;
 
@@ -590,13 +590,13 @@ simple_mem_ref_in_stmt (gimple stmt, bool *is_store)
 
 /* Returns the memory reference contained in STMT.  */
 
-static mem_ref_p
+static im_mem_ref *
 mem_ref_in_stmt (gimple stmt)
 {
   bool store;
   tree *mem = simple_mem_ref_in_stmt (stmt, &store);
   hashval_t hash;
-  mem_ref_p ref;
+  im_mem_ref *ref;
 
   if (!mem)
     return NULL;
@@ -790,7 +790,7 @@ determine_max_movement (gimple stmt, bool must_preserve_exec)
 
   if (gimple_vuse (stmt))
     {
-      mem_ref_p ref = mem_ref_in_stmt (stmt);
+      im_mem_ref *ref = mem_ref_in_stmt (stmt);
 
       if (ref)
 	{
@@ -1420,10 +1420,10 @@ memref_free (struct im_mem_ref *mem)
 /* Allocates and returns a memory reference description for MEM whose hash
    value is HASH and id is ID.  */
 
-static mem_ref_p
+static im_mem_ref *
 mem_ref_alloc (tree mem, unsigned hash, unsigned id)
 {
-  mem_ref_p ref = XOBNEW (&mem_ref_obstack, struct im_mem_ref);
+  im_mem_ref *ref = XOBNEW (&mem_ref_obstack, struct im_mem_ref);
   ao_ref_init (&ref->mem, mem);
   ref->id = id;
   ref->hash = hash;
@@ -1439,7 +1439,7 @@ mem_ref_alloc (tree mem, unsigned hash, unsigned id)
    description REF.  The reference occurs in statement STMT.  */
 
 static void
-record_mem_ref_loc (mem_ref_p ref, gimple stmt, tree *loc)
+record_mem_ref_loc (im_mem_ref *ref, gimple stmt, tree *loc)
 {
   mem_ref_loc aref;
   aref.stmt = stmt;
@@ -1451,7 +1451,7 @@ record_mem_ref_loc (mem_ref_p ref, gimple stmt, tree *loc)
    necessary.  Return whether a bit was changed.  */
 
 static bool
-set_ref_stored_in_loop (mem_ref_p ref, struct loop *loop)
+set_ref_stored_in_loop (im_mem_ref *ref, struct loop *loop)
 {
   if (!ref->stored)
     ref->stored = BITMAP_ALLOC (&lim_bitmap_obstack);
@@ -1461,7 +1461,7 @@ set_ref_stored_in_loop (mem_ref_p ref, struct loop *loop)
 /* Marks reference REF as stored in LOOP.  */
 
 static void
-mark_ref_stored (mem_ref_p ref, struct loop *loop)
+mark_ref_stored (im_mem_ref *ref, struct loop *loop)
 {
   while (loop != current_loops->tree_root
 	 && set_ref_stored_in_loop (ref, loop))
@@ -1479,7 +1479,7 @@ gather_mem_refs_stmt (struct loop *loop, gimple stmt)
   tree *mem = NULL;
   hashval_t hash;
   im_mem_ref **slot;
-  mem_ref_p ref;
+  im_mem_ref *ref;
   bool is_stored;
   unsigned id;
 
@@ -1505,7 +1505,7 @@ gather_mem_refs_stmt (struct loop *loop, gimple stmt)
       slot = memory_accesses.refs->find_slot_with_hash (*mem, hash, INSERT);
       if (*slot)
 	{
-	  ref = (mem_ref_p) *slot;
+	  ref = *slot;
 	  id = ref->id;
 	}
       else
@@ -1625,7 +1625,7 @@ analyze_memory_references (void)
    tree_to_aff_combination_expand.  */
 
 static bool
-mem_refs_may_alias_p (mem_ref_p mem1, mem_ref_p mem2,
+mem_refs_may_alias_p (im_mem_ref *mem1, im_mem_ref *mem2,
 		      hash_map<tree, name_expansion *> **ttae_cache)
 {
   /* Perform BASE + OFFSET analysis -- if MEM1 and MEM2 are based on the same
@@ -1679,10 +1679,10 @@ find_ref_loc_in_loop_cmp (const void *loop_, const void *loc_)
 
 template <typename FN>
 static bool
-for_all_locs_in_loop (struct loop *loop, mem_ref_p ref, FN fn)
+for_all_locs_in_loop (struct loop *loop, im_mem_ref *ref, FN fn)
 {
   unsigned i;
-  mem_ref_loc_p loc;
+  mem_ref_loc *loc;
 
   /* Search for the cluster of locs in the accesses_in_loop vector
      which is sorted after postorder index of the loop father.  */
@@ -1696,7 +1696,7 @@ for_all_locs_in_loop (struct loop *loop, mem_ref_p ref, FN fn)
   while (i > 0)
     {
       --i;
-      mem_ref_loc_p l = &ref->accesses_in_loop[i];
+      mem_ref_loc *l = &ref->accesses_in_loop[i];
       if (!flow_bb_inside_loop_p (loop, gimple_bb (l->stmt)))
 	break;
       if (fn (l))
@@ -1705,7 +1705,7 @@ for_all_locs_in_loop (struct loop *loop, mem_ref_p ref, FN fn)
   for (i = loc - ref->accesses_in_loop.address ();
        i < ref->accesses_in_loop.length (); ++i)
     {
-      mem_ref_loc_p l = &ref->accesses_in_loop[i];
+      mem_ref_loc *l = &ref->accesses_in_loop[i];
       if (!flow_bb_inside_loop_p (loop, gimple_bb (l->stmt)))
 	break;
       if (fn (l))
@@ -1720,12 +1720,12 @@ for_all_locs_in_loop (struct loop *loop, mem_ref_p ref, FN fn)
 struct rewrite_mem_ref_loc
 {
   rewrite_mem_ref_loc (tree tmp_var_) : tmp_var (tmp_var_) {}
-  bool operator () (mem_ref_loc_p loc);
+  bool operator () (mem_ref_loc *loc);
   tree tmp_var;
 };
 
 bool
-rewrite_mem_ref_loc::operator () (mem_ref_loc_p loc)
+rewrite_mem_ref_loc::operator () (mem_ref_loc *loc)
 {
   *loc->ref = tmp_var;
   update_stmt (loc->stmt);
@@ -1735,7 +1735,7 @@ rewrite_mem_ref_loc::operator () (mem_ref_loc_p loc)
 /* Rewrites all references to REF in LOOP by variable TMP_VAR.  */
 
 static void
-rewrite_mem_refs (struct loop *loop, mem_ref_p ref, tree tmp_var)
+rewrite_mem_refs (struct loop *loop, im_mem_ref *ref, tree tmp_var)
 {
   for_all_locs_in_loop (loop, ref, rewrite_mem_ref_loc (tmp_var));
 }
@@ -1744,13 +1744,13 @@ rewrite_mem_refs (struct loop *loop, mem_ref_p ref, tree tmp_var)
 
 struct first_mem_ref_loc_1
 {
-  first_mem_ref_loc_1 (mem_ref_loc_p *locp_) : locp (locp_) {}
-  bool operator () (mem_ref_loc_p loc);
-  mem_ref_loc_p *locp;
+  first_mem_ref_loc_1 (mem_ref_loc **locp_) : locp (locp_) {}
+  bool operator () (mem_ref_loc *loc);
+  mem_ref_loc **locp;
 };
 
 bool
-first_mem_ref_loc_1::operator () (mem_ref_loc_p loc)
+first_mem_ref_loc_1::operator () (mem_ref_loc *loc)
 {
   *locp = loc;
   return true;
@@ -1758,10 +1758,10 @@ first_mem_ref_loc_1::operator () (mem_ref_loc_p loc)
 
 /* Returns the first reference location to REF in LOOP.  */
 
-static mem_ref_loc_p
-first_mem_ref_loc (struct loop *loop, mem_ref_p ref)
+static mem_ref_loc *
+first_mem_ref_loc (struct loop *loop, im_mem_ref *ref)
 {
-  mem_ref_loc_p locp = NULL;
+  mem_ref_loc *locp = NULL;
   for_all_locs_in_loop (loop, ref, first_mem_ref_loc_1 (&locp));
   return locp;
 }
@@ -1916,12 +1916,12 @@ execute_sm_if_changed (edge ex, tree mem, tree tmp_var, tree flag)
 struct sm_set_flag_if_changed
 {
   sm_set_flag_if_changed (tree flag_) : flag (flag_) {}
-  bool operator () (mem_ref_loc_p loc);
+  bool operator () (mem_ref_loc *loc);
   tree flag;
 };
 
 bool
-sm_set_flag_if_changed::operator () (mem_ref_loc_p loc)
+sm_set_flag_if_changed::operator () (mem_ref_loc *loc)
 {
   /* Only set the flag for writes.  */
   if (is_gimple_assign (loc->stmt)
@@ -1938,7 +1938,7 @@ sm_set_flag_if_changed::operator () (mem_ref_loc_p loc)
    set, set an appropriate flag indicating the store.  */
 
 static tree
-execute_sm_if_changed_flag_set (struct loop *loop, mem_ref_p ref)
+execute_sm_if_changed_flag_set (struct loop *loop, im_mem_ref *ref)
 {
   tree flag;
   char *str = get_lsm_tmp_name (ref->mem.ref, ~0, "_flag");
@@ -1953,7 +1953,7 @@ execute_sm_if_changed_flag_set (struct loop *loop, mem_ref_p ref)
    to the reference from the temporary variable are emitted to exits.  */
 
 static void
-execute_sm (struct loop *loop, vec<edge> exits, mem_ref_p ref)
+execute_sm (struct loop *loop, vec<edge> exits, im_mem_ref *ref)
 {
   tree tmp_var, store_flag = NULL_TREE;
   unsigned i;
@@ -2029,7 +2029,7 @@ static void
 hoist_memory_references (struct loop *loop, bitmap mem_refs,
 			 vec<edge> exits)
 {
-  mem_ref_p ref;
+  im_mem_ref *ref;
   unsigned  i;
   bitmap_iterator bi;
 
@@ -2044,13 +2044,13 @@ struct ref_always_accessed
 {
   ref_always_accessed (struct loop *loop_, bool stored_p_)
       : loop (loop_), stored_p (stored_p_) {}
-  bool operator () (mem_ref_loc_p loc);
+  bool operator () (mem_ref_loc *loc);
   struct loop *loop;
   bool stored_p;
 };
 
 bool
-ref_always_accessed::operator () (mem_ref_loc_p loc)
+ref_always_accessed::operator () (mem_ref_loc *loc)
 {
   struct loop *must_exec;
 
@@ -2082,7 +2082,7 @@ ref_always_accessed::operator () (mem_ref_loc_p loc)
    make sure REF is always stored to in LOOP.  */
 
 static bool
-ref_always_accessed_p (struct loop *loop, mem_ref_p ref, bool stored_p)
+ref_always_accessed_p (struct loop *loop, im_mem_ref *ref, bool stored_p)
 {
   return for_all_locs_in_loop (loop, ref,
 			       ref_always_accessed (loop, stored_p));
@@ -2091,7 +2091,7 @@ ref_always_accessed_p (struct loop *loop, mem_ref_p ref, bool stored_p)
 /* Returns true if REF1 and REF2 are independent.  */
 
 static bool
-refs_independent_p (mem_ref_p ref1, mem_ref_p ref2)
+refs_independent_p (im_mem_ref *ref1, im_mem_ref *ref2)
 {
   if (ref1 == ref2)
     return true;
@@ -2118,7 +2118,7 @@ refs_independent_p (mem_ref_p ref1, mem_ref_p ref2)
    and its super-loops.  */
 
 static void
-record_dep_loop (struct loop *loop, mem_ref_p ref, bool stored_p)
+record_dep_loop (struct loop *loop, im_mem_ref *ref, bool stored_p)
 {
   /* We can propagate dependent-in-loop bits up the loop
      hierarchy to all outer loops.  */
@@ -2131,12 +2131,12 @@ record_dep_loop (struct loop *loop, mem_ref_p ref, bool stored_p)
    LOOP.  */
 
 static bool
-ref_indep_loop_p_1 (struct loop *loop, mem_ref_p ref, bool stored_p)
+ref_indep_loop_p_1 (struct loop *loop, im_mem_ref *ref, bool stored_p)
 {
   bitmap refs_to_check;
   unsigned i;
   bitmap_iterator bi;
-  mem_ref_p aref;
+  im_mem_ref *aref;
 
   if (stored_p)
     refs_to_check = &memory_accesses.refs_in_loop[loop->num];
@@ -2160,7 +2160,7 @@ ref_indep_loop_p_1 (struct loop *loop, mem_ref_p ref, bool stored_p)
    LOOP.  Wrapper over ref_indep_loop_p_1, caching its results.  */
 
 static bool
-ref_indep_loop_p_2 (struct loop *loop, mem_ref_p ref, bool stored_p)
+ref_indep_loop_p_2 (struct loop *loop, im_mem_ref *ref, bool stored_p)
 {
   stored_p |= (ref->stored && bitmap_bit_p (ref->stored, loop->num));
 
@@ -2212,7 +2212,7 @@ ref_indep_loop_p_2 (struct loop *loop, mem_ref_p ref, bool stored_p)
    LOOP.  */
 
 static bool
-ref_indep_loop_p (struct loop *loop, mem_ref_p ref)
+ref_indep_loop_p (struct loop *loop, im_mem_ref *ref)
 {
   gcc_checking_assert (MEM_ANALYZABLE (ref));
 
@@ -2222,7 +2222,7 @@ ref_indep_loop_p (struct loop *loop, mem_ref_p ref)
 /* Returns true if we can perform store motion of REF from LOOP.  */
 
 static bool
-can_sm_ref_p (struct loop *loop, mem_ref_p ref)
+can_sm_ref_p (struct loop *loop, im_mem_ref *ref)
 {
   tree base;
 
@@ -2268,7 +2268,7 @@ find_refs_for_sm (struct loop *loop, bitmap sm_executed, bitmap refs_to_sm)
   bitmap refs = &memory_accesses.all_refs_stored_in_loop[loop->num];
   unsigned i;
   bitmap_iterator bi;
-  mem_ref_p ref;
+  im_mem_ref *ref;
 
   EXECUTE_IF_AND_COMPL_IN_BITMAP (refs, sm_executed, 0, i, bi)
     {
@@ -2494,7 +2494,7 @@ tree_ssa_lim_finalize (void)
 {
   basic_block bb;
   unsigned i;
-  mem_ref_p ref;
+  im_mem_ref *ref;
 
   free_aux_for_edges ();
 
-- 
2.4.0

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 03/10] var-tracking.c: remove typedef of location_chain
  2015-09-03  5:26 [PATCH 00/10] removal of typedefs that hide pointerness episode 1 tbsaunde+gcc
                   ` (5 preceding siblings ...)
  2015-09-03  5:27 ` [PATCH 10/10] tree-ssa-loop-im.c: remove typedefs that hide pointerness tbsaunde+gcc
@ 2015-09-03  5:27 ` tbsaunde+gcc
  2015-09-03  5:27 ` [PATCH 04/10] var-tracking.c: remove typedef of shared_hash tbsaunde+gcc
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 16+ messages in thread
From: tbsaunde+gcc @ 2015-09-03  5:27 UTC (permalink / raw)
  To: gcc-patches

From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org>

gcc/ChangeLog:

2015-09-03  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* var-tracking.c (struct location_chain): Rename from
	location_chain_def.
	(struct variable_part): Adjust.
	(variable_htab_free): Likewise.
	(unshare_variable): Likewise.
	(get_init_value): Likewise.
	(get_addr_from_local_cache): Likewise.
	(drop_overlapping_mem_locs): Likewise.
	(val_reset): Likewise.
			(struct variable_union_info): Likewise.
								(variable_union): Likewise.
							(find_loc_in_1pdv): Likewise.
		(insert_into_intersection): Likewise.
			(intersect_loc_chains): Likewise.
			(canonicalize_loc_order_check): Likewise.
	(canonicalize_values_mark): Likewise.
	(canonicalize_values_star): Likewise.
	(canonicalize_vars_star): Likewise.
	(variable_merge_over_cur): Likewise.
	(remove_duplicate_values): Likewise.
	(variable_post_merge_new_vals): Likewise.
	(variable_post_merge_perm_vals): Likewise.
	(find_mem_expr_in_1pdv): Likewise.
	(dataflow_set_preserve_mem_locs): Likewise.
	(dataflow_set_remove_mem_locs): Likewise.
	(variable_part_different_p): Likewise.
	(onepart_variable_different_p): Likewise.
	(find_src_set_src): Likewise.
	(dump_var): Likewise.
	(set_slot_part): Likewise.
	(clobber_slot_part): Likewise.
	(delete_slot_part): Likewise.
	(vt_expand_var_loc_chain): Likewise.
	(emit_note_insn_var_location): Likewise.
	(vt_finalize): Likewise.
---
 gcc/var-tracking.c | 136 ++++++++++++++++++++++++++---------------------------
 1 file changed, 68 insertions(+), 68 deletions(-)

diff --git a/gcc/var-tracking.c b/gcc/var-tracking.c
index cd394a0..5a53a4a 100644
--- a/gcc/var-tracking.c
+++ b/gcc/var-tracking.c
@@ -264,10 +264,10 @@ typedef struct attrs_def
 } *attrs;
 
 /* Structure for chaining the locations.  */
-typedef struct location_chain_def
+struct location_chain
 {
   /* Next element in the chain.  */
-  struct location_chain_def *next;
+  location_chain *next;
 
   /* The location (REG, MEM or VALUE).  */
   rtx loc;
@@ -277,7 +277,7 @@ typedef struct location_chain_def
 
   /* Initialized? */
   enum var_init_status init;
-} *location_chain;
+};
 
 /* A vector of loc_exp_dep holds the active dependencies of a one-part
    DV on VALUEs, i.e., the VALUEs expanded so as to form the current
@@ -337,7 +337,7 @@ struct onepart_aux
 struct variable_part
 {
   /* Chain of locations of the part.  */
-  location_chain loc_chain;
+  location_chain *loc_chain;
 
   /* Location which was last emitted to location list.  */
   rtx cur_loc;
@@ -589,8 +589,8 @@ static pool_allocator valvar_pool
   ("small variable_def pool", 256, sizeof (variable_def));
 
 /* Alloc pool for struct location_chain_def.  */
-static object_allocator<location_chain_def> location_chain_def_pool
-  ("location_chain_def pool", 1024);
+static object_allocator<location_chain> location_chain_pool
+  ("location_chain pool", 1024);
 
 /* Alloc pool for struct shared_hash_def.  */
 static object_allocator<shared_hash_def> shared_hash_def_pool
@@ -663,7 +663,7 @@ static void dataflow_set_clear (dataflow_set *);
 static void dataflow_set_copy (dataflow_set *, dataflow_set *);
 static int variable_union_info_cmp_pos (const void *, const void *);
 static void dataflow_set_union (dataflow_set *, dataflow_set *);
-static location_chain find_loc_in_1pdv (rtx, variable, variable_table_type *);
+static location_chain *find_loc_in_1pdv (rtx, variable, variable_table_type *);
 static bool canon_value_cmp (rtx, rtx);
 static int loc_cmp (rtx, rtx);
 static bool variable_part_different_p (variable_part *, variable_part *);
@@ -1435,7 +1435,7 @@ variable_htab_free (void *elem)
 {
   int i;
   variable var = (variable) elem;
-  location_chain node, next;
+  location_chain *node, *next;
 
   gcc_checking_assert (var->refcount > 0);
 
@@ -1738,8 +1738,8 @@ unshare_variable (dataflow_set *set, variable_def **slot, variable var,
 
   for (i = 0; i < var->n_var_parts; i++)
     {
-      location_chain node;
-      location_chain *nextp;
+      location_chain *node;
+      location_chain **nextp;
 
       if (i == 0 && var->onepart)
 	{
@@ -1756,9 +1756,9 @@ unshare_variable (dataflow_set *set, variable_def **slot, variable var,
       nextp = &new_var->var_part[i].loc_chain;
       for (node = var->var_part[i].loc_chain; node; node = node->next)
 	{
-	  location_chain new_lc;
+	  location_chain *new_lc;
 
-	  new_lc = new location_chain_def;
+	  new_lc = new location_chain;
 	  new_lc->next = NULL;
 	  if (node->init > initialized)
 	    new_lc->init = node->init;
@@ -1882,7 +1882,7 @@ get_init_value (dataflow_set *set, rtx loc, decl_or_value dv)
     {
       for (i = 0; i < var->n_var_parts && ret_val == VAR_INIT_STATUS_UNKNOWN; i++)
 	{
-	  location_chain nextp;
+	  location_chain *nextp;
 	  for (nextp = var->var_part[i].loc_chain; nextp; nextp = nextp->next)
 	    if (rtx_equal_p (nextp->loc, loc))
 	      {
@@ -2069,7 +2069,7 @@ get_addr_from_local_cache (dataflow_set *set, rtx const loc)
   rtx x;
   decl_or_value dv;
   variable var;
-  location_chain l;
+  location_chain *l;
 
   gcc_checking_assert (GET_CODE (loc) == VALUE);
 
@@ -2246,7 +2246,7 @@ drop_overlapping_mem_locs (variable_def **slot, overlapping_mems *coms)
 
   if (var->onepart == ONEPART_VALUE)
     {
-      location_chain loc, *locp;
+      location_chain *loc, **locp;
       bool changed = false;
       rtx cur_loc;
 
@@ -2514,7 +2514,7 @@ static void
 val_reset (dataflow_set *set, decl_or_value dv)
 {
   variable var = shared_hash_find (set->vars, dv) ;
-  location_chain node;
+  location_chain *node;
   rtx cval;
 
   if (!var || !var->n_var_parts)
@@ -2695,7 +2695,7 @@ dataflow_set_copy (dataflow_set *dst, dataflow_set *src)
 struct variable_union_info
 {
   /* Node of the location chain.  */
-  location_chain lc;
+  location_chain *lc;
 
   /* The sum of positions in the input chains.  */
   int pos;
@@ -2765,7 +2765,7 @@ variable_union (variable src, dataflow_set *set)
      entries are in canonical order.  */
   if (src->onepart)
     {
-      location_chain *nodep, dnode, snode;
+      location_chain **nodep, *dnode, *snode;
 
       gcc_assert (src->n_var_parts == 1
 		  && dst->n_var_parts == 1);
@@ -2784,7 +2784,7 @@ variable_union (variable src, dataflow_set *set)
 
 	  if (r > 0)
 	    {
-	      location_chain nnode;
+	      location_chain *nnode;
 
 	      if (shared_var_p (dst, set->vars))
 		{
@@ -2794,7 +2794,7 @@ variable_union (variable src, dataflow_set *set)
 		  goto restart_onepart_unshared;
 		}
 
-	      *nodep = nnode = new location_chain_def;
+	      *nodep = nnode = new location_chain;
 	      nnode->loc = snode->loc;
 	      nnode->init = snode->init;
 	      if (!snode->set_src || MEM_P (snode->set_src))
@@ -2852,7 +2852,7 @@ variable_union (variable src, dataflow_set *set)
 
   for (k--; k >= 0; k--)
     {
-      location_chain node, node2;
+      location_chain *node, *node2;
 
       if (i >= 0 && j >= 0
 	  && VAR_PART_OFFSET (src, i) == VAR_PART_OFFSET (dst, j))
@@ -2901,7 +2901,7 @@ variable_union (variable src, dataflow_set *set)
 	  if (dst_l == 1)
 	    {
 	      /* The most common case, much simpler, no qsort is needed.  */
-	      location_chain dstnode = dst->var_part[j].loc_chain;
+	      location_chain *dstnode = dst->var_part[j].loc_chain;
 	      dst->var_part[k].loc_chain = dstnode;
 	      VAR_PART_OFFSET (dst, k) = VAR_PART_OFFSET (dst, j);
 	      node2 = dstnode;
@@ -2911,10 +2911,10 @@ variable_union (variable src, dataflow_set *set)
 		       && REGNO (dstnode->loc) == REGNO (node->loc))
 		      || rtx_equal_p (dstnode->loc, node->loc)))
 		  {
-		    location_chain new_node;
+		    location_chain *new_node;
 
 		    /* Copy the location from SRC.  */
-		    new_node = new location_chain_def;
+		    new_node = new location_chain;
 		    new_node->loc = node->loc;
 		    new_node->init = node->init;
 		    if (!node->set_src || MEM_P (node->set_src))
@@ -2966,10 +2966,10 @@ variable_union (variable src, dataflow_set *set)
 		    }
 		  if (jj >= dst_l)	/* The location has not been found.  */
 		    {
-		      location_chain new_node;
+		      location_chain *new_node;
 
 		      /* Copy the location from SRC.  */
-		      new_node = new location_chain_def;
+		      new_node = new location_chain;
 		      new_node->loc = node->loc;
 		      new_node->init = node->init;
 		      if (!node->set_src || MEM_P (node->set_src))
@@ -3057,15 +3057,15 @@ variable_union (variable src, dataflow_set *set)
 		&& VAR_PART_OFFSET (src, i) > VAR_PART_OFFSET (dst, j))
 	       || j < 0)
 	{
-	  location_chain *nextp;
+	  location_chain **nextp;
 
 	  /* Copy the chain from SRC.  */
 	  nextp = &dst->var_part[k].loc_chain;
 	  for (node = src->var_part[i].loc_chain; node; node = node->next)
 	    {
-	      location_chain new_lc;
+	      location_chain *new_lc;
 
-	      new_lc = new location_chain_def;
+	      new_lc = new location_chain;
 	      new_lc->next = NULL;
 	      new_lc->init = node->init;
 	      if (!node->set_src || MEM_P (node->set_src))
@@ -3087,7 +3087,7 @@ variable_union (variable src, dataflow_set *set)
   if (flag_var_tracking_uninit)
     for (i = 0; i < src->n_var_parts && i < dst->n_var_parts; i++)
       {
-	location_chain node, node2;
+	location_chain *node, *node2;
 	for (node = src->var_part[i].loc_chain; node; node = node->next)
 	  for (node2 = dst->var_part[i].loc_chain; node2; node2 = node2->next)
 	    if (rtx_equal_p (node->loc, node2->loc))
@@ -3184,10 +3184,10 @@ dv_changed_p (decl_or_value dv)
    any values recursively mentioned in the location lists.  VARS must
    be in star-canonical form.  */
 
-static location_chain
+static location_chain *
 find_loc_in_1pdv (rtx loc, variable var, variable_table_type *vars)
 {
-  location_chain node;
+  location_chain *node;
   enum rtx_code loc_code;
 
   if (!var)
@@ -3268,10 +3268,10 @@ struct dfset_merge
    loc_cmp order, and it is maintained as such.  */
 
 static void
-insert_into_intersection (location_chain *nodep, rtx loc,
+insert_into_intersection (location_chain **nodep, rtx loc,
 			  enum var_init_status status)
 {
-  location_chain node;
+  location_chain *node;
   int r;
 
   for (node = *nodep; node; nodep = &node->next, node = *nodep)
@@ -3283,7 +3283,7 @@ insert_into_intersection (location_chain *nodep, rtx loc,
     else if (r > 0)
       break;
 
-  node = new location_chain_def;
+  node = new location_chain;
 
   node->loc = loc;
   node->set_src = NULL;
@@ -3298,16 +3298,16 @@ insert_into_intersection (location_chain *nodep, rtx loc,
    DSM->dst.  */
 
 static void
-intersect_loc_chains (rtx val, location_chain *dest, struct dfset_merge *dsm,
-		      location_chain s1node, variable s2var)
+intersect_loc_chains (rtx val, location_chain **dest, struct dfset_merge *dsm,
+		      location_chain *s1node, variable s2var)
 {
   dataflow_set *s1set = dsm->cur;
   dataflow_set *s2set = dsm->src;
-  location_chain found;
+  location_chain *found;
 
   if (s2var)
     {
-      location_chain s2node;
+      location_chain *s2node;
 
       gcc_checking_assert (s2var->onepart);
 
@@ -3580,7 +3580,7 @@ canonicalize_loc_order_check (variable_def **slot,
 			      dataflow_set *data ATTRIBUTE_UNUSED)
 {
   variable var = *slot;
-  location_chain node, next;
+  location_chain *node, *next;
 
 #ifdef ENABLE_RTL_CHECKING
   int i;
@@ -3617,7 +3617,7 @@ canonicalize_values_mark (variable_def **slot, dataflow_set *set)
   variable var = *slot;
   decl_or_value dv = var->dv;
   rtx val;
-  location_chain node;
+  location_chain *node;
 
   if (!dv_is_value_p (dv))
     return 1;
@@ -3655,7 +3655,7 @@ canonicalize_values_star (variable_def **slot, dataflow_set *set)
 {
   variable var = *slot;
   decl_or_value dv = var->dv;
-  location_chain node;
+  location_chain *node;
   decl_or_value cdv;
   rtx val, cval;
   variable_def **cslot;
@@ -3876,12 +3876,12 @@ canonicalize_vars_star (variable_def **slot, dataflow_set *set)
 {
   variable var = *slot;
   decl_or_value dv = var->dv;
-  location_chain node;
+  location_chain *node;
   rtx cval;
   decl_or_value cdv;
   variable_def **cslot;
   variable cvar;
-  location_chain cnode;
+  location_chain *cnode;
 
   if (!var->onepart || var->onepart == ONEPART_VALUE)
     return 1;
@@ -3939,7 +3939,7 @@ variable_merge_over_cur (variable s1var, struct dfset_merge *dsm)
   onepart_enum_t onepart = s1var->onepart;
   rtx val;
   hashval_t dvhash;
-  location_chain node, *nodep;
+  location_chain *node, **nodep;
 
   /* If the incoming onepart variable has an empty location list, then
      the intersection will be just as empty.  For other variables,
@@ -4030,7 +4030,7 @@ variable_merge_over_cur (variable s1var, struct dfset_merge *dsm)
   nodep = &dvar->var_part[0].loc_chain;
   while ((node = *nodep))
     {
-      location_chain *nextp = &node->next;
+      location_chain **nextp = &node->next;
 
       if (GET_CODE (node->loc) == REG)
 	{
@@ -4338,7 +4338,7 @@ dataflow_set_equiv_regs (dataflow_set *set)
 static void
 remove_duplicate_values (variable var)
 {
-  location_chain node, *nodep;
+  location_chain *node, **nodep;
 
   gcc_assert (var->onepart);
   gcc_assert (var->n_var_parts == 1);
@@ -4388,7 +4388,7 @@ variable_post_merge_new_vals (variable_def **slot, dfset_post_merge *dfpm)
 {
   dataflow_set *set = dfpm->set;
   variable var = *slot;
-  location_chain node;
+  location_chain *node;
 
   if (!var->onepart || !var->n_var_parts)
     return 1;
@@ -4524,7 +4524,7 @@ variable_post_merge_perm_vals (variable_def **pslot, dfset_post_merge *dfpm)
 {
   dataflow_set *set = dfpm->set;
   variable pvar = *pslot, var;
-  location_chain pnode;
+  location_chain *pnode;
   decl_or_value dv;
   attrs att;
 
@@ -4602,13 +4602,13 @@ dataflow_post_merge_adjust (dataflow_set *set, dataflow_set **permp)
    location list of a one-part variable or value VAR, or in that of
    any values recursively mentioned in the location lists.  */
 
-static location_chain
+static location_chain *
 find_mem_expr_in_1pdv (tree expr, rtx val, variable_table_type *vars)
 {
-  location_chain node;
+  location_chain *node;
   decl_or_value dv;
   variable var;
-  location_chain where = NULL;
+  location_chain *where = NULL;
 
   if (!val)
     return NULL;
@@ -4682,7 +4682,7 @@ dataflow_set_preserve_mem_locs (variable_def **slot, dataflow_set *set)
   if (var->onepart == ONEPART_VDECL || var->onepart == ONEPART_DEXPR)
     {
       tree decl = dv_as_decl (var->dv);
-      location_chain loc, *locp;
+      location_chain *loc, **locp;
       bool changed = false;
 
       if (!var->n_var_parts)
@@ -4721,7 +4721,7 @@ dataflow_set_preserve_mem_locs (variable_def **slot, dataflow_set *set)
 	  rtx old_loc = loc->loc;
 	  if (GET_CODE (old_loc) == VALUE)
 	    {
-	      location_chain mem_node
+	      location_chain *mem_node
 		= find_mem_expr_in_1pdv (decl, loc->loc,
 					 shared_hash_htab (set->vars));
 
@@ -4790,7 +4790,7 @@ dataflow_set_remove_mem_locs (variable_def **slot, dataflow_set *set)
 
   if (var->onepart == ONEPART_VALUE)
     {
-      location_chain loc, *locp;
+      location_chain *loc, **locp;
       bool changed = false;
       rtx cur_loc;
 
@@ -4883,7 +4883,7 @@ dataflow_set_clear_at_call (dataflow_set *set, rtx_insn *call_insn)
 static bool
 variable_part_different_p (variable_part *vp1, variable_part *vp2)
 {
-  location_chain lc1, lc2;
+  location_chain *lc1, *lc2;
 
   for (lc1 = vp1->loc_chain; lc1; lc1 = lc1->next)
     {
@@ -4909,7 +4909,7 @@ variable_part_different_p (variable_part *vp1, variable_part *vp2)
 static bool
 onepart_variable_different_p (variable var1, variable var2)
 {
-  location_chain lc1, lc2;
+  location_chain *lc1, *lc2;
 
   if (var1 == var2)
     return false;
@@ -6591,7 +6591,7 @@ find_src_set_src (dataflow_set *set, rtx src)
   tree decl = NULL_TREE;   /* The variable being copied around.          */
   rtx set_src = NULL_RTX;  /* The value for "decl" stored in "src".      */
   variable var;
-  location_chain nextp;
+  location_chain *nextp;
   int i;
   bool found;
 
@@ -7179,7 +7179,7 @@ static void
 dump_var (variable var)
 {
   int i;
-  location_chain node;
+  location_chain *node;
 
   if (dv_is_decl_p (var->dv))
     {
@@ -7499,8 +7499,8 @@ set_slot_part (dataflow_set *set, rtx loc, variable_def **slot,
 	       enum var_init_status initialized, rtx set_src)
 {
   int pos;
-  location_chain node, next;
-  location_chain *nextp;
+  location_chain *node, *next;
+  location_chain **nextp;
   variable var;
   onepart_enum_t onepart;
 
@@ -7727,7 +7727,7 @@ set_slot_part (dataflow_set *set, rtx loc, variable_def **slot,
     }
 
   /* Add the location to the beginning.  */
-  node = new location_chain_def;
+  node = new location_chain;
   node->loc = loc;
   node->init = initialized;
   node->set_src = set_src;
@@ -7780,7 +7780,7 @@ clobber_slot_part (dataflow_set *set, rtx loc, variable_def **slot,
 
   if (pos >= 0)
     {
-      location_chain node, next;
+      location_chain *node, *next;
 
       /* Remove the register locations from the dataflow set.  */
       next = var->var_part[pos].loc_chain;
@@ -7860,8 +7860,8 @@ delete_slot_part (dataflow_set *set, rtx loc, variable_def **slot,
 
   if (pos >= 0)
     {
-      location_chain node, next;
-      location_chain *nextp;
+      location_chain *node, *next;
+      location_chain **nextp;
       bool changed;
       rtx cur_loc;
 
@@ -8220,7 +8220,7 @@ vt_expand_var_loc_chain (variable var, bitmap regs, void *data, bool *pendrecp)
 {
   struct expand_loc_callback_data *elcd
     = (struct expand_loc_callback_data *) data;
-  location_chain loc, next;
+  location_chain *loc, *next;
   rtx result = NULL;
   int first_child, result_first_child, last_child;
   bool pending_recursion;
@@ -8577,7 +8577,7 @@ emit_note_insn_var_location (variable_def **varp, emit_note_data *data)
   HOST_WIDE_INT offsets[MAX_VAR_PARTS];
   rtx loc[MAX_VAR_PARTS];
   tree decl;
-  location_chain lc;
+  location_chain *lc;
 
   gcc_checking_assert (var->onepart == NOT_ONEPART
 		       || var->onepart == ONEPART_VDECL);
@@ -10219,7 +10219,7 @@ vt_finalize (void)
   changed_variables = NULL;
   attrs_def_pool.release ();
   var_pool.release ();
-  location_chain_def_pool.release ();
+  location_chain_pool.release ();
   shared_hash_def_pool.release ();
 
   if (MAY_HAVE_DEBUG_INSNS)
-- 
2.4.0

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 05/10] bt-load.c: remove typedefs that hide pointerness
  2015-09-03  5:26 [PATCH 00/10] removal of typedefs that hide pointerness episode 1 tbsaunde+gcc
  2015-09-03  5:26 ` [PATCH 06/10] tree-ssa-ter.c: remove typedefs that hide pointerness tbsaunde+gcc
  2015-09-03  5:27 ` [PATCH 02/10] dse.c: remove some " tbsaunde+gcc
@ 2015-09-03  5:27 ` tbsaunde+gcc
  2015-09-03  5:27 ` [PATCH 07/10] tree-vrp.c: " tbsaunde+gcc
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 16+ messages in thread
From: tbsaunde+gcc @ 2015-09-03  5:27 UTC (permalink / raw)
  To: gcc-patches

From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org>

gcc/ChangeLog:

2015-09-03  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* bt-load.c (struct btr_def_group): Rename from btr_def_group_s.
	(struct btr_user): Rename from btr_user_s.
	(struct btr_def): Rename from btr_def_s.
	(find_btr_def_group): Adjust.
	(add_btr_def): Likewise.
	(new_btr_user): Likewise.
	(note_other_use_this_block): Likewise.
	(compute_defs_uses_and_gen): Likewise.
	(link_btr_uses): Likewise.
	(build_btr_def_use_webs): Likewise.
	(block_at_edge_of_live_range_p): Likewise.
	(btr_def_live_range): Likewise.
	(combine_btr_defs): Likewise.
	(move_btr_def): Likewise.
	(migrate_btr_def): Likewise.
	(migrate_btr_defs): Likewise.
---
 gcc/bt-load.c | 140 +++++++++++++++++++++++++++++-----------------------------
 1 file changed, 71 insertions(+), 69 deletions(-)

diff --git a/gcc/bt-load.c b/gcc/bt-load.c
index 5d8b752..9b1d366 100644
--- a/gcc/bt-load.c
+++ b/gcc/bt-load.c
@@ -51,18 +51,20 @@ along with GCC; see the file COPYING3.  If not see
 #include "rtl-iter.h"
 #include "fibonacci_heap.h"
 
+struct btr_def;
+
 /* Target register optimizations - these are performed after reload.  */
 
-typedef struct btr_def_group_s
+struct btr_def_group
 {
-  struct btr_def_group_s *next;
+  btr_def_group *next;
   rtx src;
-  struct btr_def_s *members;
-} *btr_def_group;
+  btr_def *members;
+};
 
-typedef struct btr_user_s
+struct btr_user
 {
-  struct btr_user_s *next;
+  btr_user *next;
   basic_block bb;
   int luid;
   rtx_insn *insn;
@@ -74,7 +76,7 @@ typedef struct btr_user_s
   int n_reaching_defs;
   int first_reaching_def;
   char other_use_this_block;
-} *btr_user;
+};
 
 /* btr_def structs appear on three lists:
      1. A list of all btr_def structures (head is
@@ -85,10 +87,10 @@ typedef struct btr_user_s
 	group (head is in a BTR_DEF_GROUP struct, linked by
 	NEXT_THIS_GROUP field).  */
 
-typedef struct btr_def_s
+struct btr_def
 {
-  struct btr_def_s *next_this_bb;
-  struct btr_def_s *next_this_group;
+  btr_def *next_this_bb;
+  btr_def *next_this_group;
   basic_block bb;
   int luid;
   rtx_insn *insn;
@@ -98,8 +100,8 @@ typedef struct btr_def_s
      source (i.e. a label), group links together all the
      insns with the same source.  For other branch register
      setting insns, group is NULL.  */
-  btr_def_group group;
-  btr_user uses;
+  btr_def_group *group;
+  btr_user *uses;
   /* If this def has a reaching use which is not a simple use
      in a branch instruction, then has_ambiguous_use will be true,
      and we will not attempt to migrate this definition.  */
@@ -119,38 +121,38 @@ typedef struct btr_def_s
      to clear out trs_live_at_end again.  */
   char own_end;
   bitmap live_range;
-} *btr_def;
+};
 
-typedef fibonacci_heap <long, btr_def_s> btr_heap_t;
-typedef fibonacci_node <long, btr_def_s> btr_heap_node_t;
+typedef fibonacci_heap <long, btr_def> btr_heap_t;
+typedef fibonacci_node <long, btr_def> btr_heap_node_t;
 
 static int issue_rate;
 
 static int basic_block_freq (const_basic_block);
 static int insn_sets_btr_p (const rtx_insn *, int, int *);
-static void find_btr_def_group (btr_def_group *, btr_def);
-static btr_def add_btr_def (btr_heap_t *, basic_block, int, rtx_insn *,
-			    unsigned int, int, btr_def_group *);
-static btr_user new_btr_user (basic_block, int, rtx_insn *);
+static void find_btr_def_group (btr_def_group **, btr_def *);
+static btr_def *add_btr_def (btr_heap_t *, basic_block, int, rtx_insn *,
+			    unsigned int, int, btr_def_group **);
+static btr_user *new_btr_user (basic_block, int, rtx_insn *);
 static void dump_hard_reg_set (HARD_REG_SET);
 static void dump_btrs_live (int);
-static void note_other_use_this_block (unsigned int, btr_user);
-static void compute_defs_uses_and_gen (btr_heap_t *, btr_def *,btr_user *,
+static void note_other_use_this_block (unsigned int, btr_user *);
+static void compute_defs_uses_and_gen (btr_heap_t *, btr_def **, btr_user **,
 				       sbitmap *, sbitmap *, HARD_REG_SET *);
 static void compute_kill (sbitmap *, sbitmap *, HARD_REG_SET *);
 static void compute_out (sbitmap *bb_out, sbitmap *, sbitmap *, int);
-static void link_btr_uses (btr_def *, btr_user *, sbitmap *, sbitmap *, int);
+static void link_btr_uses (btr_def **, btr_user **, sbitmap *, sbitmap *, int);
 static void build_btr_def_use_webs (btr_heap_t *);
-static int block_at_edge_of_live_range_p (int, btr_def);
-static void clear_btr_from_live_range (btr_def def);
-static void add_btr_to_live_range (btr_def, int);
+static int block_at_edge_of_live_range_p (int, btr_def *);
+static void clear_btr_from_live_range (btr_def *def);
+static void add_btr_to_live_range (btr_def *, int);
 static void augment_live_range (bitmap, HARD_REG_SET *, basic_block,
 				basic_block, int);
 static int choose_btr (HARD_REG_SET);
-static void combine_btr_defs (btr_def, HARD_REG_SET *);
-static void btr_def_live_range (btr_def, HARD_REG_SET *);
-static void move_btr_def (basic_block, int, btr_def, bitmap, HARD_REG_SET *);
-static int migrate_btr_def (btr_def, int);
+static void combine_btr_defs (btr_def *, HARD_REG_SET *);
+static void btr_def_live_range (btr_def *, HARD_REG_SET *);
+static void move_btr_def (basic_block, int, btr_def *, bitmap, HARD_REG_SET *);
+static int migrate_btr_def (btr_def *, int);
 static void migrate_btr_defs (enum reg_class, int);
 static int can_move_up (const_basic_block, const rtx_insn *, int);
 static void note_btr_set (rtx, const_rtx, void *);
@@ -257,11 +259,11 @@ insn_sets_btr_p (const rtx_insn *insn, int check_const, int *regno)
    to in the list starting with *ALL_BTR_DEF_GROUPS.  If no such
    group exists, create one.  Add def to the group.  */
 static void
-find_btr_def_group (btr_def_group *all_btr_def_groups, btr_def def)
+find_btr_def_group (btr_def_group **all_btr_def_groups, btr_def *def)
 {
   if (insn_sets_btr_p (def->insn, 1, NULL))
     {
-      btr_def_group this_group;
+      btr_def_group *this_group;
       rtx def_src = SET_SRC (single_set (def->insn));
 
       /* ?? This linear search is an efficiency concern, particularly
@@ -274,7 +276,7 @@ find_btr_def_group (btr_def_group *all_btr_def_groups, btr_def def)
 
       if (!this_group)
 	{
-	  this_group = XOBNEW (&migrate_btrl_obstack, struct btr_def_group_s);
+	  this_group = XOBNEW (&migrate_btrl_obstack, btr_def_group);
 	  this_group->src = def_src;
 	  this_group->members = NULL;
 	  this_group->next = *all_btr_def_groups;
@@ -291,13 +293,13 @@ find_btr_def_group (btr_def_group *all_btr_def_groups, btr_def def)
 /* Create a new target register definition structure, for a definition in
    block BB, instruction INSN, and insert it into ALL_BTR_DEFS.  Return
    the new definition.  */
-static btr_def
+static btr_def *
 add_btr_def (btr_heap_t *all_btr_defs, basic_block bb, int insn_luid,
 	     rtx_insn *insn,
 	     unsigned int dest_reg, int other_btr_uses_before_def,
-	     btr_def_group *all_btr_def_groups)
+	     btr_def_group **all_btr_def_groups)
 {
-  btr_def this_def = XOBNEW (&migrate_btrl_obstack, struct btr_def_s);
+  btr_def *this_def = XOBNEW (&migrate_btrl_obstack, btr_def);
   this_def->bb = bb;
   this_def->luid = insn_luid;
   this_def->insn = insn;
@@ -325,7 +327,7 @@ add_btr_def (btr_heap_t *all_btr_defs, basic_block bb, int insn_luid,
 
 /* Create a new target register user structure, for a use in block BB,
    instruction INSN.  Return the new user.  */
-static btr_user
+static btr_user *
 new_btr_user (basic_block bb, int insn_luid, rtx_insn *insn)
 {
   /* This instruction reads target registers.  We need
@@ -334,7 +336,7 @@ new_btr_user (basic_block bb, int insn_luid, rtx_insn *insn)
    */
   rtx *usep = find_btr_use (PATTERN (insn));
   rtx use;
-  btr_user user = NULL;
+  btr_user *user = NULL;
 
   if (usep)
     {
@@ -348,7 +350,7 @@ new_btr_user (basic_block bb, int insn_luid, rtx_insn *insn)
 	usep = NULL;
     }
   use = usep ? *usep : NULL_RTX;
-  user = XOBNEW (&migrate_btrl_obstack, struct btr_user_s);
+  user = XOBNEW (&migrate_btrl_obstack, btr_user);
   user->bb = bb;
   user->luid = insn_luid;
   user->insn = insn;
@@ -395,9 +397,9 @@ dump_btrs_live (int bb)
    If any of them use the same register, set their other_use_this_block
    flag.  */
 static void
-note_other_use_this_block (unsigned int regno, btr_user users_this_bb)
+note_other_use_this_block (unsigned int regno, btr_user *users_this_bb)
 {
-  btr_user user;
+  btr_user *user;
 
   for (user = users_this_bb; user != NULL; user = user->next)
     if (user->use && REGNO (user->use) == regno)
@@ -405,7 +407,7 @@ note_other_use_this_block (unsigned int regno, btr_user users_this_bb)
 }
 
 struct defs_uses_info {
-  btr_user users_this_bb;
+  btr_user *users_this_bb;
   HARD_REG_SET btrs_written_in_block;
   HARD_REG_SET btrs_live_in_block;
   sbitmap bb_gen;
@@ -438,8 +440,8 @@ note_btr_set (rtx dest, const_rtx set ATTRIBUTE_UNUSED, void *data)
 }
 
 static void
-compute_defs_uses_and_gen (btr_heap_t *all_btr_defs, btr_def *def_array,
-			   btr_user *use_array, sbitmap *btr_defset,
+compute_defs_uses_and_gen (btr_heap_t *all_btr_defs, btr_def **def_array,
+			   btr_user **use_array, sbitmap *btr_defset,
 			   sbitmap *bb_gen, HARD_REG_SET *btrs_written)
 {
   /* Scan the code building up the set of all defs and all uses.
@@ -450,7 +452,7 @@ compute_defs_uses_and_gen (btr_heap_t *all_btr_defs, btr_def *def_array,
   */
   int i;
   int insn_luid = 0;
-  btr_def_group all_btr_def_groups = NULL;
+  btr_def_group *all_btr_def_groups = NULL;
   defs_uses_info info;
 
   bitmap_vector_clear (bb_gen, last_basic_block_for_fn (cfun));
@@ -458,7 +460,7 @@ compute_defs_uses_and_gen (btr_heap_t *all_btr_defs, btr_def *def_array,
     {
       basic_block bb = BASIC_BLOCK_FOR_FN (cfun, i);
       int reg;
-      btr_def defs_this_bb = NULL;
+      btr_def *defs_this_bb = NULL;
       rtx_insn *insn;
       rtx_insn *last;
       int can_throw = 0;
@@ -485,7 +487,7 @@ compute_defs_uses_and_gen (btr_heap_t *all_btr_defs, btr_def *def_array,
 
 	      if (insn_sets_btr_p (insn, 0, &regno))
 		{
-		  btr_def def = add_btr_def (
+		  btr_def *def = add_btr_def (
 		      all_btr_defs, bb, insn_luid, insn, regno,
 		      TEST_HARD_REG_BIT (info.btrs_live_in_block, regno),
 		      &all_btr_def_groups);
@@ -505,7 +507,7 @@ compute_defs_uses_and_gen (btr_heap_t *all_btr_defs, btr_def *def_array,
 	      else if (cfun->has_nonlocal_label
 		       && GET_CODE (PATTERN (insn)) == UNSPEC_VOLATILE)
 		{
-		  btr_user user;
+		  btr_user *user;
 
 		  /* Do the equivalent of calling note_other_use_this_block
 		     for every target register.  */
@@ -521,7 +523,7 @@ compute_defs_uses_and_gen (btr_heap_t *all_btr_defs, btr_def *def_array,
 		{
 		  if (find_btr_use (PATTERN (insn)))
 		    {
-		      btr_user user = new_btr_user (bb, insn_luid, insn);
+		      btr_user *user = new_btr_user (bb, insn_luid, insn);
 
 		      use_array[insn_uid] = user;
 		      if (user->use)
@@ -655,7 +657,7 @@ compute_out (sbitmap *bb_out, sbitmap *bb_gen, sbitmap *bb_kill, int max_uid)
 }
 
 static void
-link_btr_uses (btr_def *def_array, btr_user *use_array, sbitmap *bb_out,
+link_btr_uses (btr_def **def_array, btr_user **use_array, sbitmap *bb_out,
 	       sbitmap *btr_defset, int max_uid)
 {
   int i;
@@ -678,8 +680,8 @@ link_btr_uses (btr_def *def_array, btr_user *use_array, sbitmap *bb_out,
 	    {
 	      int insn_uid = INSN_UID (insn);
 
-	      btr_def def   = def_array[insn_uid];
-	      btr_user user = use_array[insn_uid];
+	      btr_def *def   = def_array[insn_uid];
+	      btr_user *user = use_array[insn_uid];
 	      if (def != NULL)
 		{
 		  /* Remove all reaching defs of regno except
@@ -716,7 +718,7 @@ link_btr_uses (btr_def *def_array, btr_user *use_array, sbitmap *bb_out,
 		    }
 		  EXECUTE_IF_SET_IN_BITMAP (reaching_defs_of_reg, 0, uid, sbi)
 		    {
-		      btr_def def = def_array[uid];
+		      btr_def *def = def_array[uid];
 
 		      /* We now know that def reaches user.  */
 
@@ -770,8 +772,8 @@ static void
 build_btr_def_use_webs (btr_heap_t *all_btr_defs)
 {
   const int max_uid = get_max_uid ();
-  btr_def  *def_array   = XCNEWVEC (btr_def, max_uid);
-  btr_user *use_array   = XCNEWVEC (btr_user, max_uid);
+  btr_def  **def_array   = XCNEWVEC (btr_def *, max_uid);
+  btr_user **use_array   = XCNEWVEC (btr_user *, max_uid);
   sbitmap *btr_defset   = sbitmap_vector_alloc (
 			   (last_btr - first_btr) + 1, max_uid);
   sbitmap *bb_gen = sbitmap_vector_alloc (last_basic_block_for_fn (cfun),
@@ -808,14 +810,14 @@ build_btr_def_use_webs (btr_heap_t *all_btr_defs)
    live range of the definition DEF, AND there are other live
    ranges of the same target register that include BB.  */
 static int
-block_at_edge_of_live_range_p (int bb, btr_def def)
+block_at_edge_of_live_range_p (int bb, btr_def *def)
 {
   if (def->other_btr_uses_before_def
       && BASIC_BLOCK_FOR_FN (cfun, bb) == def->bb)
     return 1;
   else if (def->other_btr_uses_after_use)
     {
-      btr_user user;
+      btr_user *user;
       for (user = def->uses; user != NULL; user = user->next)
 	if (BASIC_BLOCK_FOR_FN (cfun, bb) == user->bb)
 	  return 1;
@@ -832,7 +834,7 @@ block_at_edge_of_live_range_p (int bb, btr_def def)
    to remove the target register from the live set of these blocks
    only if they do not contain other live ranges for the same register.  */
 static void
-clear_btr_from_live_range (btr_def def)
+clear_btr_from_live_range (btr_def *def)
 {
   unsigned bb;
   bitmap_iterator bi;
@@ -860,7 +862,7 @@ clear_btr_from_live_range (btr_def def)
    If OWN_END is set, also show that the register is live from our
    definitions at the end of the basic block where it is defined.  */
 static void
-add_btr_to_live_range (btr_def def, int own_end)
+add_btr_to_live_range (btr_def *def, int own_end)
 {
   unsigned bb;
   bitmap_iterator bi;
@@ -1003,11 +1005,11 @@ choose_btr (HARD_REG_SET used_btrs)
    in this live range, but ignore the live range represented by DEF
    when calculating this set.  */
 static void
-btr_def_live_range (btr_def def, HARD_REG_SET *btrs_live_in_range)
+btr_def_live_range (btr_def *def, HARD_REG_SET *btrs_live_in_range)
 {
   if (!def->live_range)
     {
-      btr_user user;
+      btr_user *user;
 
       def->live_range = BITMAP_ALLOC (NULL);
 
@@ -1050,9 +1052,9 @@ btr_def_live_range (btr_def def, HARD_REG_SET *btrs_live_in_range)
    group that are dominated by DEF, provided that there is a target
    register available to allocate to the merged web.  */
 static void
-combine_btr_defs (btr_def def, HARD_REG_SET *btrs_live_in_range)
+combine_btr_defs (btr_def *def, HARD_REG_SET *btrs_live_in_range)
 {
-  btr_def other_def;
+  btr_def *other_def;
 
   for (other_def = def->group->members;
        other_def != NULL;
@@ -1070,7 +1072,7 @@ combine_btr_defs (btr_def def, HARD_REG_SET *btrs_live_in_range)
 	  int btr;
 	  HARD_REG_SET combined_btrs_live;
 	  bitmap combined_live_range = BITMAP_ALLOC (NULL);
-	  btr_user user;
+	  btr_user *user;
 
 	  if (other_def->live_range == NULL)
 	    {
@@ -1100,7 +1102,7 @@ combine_btr_defs (btr_def def, HARD_REG_SET *btrs_live_in_range)
 	      user = other_def->uses;
 	      while (user != NULL)
 		{
-		  btr_user next = user->next;
+		  btr_user *next = user->next;
 
 		  user->next = def->uses;
 		  def->uses = user;
@@ -1139,7 +1141,7 @@ combine_btr_defs (btr_def def, HARD_REG_SET *btrs_live_in_range)
    If this new position means that other defs in the
    same group can be combined with DEF then combine them.  */
 static void
-move_btr_def (basic_block new_def_bb, int btr, btr_def def, bitmap live_range,
+move_btr_def (basic_block new_def_bb, int btr, btr_def *def, bitmap live_range,
 	     HARD_REG_SET *btrs_live_in_range)
 {
   /* We can move the instruction.
@@ -1154,7 +1156,7 @@ move_btr_def (basic_block new_def_bb, int btr, btr_def def, bitmap live_range,
   rtx btr_rtx;
   rtx_insn *new_insn;
   machine_mode btr_mode;
-  btr_user user;
+  btr_user *user;
   rtx set;
 
   if (dump_file)
@@ -1264,7 +1266,7 @@ can_move_up (const_basic_block bb, const rtx_insn *insn, int n_insns)
    MIN_COST, but we may be able to reduce it further).
    Return zero if no further migration is possible.  */
 static int
-migrate_btr_def (btr_def def, int min_cost)
+migrate_btr_def (btr_def *def, int min_cost)
 {
   bitmap live_range;
   HARD_REG_SET btrs_live_in_range;
@@ -1273,7 +1275,7 @@ migrate_btr_def (btr_def def, int min_cost)
   basic_block attempt;
   int give_up = 0;
   int def_moved = 0;
-  btr_user user;
+  btr_user *user;
   int def_latency;
 
   if (dump_file)
@@ -1432,7 +1434,7 @@ migrate_btr_defs (enum reg_class btr_class, int allow_callee_save)
   while (!all_btr_defs.empty ())
     {
       int min_cost = -all_btr_defs.min_key ();
-      btr_def def = all_btr_defs.extract_min ();
+      btr_def *def = all_btr_defs.extract_min ();
       if (migrate_btr_def (def, min_cost))
 	{
 	  all_btr_defs.insert (-def->cost, def);
-- 
2.4.0

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 09/10] dwarf2out.c: remove typedefs that hide pointerness
  2015-09-03  5:26 [PATCH 00/10] removal of typedefs that hide pointerness episode 1 tbsaunde+gcc
                   ` (7 preceding siblings ...)
  2015-09-03  5:27 ` [PATCH 04/10] var-tracking.c: remove typedef of shared_hash tbsaunde+gcc
@ 2015-09-03  5:31 ` tbsaunde+gcc
  2015-09-03  5:47 ` [PATCH 08/10] dwarf2cfi.c: remove typedef that hides pointerness tbsaunde+gcc
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 16+ messages in thread
From: tbsaunde+gcc @ 2015-09-03  5:31 UTC (permalink / raw)
  To: gcc-patches

From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org>

gcc/ChangeLog:

2015-09-03  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* dwarf2out.c (dw_attr_ref): Remove typedef.
	(dw_line_info_ref): Likewise.
	(pubname_ref): Likewise.
	(dw_ranges_ref): Likewise.
	(dw_ranges_by_label_ref): Likewise.
	(comdat_type_node_ref): Likewise.
 (dw_line_info_table_struct): Rename to dw_line_info_table.
	(get_AT): Adjust.
	(get_AT_low_pc): Likewise.
	(get_AT_hi_pc): Likewise.
	(get_AT_string): Likewise.
	(get_AT_flag): Likewise.
	(get_AT_unsigned): Likewise.
	(get_AT_ref): Likewise.
	(get_AT_file): Likewise.
	(remove_AT): Likewise.
	(print_die): Likewise.
	(check_die): Likewise.
	(die_checksum): Likewise.
	(attr_checksum_ordered): Likewise.
	(struct checksum_attributes): Likewise.
	(collect_checksum_attributes): Likewise.
	(die_checksum_ordered): Likewise.
			(same_die_p): Likewise.
			(is_declaration_die): Likewise.
	(clone_die): Likewise.
	(clone_as_declaration): Likewise.
	(copy_declaration_context): Likewise.
	(break_out_comdat_types): Likewise.
	(copy_decls_walk): Likewise.
	(output_location_lists): Likewise.
	(external_ref_hasher::hash): Likewise.
	(optimize_external_refs_1): Likewise.
	(build_abbrev_table): Likewise.
	(size_of_die): Likewise.
	(unmark_all_dies): Likewise.
	(size_of_pubnames): Likewise.
	(output_die_abbrevs): Likewise.
	(output_die): Likewise.
	(output_pubnames): Likewise.
	(add_ranges_num): Likewise.
	(add_ranges_by_labels): Likewise.
	(add_high_low_attributes): Likewise.
	(gen_producer_string): Likewise.
	(dwarf2out_set_name): Likewise.
	(new_line_info_table): Likewise.
	(prune_unused_types_walk_attribs): Likewise.
	(prune_unused_types_update_strings): Likewise.
	(prune_unused_types): Likewise.
	(resolve_addr): Likewise.
	(optimize_location_lists_1): Likewise.
	(index_location_lists): Likewise.
	(dwarf2out_finish): Likewise.
---
 gcc/dwarf2out.c | 340 +++++++++++++++++++++++++++-----------------------------
 1 file changed, 163 insertions(+), 177 deletions(-)

diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index d9d3063..f441e92 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -2550,14 +2550,7 @@ const struct gcc_debug_hooks dwarf2_lineno_debug_hooks =
 
 typedef long int dw_offset;
 
-/* Define typedefs here to avoid circular dependencies.  */
-
-typedef struct dw_attr_struct *dw_attr_ref;
-typedef struct dw_line_info_struct *dw_line_info_ref;
-typedef struct pubname_struct *pubname_ref;
-typedef struct dw_ranges_struct *dw_ranges_ref;
-typedef struct dw_ranges_by_label_struct *dw_ranges_by_label_ref;
-typedef struct comdat_type_struct *comdat_type_node_ref;
+struct comdat_type_node;
 
 /* The entries in the line_info table more-or-less mirror the opcodes
    that are used in the real dwarf line table.  Arrays of these entries
@@ -2596,7 +2589,7 @@ typedef struct GTY(()) dw_line_info_struct {
 } dw_line_info_entry;
 
 
-typedef struct GTY(()) dw_line_info_table_struct {
+struct GTY(()) dw_line_info_table {
   /* The label that marks the end of this section.  */
   const char *end_label;
 
@@ -2610,9 +2603,7 @@ typedef struct GTY(()) dw_line_info_table_struct {
   bool in_use;
 
   vec<dw_line_info_entry, va_gc> *entries;
-} dw_line_info_table;
-
-typedef dw_line_info_table *dw_line_info_table_p;
+};
 
 
 /* Each DIE attribute has a field specifying the attribute kind,
@@ -2634,7 +2625,7 @@ typedef struct GTY((chain_circular ("%h.die_sib"), for_user)) die_struct {
   union die_symbol_or_type_node
     {
       const char * GTY ((tag ("0"))) die_symbol;
-      comdat_type_node_ref GTY ((tag ("1"))) die_type_node;
+      comdat_type_node *GTY ((tag ("1"))) die_type_node;
     }
   GTY ((desc ("%0.comdat_type_p"))) die_id;
   vec<dw_attr_node, va_gc> *die_attr;
@@ -2680,7 +2671,7 @@ typedef struct GTY(()) pubname_struct {
 pubname_entry;
 
 
-struct GTY(()) dw_ranges_struct {
+struct GTY(()) dw_ranges {
   /* If this is positive, it's a block number, otherwise it's a
      bitwise-negated index into dw_ranges_by_label.  */
   int num;
@@ -2696,21 +2687,20 @@ typedef struct GTY(()) macinfo_struct {
 macinfo_entry;
 
 
-struct GTY(()) dw_ranges_by_label_struct {
+struct GTY(()) dw_ranges_by_label {
   const char *begin;
   const char *end;
 };
 
 /* The comdat type node structure.  */
-typedef struct GTY(()) comdat_type_struct
+struct GTY(()) comdat_type_node
 {
   dw_die_ref root_die;
   dw_die_ref type_die;
   dw_die_ref skeleton_die;
   char signature[DWARF_TYPE_SIGNATURE_SIZE];
-  struct comdat_type_struct *next;
-}
-comdat_type_node;
+  comdat_type_node *next;
+};
 
 /* A list of DIEs for which we can't determine ancestry (parent_die
    field) just yet.  Later in dwarf2out_finish we will fill in the
@@ -2985,7 +2975,7 @@ static GTY(()) dw_line_info_table *text_section_line_info;
 static GTY(()) dw_line_info_table *cold_text_section_line_info;
 
 /* The set of all non-default tables of line number info.  */
-static GTY(()) vec<dw_line_info_table_p, va_gc> *separate_line_info;
+static GTY(()) vec<dw_line_info_table *, va_gc> *separate_line_info;
 
 /* A flag to tell pubnames/types export if there is an info section to
    refer to.  */
@@ -3010,7 +3000,7 @@ static GTY (()) vec<macinfo_entry, va_gc> *macinfo_table;
    && !macinfo_table->is_empty ())
 
 /* Array of dies for which we should generate .debug_ranges info.  */
-static GTY ((length ("ranges_table_allocated"))) dw_ranges_ref ranges_table;
+static GTY ((length ("ranges_table_allocated"))) dw_ranges *ranges_table;
 
 /* Number of elements currently allocated for ranges_table.  */
 static GTY(()) unsigned ranges_table_allocated;
@@ -3020,7 +3010,7 @@ static GTY(()) unsigned ranges_table_in_use;
 
 /* Array of pairs of labels referenced in ranges_table.  */
 static GTY ((length ("ranges_by_label_allocated")))
-     dw_ranges_by_label_ref ranges_by_label;
+     dw_ranges_by_label *ranges_by_label;
 
 /* Number of elements currently allocated for ranges_by_label.  */
 static GTY(()) unsigned ranges_by_label_allocated;
@@ -3081,38 +3071,38 @@ static const char *dwarf_attr_name (unsigned);
 static const char *dwarf_form_name (unsigned);
 static tree decl_ultimate_origin (const_tree);
 static tree decl_class_context (tree);
-static void add_dwarf_attr (dw_die_ref, dw_attr_ref);
-static inline enum dw_val_class AT_class (dw_attr_ref);
-static inline unsigned int AT_index (dw_attr_ref);
+static void add_dwarf_attr (dw_die_ref, dw_attr_node *);
+static inline enum dw_val_class AT_class (dw_attr_node *);
+static inline unsigned int AT_index (dw_attr_node *);
 static void add_AT_flag (dw_die_ref, enum dwarf_attribute, unsigned);
-static inline unsigned AT_flag (dw_attr_ref);
+static inline unsigned AT_flag (dw_attr_node *);
 static void add_AT_int (dw_die_ref, enum dwarf_attribute, HOST_WIDE_INT);
-static inline HOST_WIDE_INT AT_int (dw_attr_ref);
+static inline HOST_WIDE_INT AT_int (dw_attr_node *);
 static void add_AT_unsigned (dw_die_ref, enum dwarf_attribute, unsigned HOST_WIDE_INT);
-static inline unsigned HOST_WIDE_INT AT_unsigned (dw_attr_ref);
+static inline unsigned HOST_WIDE_INT AT_unsigned (dw_attr_node *);
 static void add_AT_double (dw_die_ref, enum dwarf_attribute,
 			   HOST_WIDE_INT, unsigned HOST_WIDE_INT);
 static inline void add_AT_vec (dw_die_ref, enum dwarf_attribute, unsigned int,
 			       unsigned int, unsigned char *);
 static void add_AT_data8 (dw_die_ref, enum dwarf_attribute, unsigned char *);
 static void add_AT_string (dw_die_ref, enum dwarf_attribute, const char *);
-static inline const char *AT_string (dw_attr_ref);
-static enum dwarf_form AT_string_form (dw_attr_ref);
+static inline const char *AT_string (dw_attr_node *);
+static enum dwarf_form AT_string_form (dw_attr_node *);
 static void add_AT_die_ref (dw_die_ref, enum dwarf_attribute, dw_die_ref);
 static void add_AT_specification (dw_die_ref, dw_die_ref);
-static inline dw_die_ref AT_ref (dw_attr_ref);
-static inline int AT_ref_external (dw_attr_ref);
-static inline void set_AT_ref_external (dw_attr_ref, int);
+static inline dw_die_ref AT_ref (dw_attr_node *);
+static inline int AT_ref_external (dw_attr_node *);
+static inline void set_AT_ref_external (dw_attr_node *, int);
 static void add_AT_fde_ref (dw_die_ref, enum dwarf_attribute, unsigned);
 static void add_AT_loc (dw_die_ref, enum dwarf_attribute, dw_loc_descr_ref);
-static inline dw_loc_descr_ref AT_loc (dw_attr_ref);
+static inline dw_loc_descr_ref AT_loc (dw_attr_node *);
 static void add_AT_loc_list (dw_die_ref, enum dwarf_attribute,
 			     dw_loc_list_ref);
-static inline dw_loc_list_ref AT_loc_list (dw_attr_ref);
+static inline dw_loc_list_ref AT_loc_list (dw_attr_node *);
 static addr_table_entry *add_addr_table_entry (void *, enum ate_kind);
 static void remove_addr_table_entry (addr_table_entry *);
 static void add_AT_addr (dw_die_ref, enum dwarf_attribute, rtx, bool);
-static inline rtx AT_addr (dw_attr_ref);
+static inline rtx AT_addr (dw_attr_node *);
 static void add_AT_lbl_id (dw_die_ref, enum dwarf_attribute, const char *);
 static void add_AT_lineptr (dw_die_ref, enum dwarf_attribute, const char *);
 static void add_AT_macptr (dw_die_ref, enum dwarf_attribute, const char *);
@@ -3120,8 +3110,8 @@ static void add_AT_offset (dw_die_ref, enum dwarf_attribute,
 			   unsigned HOST_WIDE_INT);
 static void add_AT_range_list (dw_die_ref, enum dwarf_attribute,
                                unsigned long, bool);
-static inline const char *AT_lbl (dw_attr_ref);
-static dw_attr_ref get_AT (dw_die_ref, enum dwarf_attribute);
+static inline const char *AT_lbl (dw_attr_node *);
+static dw_attr_node *get_AT (dw_die_ref, enum dwarf_attribute);
 static const char *get_AT_low_pc (dw_die_ref);
 static const char *get_AT_hi_pc (dw_die_ref);
 static const char *get_AT_string (dw_die_ref, enum dwarf_attribute);
@@ -3148,12 +3138,12 @@ static void print_die (dw_die_ref, FILE *);
 static dw_die_ref push_new_compile_unit (dw_die_ref, dw_die_ref);
 static dw_die_ref pop_compile_unit (dw_die_ref);
 static void loc_checksum (dw_loc_descr_ref, struct md5_ctx *);
-static void attr_checksum (dw_attr_ref, struct md5_ctx *, int *);
+static void attr_checksum (dw_attr_node *, struct md5_ctx *, int *);
 static void die_checksum (dw_die_ref, struct md5_ctx *, int *);
 static void checksum_sleb128 (HOST_WIDE_INT, struct md5_ctx *);
 static void checksum_uleb128 (unsigned HOST_WIDE_INT, struct md5_ctx *);
 static void loc_checksum_ordered (dw_loc_descr_ref, struct md5_ctx *);
-static void attr_checksum_ordered (enum dwarf_tag, dw_attr_ref,
+static void attr_checksum_ordered (enum dwarf_tag, dw_attr_node *,
 				   struct md5_ctx *, int *);
 struct checksum_attributes;
 static void collect_checksum_attributes (struct checksum_attributes *, dw_die_ref);
@@ -3162,7 +3152,7 @@ static void checksum_die_context (dw_die_ref, struct md5_ctx *);
 static void generate_type_signature (dw_die_ref, comdat_type_node *);
 static int same_loc_p (dw_loc_descr_ref, dw_loc_descr_ref, int *);
 static int same_dw_val_p (const dw_val_node *, const dw_val_node *, int *);
-static int same_attr_p (dw_attr_ref, dw_attr_ref, int *);
+static int same_attr_p (dw_attr_node *, dw_attr_node *, int *);
 static int same_die_p (dw_die_ref, dw_die_ref, int *);
 static int same_die_p_wrap (dw_die_ref, dw_die_ref);
 static void compute_section_prefix (dw_die_ref);
@@ -3198,8 +3188,8 @@ static void unmark_dies (dw_die_ref);
 static void unmark_all_dies (dw_die_ref);
 static unsigned long size_of_pubnames (vec<pubname_entry, va_gc> *);
 static unsigned long size_of_aranges (void);
-static enum dwarf_form value_format (dw_attr_ref);
-static void output_value_format (dw_attr_ref);
+static enum dwarf_form value_format (dw_attr_node *);
+static void output_value_format (dw_attr_node *);
 static void output_abbrev_section (void);
 static void output_die_abbrevs (unsigned long, dw_die_ref);
 static void output_die_symbol (dw_die_ref);
@@ -3357,8 +3347,8 @@ static void prune_unused_types_walk_attribs (dw_die_ref);
 static void prune_unused_types_prune (dw_die_ref);
 static void prune_unused_types (void);
 static int maybe_emit_file (struct dwarf_file_data *fd);
-static inline const char *AT_vms_delta1 (dw_attr_ref);
-static inline const char *AT_vms_delta2 (dw_attr_ref);
+static inline const char *AT_vms_delta1 (dw_attr_node *);
+static inline const char *AT_vms_delta2 (dw_attr_node *);
 static inline void add_AT_vms_delta (dw_die_ref, enum dwarf_attribute,
 				     const char *, const char *);
 static void append_entry_to_tmpl_value_parm_die_table (dw_die_ref, tree);
@@ -3800,7 +3790,7 @@ decl_class_context (tree decl)
 /* Add an attribute/value pair to a DIE.  */
 
 static inline void
-add_dwarf_attr (dw_die_ref die, dw_attr_ref attr)
+add_dwarf_attr (dw_die_ref die, dw_attr_node *attr)
 {
   /* Maybe this should be an assert?  */
   if (die == NULL)
@@ -3811,7 +3801,7 @@ add_dwarf_attr (dw_die_ref die, dw_attr_ref attr)
 }
 
 static inline enum dw_val_class
-AT_class (dw_attr_ref a)
+AT_class (dw_attr_node *a)
 {
   return a->dw_attr_val.val_class;
 }
@@ -3822,7 +3812,7 @@ AT_class (dw_attr_ref a)
    pruning.  */
 
 static inline unsigned int
-AT_index (dw_attr_ref a)
+AT_index (dw_attr_node *a)
 {
   if (AT_class (a) == dw_val_class_str)
     return a->dw_attr_val.v.val_str->index;
@@ -3846,7 +3836,7 @@ add_AT_flag (dw_die_ref die, enum dwarf_attribute attr_kind, unsigned int flag)
 }
 
 static inline unsigned
-AT_flag (dw_attr_ref a)
+AT_flag (dw_attr_node *a)
 {
   gcc_assert (a && AT_class (a) == dw_val_class_flag);
   return a->dw_attr_val.v.val_flag;
@@ -3867,7 +3857,7 @@ add_AT_int (dw_die_ref die, enum dwarf_attribute attr_kind, HOST_WIDE_INT int_va
 }
 
 static inline HOST_WIDE_INT
-AT_int (dw_attr_ref a)
+AT_int (dw_attr_node *a)
 {
   gcc_assert (a && AT_class (a) == dw_val_class_const);
   return a->dw_attr_val.v.val_int;
@@ -3889,7 +3879,7 @@ add_AT_unsigned (dw_die_ref die, enum dwarf_attribute attr_kind,
 }
 
 static inline unsigned HOST_WIDE_INT
-AT_unsigned (dw_attr_ref a)
+AT_unsigned (dw_attr_node *a)
 {
   gcc_assert (a && AT_class (a) == dw_val_class_unsigned_const);
   return a->dw_attr_val.v.val_unsigned;
@@ -4064,7 +4054,7 @@ add_AT_string (dw_die_ref die, enum dwarf_attribute attr_kind, const char *str)
 }
 
 static inline const char *
-AT_string (dw_attr_ref a)
+AT_string (dw_attr_node *a)
 {
   gcc_assert (a && AT_class (a) == dw_val_class_str);
   return a->dw_attr_val.v.val_str->str;
@@ -4134,7 +4124,7 @@ find_string_form (struct indirect_string_node *node)
    output inline in DIE or out-of-line in .debug_str section.  */
 
 static enum dwarf_form
-AT_string_form (dw_attr_ref a)
+AT_string_form (dw_attr_node *a)
 {
   gcc_assert (a && AT_class (a) == dw_val_class_str);
   return find_string_form (a->dw_attr_val.v.val_str);
@@ -4167,7 +4157,7 @@ add_AT_die_ref (dw_die_ref die, enum dwarf_attribute attr_kind, dw_die_ref targ_
 /* Change DIE reference REF to point to NEW_DIE instead.  */
 
 static inline void
-change_AT_die_ref (dw_attr_ref ref, dw_die_ref new_die)
+change_AT_die_ref (dw_attr_node *ref, dw_die_ref new_die)
 {
   gcc_assert (ref->dw_attr_val.val_class == dw_val_class_die_ref);
   ref->dw_attr_val.v.val_die_ref.die = new_die;
@@ -4186,14 +4176,14 @@ add_AT_specification (dw_die_ref die, dw_die_ref targ_die)
 }
 
 static inline dw_die_ref
-AT_ref (dw_attr_ref a)
+AT_ref (dw_attr_node *a)
 {
   gcc_assert (a && AT_class (a) == dw_val_class_die_ref);
   return a->dw_attr_val.v.val_die_ref.die;
 }
 
 static inline int
-AT_ref_external (dw_attr_ref a)
+AT_ref_external (dw_attr_node *a)
 {
   if (a && AT_class (a) == dw_val_class_die_ref)
     return a->dw_attr_val.v.val_die_ref.external;
@@ -4202,7 +4192,7 @@ AT_ref_external (dw_attr_ref a)
 }
 
 static inline void
-set_AT_ref_external (dw_attr_ref a, int i)
+set_AT_ref_external (dw_attr_node *a, int i)
 {
   gcc_assert (a && AT_class (a) == dw_val_class_die_ref);
   a->dw_attr_val.v.val_die_ref.external = i;
@@ -4237,7 +4227,7 @@ add_AT_loc (dw_die_ref die, enum dwarf_attribute attr_kind, dw_loc_descr_ref loc
 }
 
 static inline dw_loc_descr_ref
-AT_loc (dw_attr_ref a)
+AT_loc (dw_attr_node *a)
 {
   gcc_assert (a && AT_class (a) == dw_val_class_loc);
   return a->dw_attr_val.v.val_loc;
@@ -4257,14 +4247,14 @@ add_AT_loc_list (dw_die_ref die, enum dwarf_attribute attr_kind, dw_loc_list_ref
 }
 
 static inline dw_loc_list_ref
-AT_loc_list (dw_attr_ref a)
+AT_loc_list (dw_attr_node *a)
 {
   gcc_assert (a && AT_class (a) == dw_val_class_loc_list);
   return a->dw_attr_val.v.val_loc_list;
 }
 
 static inline dw_loc_list_ref *
-AT_loc_list_ptr (dw_attr_ref a)
+AT_loc_list_ptr (dw_attr_node *a)
 {
   gcc_assert (a && AT_class (a) == dw_val_class_loc_list);
   return &a->dw_attr_val.v.val_loc_list;
@@ -4444,7 +4434,7 @@ add_AT_addr (dw_die_ref die, enum dwarf_attribute attr_kind, rtx addr,
 /* Get the RTX from to an address DIE attribute.  */
 
 static inline rtx
-AT_addr (dw_attr_ref a)
+AT_addr (dw_attr_node *a)
 {
   gcc_assert (a && AT_class (a) == dw_val_class_addr);
   return a->dw_attr_val.v.val_addr;
@@ -4468,7 +4458,7 @@ add_AT_file (dw_die_ref die, enum dwarf_attribute attr_kind,
 /* Get the dwarf_file_data from a file DIE attribute.  */
 
 static inline struct dwarf_file_data *
-AT_file (dw_attr_ref a)
+AT_file (dw_attr_node *a)
 {
   gcc_assert (a && AT_class (a) == dw_val_class_file);
   return a->dw_attr_val.v.val_file;
@@ -4586,7 +4576,7 @@ add_AT_range_list (dw_die_ref die, enum dwarf_attribute attr_kind,
 /* Return the start label of a delta attribute.  */
 
 static inline const char *
-AT_vms_delta1 (dw_attr_ref a)
+AT_vms_delta1 (dw_attr_node *a)
 {
   gcc_assert (a && (AT_class (a) == dw_val_class_vms_delta));
   return a->dw_attr_val.v.val_vms_delta.lbl1;
@@ -4595,14 +4585,14 @@ AT_vms_delta1 (dw_attr_ref a)
 /* Return the end label of a delta attribute.  */
 
 static inline const char *
-AT_vms_delta2 (dw_attr_ref a)
+AT_vms_delta2 (dw_attr_node *a)
 {
   gcc_assert (a && (AT_class (a) == dw_val_class_vms_delta));
   return a->dw_attr_val.v.val_vms_delta.lbl2;
 }
 
 static inline const char *
-AT_lbl (dw_attr_ref a)
+AT_lbl (dw_attr_node *a)
 {
   gcc_assert (a && (AT_class (a) == dw_val_class_lbl_id
 		    || AT_class (a) == dw_val_class_lineptr
@@ -4613,10 +4603,10 @@ AT_lbl (dw_attr_ref a)
 
 /* Get the attribute of type attr_kind.  */
 
-static dw_attr_ref
+static dw_attr_node *
 get_AT (dw_die_ref die, enum dwarf_attribute attr_kind)
 {
-  dw_attr_ref a;
+  dw_attr_node *a;
   unsigned ix;
   dw_die_ref spec = NULL;
 
@@ -4660,7 +4650,7 @@ get_die_parent (dw_die_ref die)
 static inline const char *
 get_AT_low_pc (dw_die_ref die)
 {
-  dw_attr_ref a = get_AT (die, DW_AT_low_pc);
+  dw_attr_node *a = get_AT (die, DW_AT_low_pc);
 
   return a ? AT_lbl (a) : NULL;
 }
@@ -4672,7 +4662,7 @@ get_AT_low_pc (dw_die_ref die)
 static inline const char *
 get_AT_hi_pc (dw_die_ref die)
 {
-  dw_attr_ref a = get_AT (die, DW_AT_high_pc);
+  dw_attr_node *a = get_AT (die, DW_AT_high_pc);
 
   return a ? AT_lbl (a) : NULL;
 }
@@ -4683,7 +4673,7 @@ get_AT_hi_pc (dw_die_ref die)
 static inline const char *
 get_AT_string (dw_die_ref die, enum dwarf_attribute attr_kind)
 {
-  dw_attr_ref a = get_AT (die, attr_kind);
+  dw_attr_node *a = get_AT (die, attr_kind);
 
   return a ? AT_string (a) : NULL;
 }
@@ -4694,7 +4684,7 @@ get_AT_string (dw_die_ref die, enum dwarf_attribute attr_kind)
 static inline int
 get_AT_flag (dw_die_ref die, enum dwarf_attribute attr_kind)
 {
-  dw_attr_ref a = get_AT (die, attr_kind);
+  dw_attr_node *a = get_AT (die, attr_kind);
 
   return a ? AT_flag (a) : 0;
 }
@@ -4705,7 +4695,7 @@ get_AT_flag (dw_die_ref die, enum dwarf_attribute attr_kind)
 static inline unsigned
 get_AT_unsigned (dw_die_ref die, enum dwarf_attribute attr_kind)
 {
-  dw_attr_ref a = get_AT (die, attr_kind);
+  dw_attr_node *a = get_AT (die, attr_kind);
 
   return a ? AT_unsigned (a) : 0;
 }
@@ -4713,7 +4703,7 @@ get_AT_unsigned (dw_die_ref die, enum dwarf_attribute attr_kind)
 static inline dw_die_ref
 get_AT_ref (dw_die_ref die, enum dwarf_attribute attr_kind)
 {
-  dw_attr_ref a = get_AT (die, attr_kind);
+  dw_attr_node *a = get_AT (die, attr_kind);
 
   return a ? AT_ref (a) : NULL;
 }
@@ -4721,7 +4711,7 @@ get_AT_ref (dw_die_ref die, enum dwarf_attribute attr_kind)
 static inline struct dwarf_file_data *
 get_AT_file (dw_die_ref die, enum dwarf_attribute attr_kind)
 {
-  dw_attr_ref a = get_AT (die, attr_kind);
+  dw_attr_node *a = get_AT (die, attr_kind);
 
   return a ? AT_file (a) : NULL;
 }
@@ -4777,7 +4767,7 @@ is_ada (void)
 static bool
 remove_AT (dw_die_ref die, enum dwarf_attribute attr_kind)
 {
-  dw_attr_ref a;
+  dw_attr_node *a;
   unsigned ix;
 
   if (! die)
@@ -5588,7 +5578,7 @@ print_dw_val (dw_val_node *val, bool recurse, FILE *outfile)
 /* Likewise, for a DIE attribute.  */
 
 static void
-print_attribute (dw_attr_ref a, bool recurse, FILE *outfile)
+print_attribute (dw_attr_node *a, bool recurse, FILE *outfile)
 {
   print_dw_val (&a->dw_attr_val, recurse, outfile);
 }
@@ -5635,7 +5625,7 @@ print_loc_descr (dw_loc_descr_ref loc, FILE *outfile)
 static void
 print_die (dw_die_ref die, FILE *outfile)
 {
-  dw_attr_ref a;
+  dw_attr_node *a;
   dw_die_ref c;
   unsigned ix;
 
@@ -5724,7 +5714,7 @@ static void
 check_die (dw_die_ref die)
 {
   unsigned ix;
-  dw_attr_ref a;
+  dw_attr_node *a;
   bool inline_found = false;
   int n_location = 0, n_low_pc = 0, n_high_pc = 0, n_artificial = 0;
   int n_decl_line = 0, n_decl_file = 0;
@@ -5830,7 +5820,7 @@ loc_checksum (dw_loc_descr_ref loc, struct md5_ctx *ctx)
 /* Calculate the checksum of an attribute.  */
 
 static void
-attr_checksum (dw_attr_ref at, struct md5_ctx *ctx, int *mark)
+attr_checksum (dw_attr_node *at, struct md5_ctx *ctx, int *mark)
 {
   dw_loc_descr_ref loc;
   rtx r;
@@ -5916,7 +5906,7 @@ static void
 die_checksum (dw_die_ref die, struct md5_ctx *ctx, int *mark)
 {
   dw_die_ref c;
-  dw_attr_ref a;
+  dw_attr_node *a;
   unsigned ix;
 
   /* To avoid infinite recursion.  */
@@ -6050,7 +6040,7 @@ loc_checksum_ordered (dw_loc_descr_ref loc, struct md5_ctx *ctx)
 /* Calculate the checksum of an attribute.  */
 
 static void
-attr_checksum_ordered (enum dwarf_tag tag, dw_attr_ref at,
+attr_checksum_ordered (enum dwarf_tag tag, dw_attr_node *at,
 		       struct md5_ctx *ctx, int *mark)
 {
   dw_loc_descr_ref loc;
@@ -6073,7 +6063,7 @@ attr_checksum_ordered (enum dwarf_tag tag, dw_attr_ref at,
 	  || (at->dw_attr == DW_AT_friend
 	      && tag == DW_TAG_friend))
 	{
-	  dw_attr_ref name_attr = get_AT (target_die, DW_AT_name);
+	  dw_attr_node *name_attr = get_AT (target_die, DW_AT_name);
 
 	  if (name_attr != NULL)
 	    {
@@ -6205,53 +6195,53 @@ attr_checksum_ordered (enum dwarf_tag tag, dw_attr_ref at,
 
 struct checksum_attributes
 {
-  dw_attr_ref at_name;
-  dw_attr_ref at_type;
-  dw_attr_ref at_friend;
-  dw_attr_ref at_accessibility;
-  dw_attr_ref at_address_class;
-  dw_attr_ref at_allocated;
-  dw_attr_ref at_artificial;
-  dw_attr_ref at_associated;
-  dw_attr_ref at_binary_scale;
-  dw_attr_ref at_bit_offset;
-  dw_attr_ref at_bit_size;
-  dw_attr_ref at_bit_stride;
-  dw_attr_ref at_byte_size;
-  dw_attr_ref at_byte_stride;
-  dw_attr_ref at_const_value;
-  dw_attr_ref at_containing_type;
-  dw_attr_ref at_count;
-  dw_attr_ref at_data_location;
-  dw_attr_ref at_data_member_location;
-  dw_attr_ref at_decimal_scale;
-  dw_attr_ref at_decimal_sign;
-  dw_attr_ref at_default_value;
-  dw_attr_ref at_digit_count;
-  dw_attr_ref at_discr;
-  dw_attr_ref at_discr_list;
-  dw_attr_ref at_discr_value;
-  dw_attr_ref at_encoding;
-  dw_attr_ref at_endianity;
-  dw_attr_ref at_explicit;
-  dw_attr_ref at_is_optional;
-  dw_attr_ref at_location;
-  dw_attr_ref at_lower_bound;
-  dw_attr_ref at_mutable;
-  dw_attr_ref at_ordering;
-  dw_attr_ref at_picture_string;
-  dw_attr_ref at_prototyped;
-  dw_attr_ref at_small;
-  dw_attr_ref at_segment;
-  dw_attr_ref at_string_length;
-  dw_attr_ref at_threads_scaled;
-  dw_attr_ref at_upper_bound;
-  dw_attr_ref at_use_location;
-  dw_attr_ref at_use_UTF8;
-  dw_attr_ref at_variable_parameter;
-  dw_attr_ref at_virtuality;
-  dw_attr_ref at_visibility;
-  dw_attr_ref at_vtable_elem_location;
+  dw_attr_node *at_name;
+  dw_attr_node *at_type;
+  dw_attr_node *at_friend;
+  dw_attr_node *at_accessibility;
+  dw_attr_node *at_address_class;
+  dw_attr_node *at_allocated;
+  dw_attr_node *at_artificial;
+  dw_attr_node *at_associated;
+  dw_attr_node *at_binary_scale;
+  dw_attr_node *at_bit_offset;
+  dw_attr_node *at_bit_size;
+  dw_attr_node *at_bit_stride;
+  dw_attr_node *at_byte_size;
+  dw_attr_node *at_byte_stride;
+  dw_attr_node *at_const_value;
+  dw_attr_node *at_containing_type;
+  dw_attr_node *at_count;
+  dw_attr_node *at_data_location;
+  dw_attr_node *at_data_member_location;
+  dw_attr_node *at_decimal_scale;
+  dw_attr_node *at_decimal_sign;
+  dw_attr_node *at_default_value;
+  dw_attr_node *at_digit_count;
+  dw_attr_node *at_discr;
+  dw_attr_node *at_discr_list;
+  dw_attr_node *at_discr_value;
+  dw_attr_node *at_encoding;
+  dw_attr_node *at_endianity;
+  dw_attr_node *at_explicit;
+  dw_attr_node *at_is_optional;
+  dw_attr_node *at_location;
+  dw_attr_node *at_lower_bound;
+  dw_attr_node *at_mutable;
+  dw_attr_node *at_ordering;
+  dw_attr_node *at_picture_string;
+  dw_attr_node *at_prototyped;
+  dw_attr_node *at_small;
+  dw_attr_node *at_segment;
+  dw_attr_node *at_string_length;
+  dw_attr_node *at_threads_scaled;
+  dw_attr_node *at_upper_bound;
+  dw_attr_node *at_use_location;
+  dw_attr_node *at_use_UTF8;
+  dw_attr_node *at_variable_parameter;
+  dw_attr_node *at_virtuality;
+  dw_attr_node *at_visibility;
+  dw_attr_node *at_vtable_elem_location;
 };
 
 /* Collect the attributes that we will want to use for the checksum.  */
@@ -6259,7 +6249,7 @@ struct checksum_attributes
 static void
 collect_checksum_attributes (struct checksum_attributes *attrs, dw_die_ref die)
 {
-  dw_attr_ref a;
+  dw_attr_node *a;
   unsigned ix;
 
   FOR_EACH_VEC_SAFE_ELT (die->die_attr, ix, a)
@@ -6483,7 +6473,7 @@ die_checksum_ordered (dw_die_ref die, struct md5_ctx *ctx, int *mark)
   /* Checksum the child DIEs.  */
   c = die->die_child;
   if (c) do {
-    dw_attr_ref name_attr;
+    dw_attr_node *name_attr;
 
     c = c->die_sib;
     name_attr = get_AT (c, DW_AT_name);
@@ -6686,7 +6676,7 @@ same_dw_val_p (const dw_val_node *v1, const dw_val_node *v2, int *mark)
 /* Do the attributes look the same?  */
 
 static int
-same_attr_p (dw_attr_ref at1, dw_attr_ref at2, int *mark)
+same_attr_p (dw_attr_node *at1, dw_attr_node *at2, int *mark)
 {
   if (at1->dw_attr != at2->dw_attr)
     return 0;
@@ -6705,7 +6695,7 @@ static int
 same_die_p (dw_die_ref die1, dw_die_ref die2, int *mark)
 {
   dw_die_ref c1, c2;
-  dw_attr_ref a1;
+  dw_attr_node *a1;
   unsigned ix;
 
   /* To avoid infinite recursion.  */
@@ -7145,7 +7135,7 @@ break_out_includes (dw_die_ref die)
 static int
 is_declaration_die (dw_die_ref die)
 {
-  dw_attr_ref a;
+  dw_attr_node *a;
   unsigned ix;
 
   FOR_EACH_VEC_SAFE_ELT (die->die_attr, ix, a)
@@ -7228,7 +7218,7 @@ static dw_die_ref
 clone_die (dw_die_ref die)
 {
   dw_die_ref clone;
-  dw_attr_ref a;
+  dw_attr_node *a;
   unsigned ix;
 
   clone = ggc_cleared_alloc<die_node> ();
@@ -7260,7 +7250,7 @@ clone_as_declaration (dw_die_ref die)
 {
   dw_die_ref clone;
   dw_die_ref decl;
-  dw_attr_ref a;
+  dw_attr_node *a;
   unsigned ix;
 
   /* If the DIE is already a declaration, just clone it.  */
@@ -7420,7 +7410,7 @@ copy_declaration_context (dw_die_ref unit, dw_die_ref die)
     {
       unsigned ix;
       dw_die_ref c;
-      dw_attr_ref a;
+      dw_attr_node *a;
 
       /* The original DIE will be changed to a declaration, and must
          be moved to be a child of the original declaration DIE.  */
@@ -7627,7 +7617,7 @@ break_out_comdat_types (dw_die_ref die)
     if (should_move_die_to_comdat (c))
       {
         dw_die_ref replacement;
-	comdat_type_node_ref type_node;
+	comdat_type_node *type_node;
 
         /* Break out nested types into their own type units.  */
         break_out_comdat_types (c);
@@ -7712,7 +7702,7 @@ static void
 copy_decls_walk (dw_die_ref unit, dw_die_ref die, decl_hash_type *decl_table)
 {
   dw_die_ref c;
-  dw_attr_ref a;
+  dw_attr_node *a;
   unsigned ix;
 
   FOR_EACH_VEC_SAFE_ELT (die->die_attr, ix, a)
@@ -7837,7 +7827,7 @@ static void
 output_location_lists (dw_die_ref die)
 {
   dw_die_ref c;
-  dw_attr_ref a;
+  dw_attr_node *a;
   unsigned ix;
 
   FOR_EACH_VEC_SAFE_ELT (die->die_attr, ix, a)
@@ -7887,7 +7877,7 @@ external_ref_hasher::hash (const external_ref *r)
     {
       /* We have a type signature; use a subset of the bits as the hash.
 	 The 8-byte signature is at least as large as hashval_t.  */
-      comdat_type_node_ref type_node = die->die_id.die_type_node;
+      comdat_type_node *type_node = die->die_id.die_type_node;
       memcpy (&h, type_node->signature, sizeof (h));
     }
   return h;
@@ -7929,7 +7919,7 @@ static void
 optimize_external_refs_1 (dw_die_ref die, external_ref_hash_type *map)
 {
   dw_die_ref c;
-  dw_attr_ref a;
+  dw_attr_node *a;
   unsigned ix;
   struct external_ref *ref_p;
 
@@ -8017,7 +8007,7 @@ build_abbrev_table (dw_die_ref die, external_ref_hash_type *extern_map)
   unsigned long abbrev_id;
   unsigned int n_alloc;
   dw_die_ref c;
-  dw_attr_ref a;
+  dw_attr_node *a;
   unsigned ix;
 
   /* Scan the DIE references, and replace any that refer to
@@ -8041,7 +8031,7 @@ build_abbrev_table (dw_die_ref die, external_ref_hash_type *extern_map)
   for (abbrev_id = 1; abbrev_id < abbrev_die_table_in_use; ++abbrev_id)
     {
       dw_die_ref abbrev = abbrev_die_table[abbrev_id];
-      dw_attr_ref die_a, abbrev_a;
+      dw_attr_node *die_a, *abbrev_a;
       unsigned ix;
       bool ok = true;
 
@@ -8113,7 +8103,7 @@ static unsigned long
 size_of_die (dw_die_ref die)
 {
   unsigned long size = 0;
-  dw_attr_ref a;
+  dw_attr_node *a;
   unsigned ix;
   enum dwarf_form form;
 
@@ -8352,7 +8342,7 @@ static void
 unmark_all_dies (dw_die_ref die)
 {
   dw_die_ref c;
-  dw_attr_ref a;
+  dw_attr_node *a;
   unsigned ix;
 
   if (!die->die_mark)
@@ -8406,7 +8396,7 @@ size_of_pubnames (vec<pubname_entry, va_gc> *names)
 {
   unsigned long size;
   unsigned i;
-  pubname_ref p;
+  pubname_entry *p;
   int space_for_flags = (debug_generate_pub_sections == 2) ? 1 : 0;
 
   size = DWARF_PUBNAMES_HEADER_SIZE;
@@ -8456,7 +8446,7 @@ size_of_aranges (void)
 /* Select the encoding of an attribute value.  */
 
 static enum dwarf_form
-value_format (dw_attr_ref a)
+value_format (dw_attr_node *a)
 {
   switch (AT_class (a))
     {
@@ -8647,7 +8637,7 @@ value_format (dw_attr_ref a)
 /* Output the encoding of an attribute value.  */
 
 static void
-output_value_format (dw_attr_ref a)
+output_value_format (dw_attr_node *a)
 {
   enum dwarf_form form = value_format (a);
 
@@ -8660,7 +8650,7 @@ static void
 output_die_abbrevs (unsigned long abbrev_id, dw_die_ref abbrev)
 {
   unsigned ix;
-  dw_attr_ref a_attr;
+  dw_attr_node *a_attr;
 
   dw2_asm_output_data_uleb128 (abbrev_id, "(abbrev code)");
   dw2_asm_output_data_uleb128 (abbrev->die_tag, "(TAG: %s)",
@@ -8835,7 +8825,7 @@ output_loc_list (dw_loc_list_ref list_head)
    indirect reference.  */
 
 static void
-output_range_list_offset (dw_attr_ref a)
+output_range_list_offset (dw_attr_node *a)
 {
   const char *name = dwarf_attr_name (a->dw_attr);
 
@@ -8855,7 +8845,7 @@ output_range_list_offset (dw_attr_ref a)
 /* Output the offset into the debug_loc section.  */
 
 static void
-output_loc_list_offset (dw_attr_ref a)
+output_loc_list_offset (dw_attr_node *a)
 {
   char *sym = AT_loc_list (a)->ll_symbol;
 
@@ -8871,7 +8861,7 @@ output_loc_list_offset (dw_attr_ref a)
 /* Output an attribute's index or value appropriately.  */
 
 static void
-output_attr_index_or_value (dw_attr_ref a)
+output_attr_index_or_value (dw_attr_node *a)
 {
   const char *name = dwarf_attr_name (a->dw_attr);
 
@@ -8914,7 +8904,7 @@ output_signature (const char *sig, const char *name)
 static void
 output_die (dw_die_ref die)
 {
-  dw_attr_ref a;
+  dw_attr_node *a;
   dw_die_ref c;
   unsigned long size;
   unsigned ix;
@@ -9081,7 +9071,7 @@ output_die (dw_die_ref die)
 	    {
 	      if (AT_ref (a)->comdat_type_p)
 	        {
-	          comdat_type_node_ref type_node =
+		  comdat_type_node *type_node =
 	            AT_ref (a)->die_id.die_type_node;
 
 	          gcc_assert (type_node);
@@ -9642,7 +9632,7 @@ output_pubnames (vec<pubname_entry, va_gc> *names)
 {
   unsigned i;
   unsigned long pubnames_length = size_of_pubnames (names);
-  pubname_ref pub;
+  pubname_entry *pub;
 
   if (DWARF_INITIAL_LENGTH_SIZE - DWARF_OFFSET_SIZE == 4)
     dw2_asm_output_data (4, 0xffffffff,
@@ -9679,7 +9669,7 @@ output_pubnames (vec<pubname_entry, va_gc> *names)
 	     the skeleton DIE (if there is one).  */
 	  if (pub->die->comdat_type_p && names == pubtype_table)
 	    {
-	      comdat_type_node_ref type_node = pub->die->die_id.die_type_node;
+	      comdat_type_node *type_node = pub->die->die_id.die_type_node;
 
 	      if (type_node != NULL)
 	        die_offset = (type_node->skeleton_die != NULL
@@ -9811,10 +9801,10 @@ add_ranges_num (int num)
   if (in_use == ranges_table_allocated)
     {
       ranges_table_allocated += RANGES_TABLE_INCREMENT;
-      ranges_table = GGC_RESIZEVEC (struct dw_ranges_struct, ranges_table,
+      ranges_table = GGC_RESIZEVEC (dw_ranges, ranges_table,
 				    ranges_table_allocated);
       memset (ranges_table + ranges_table_in_use, 0,
-	      RANGES_TABLE_INCREMENT * sizeof (struct dw_ranges_struct));
+	      RANGES_TABLE_INCREMENT * sizeof (dw_ranges));
     }
 
   ranges_table[in_use].num = num;
@@ -9847,12 +9837,10 @@ add_ranges_by_labels (dw_die_ref die, const char *begin, const char *end,
   if (in_use == ranges_by_label_allocated)
     {
       ranges_by_label_allocated += RANGES_TABLE_INCREMENT;
-      ranges_by_label = GGC_RESIZEVEC (struct dw_ranges_by_label_struct,
-				       ranges_by_label,
+      ranges_by_label = GGC_RESIZEVEC (dw_ranges_by_label, ranges_by_label,
 				       ranges_by_label_allocated);
       memset (ranges_by_label + ranges_by_label_in_use, 0,
-	      RANGES_TABLE_INCREMENT
-	      * sizeof (struct dw_ranges_by_label_struct));
+	      RANGES_TABLE_INCREMENT * sizeof (dw_ranges_by_label));
     }
 
   ranges_by_label[in_use].begin = begin;
@@ -19787,7 +19775,7 @@ add_high_low_attributes (tree stmt, dw_die_ref die)
     {
       tree chain, superblock = NULL_TREE;
       dw_die_ref pdie;
-      dw_attr_ref attr = NULL;
+      dw_attr_node *attr = NULL;
 
       if (inlined_function_outer_scope_p (stmt))
 	{
@@ -19805,7 +19793,7 @@ add_high_low_attributes (tree stmt, dw_die_ref die)
 	   BLOCK_SAME_RANGE (chain);
 	   chain = BLOCK_SUPERCONTEXT (chain))
 	{
-	  dw_attr_ref new_attr;
+	  dw_attr_node *new_attr;
 
 	  pdie = pdie->die_parent;
 	  if (pdie == NULL)
@@ -20057,8 +20045,6 @@ gen_ptr_to_mbr_type_die (tree type, dw_die_ref context_die)
 		      context_die);
 }
 
-typedef const char *dchar_p; /* For DEF_VEC_P.  */
-
 static char *producer_string;
 
 /* Return a heap allocated producer string including command line options
@@ -20068,7 +20054,7 @@ static char *
 gen_producer_string (void)
 {
   size_t j;
-  auto_vec<dchar_p> switches;
+  auto_vec<const char *> switches;
   const char *language_string = lang_hooks.name;
   char *producer, *tail;
   const char *p;
@@ -22183,7 +22169,7 @@ static void
 dwarf2out_set_name (tree decl, tree name)
 {
   dw_die_ref die;
-  dw_attr_ref attr;
+  dw_attr_node *attr;
   const char *dname;
 
   die = TYPE_SYMTAB_DIE (decl);
@@ -22443,7 +22429,7 @@ new_line_info_table (void)
 {
   dw_line_info_table *table;
 
-  table = ggc_cleared_alloc<dw_line_info_table_struct> ();
+  table = ggc_cleared_alloc<dw_line_info_table> ();
   table->file_num = 1;
   table->line_num = 1;
   table->is_stmt = DWARF_LINE_DEFAULT_IS_STMT_START;
@@ -23554,7 +23540,7 @@ prune_unmark_dies (dw_die_ref die)
 static void
 prune_unused_types_walk_attribs (dw_die_ref die)
 {
-  dw_attr_ref a;
+  dw_attr_node *a;
   unsigned ix;
 
   FOR_EACH_VEC_SAFE_ELT (die->die_attr, ix, a)
@@ -23761,7 +23747,7 @@ prune_unused_types_walk (dw_die_ref die)
 static void
 prune_unused_types_update_strings (dw_die_ref die)
 {
-  dw_attr_ref a;
+  dw_attr_node *a;
   unsigned ix;
 
   FOR_EACH_VEC_SAFE_ELT (die->die_attr, ix, a)
@@ -23829,7 +23815,7 @@ prune_unused_types (void)
   unsigned int i;
   limbo_die_node *node;
   comdat_type_node *ctnode;
-  pubname_ref pub;
+  pubname_entry *pub;
   dw_die_ref base_type;
 
 #if ENABLE_ASSERT_CHECKING
@@ -24440,7 +24426,7 @@ static void
 resolve_addr (dw_die_ref die)
 {
   dw_die_ref c;
-  dw_attr_ref a;
+  dw_attr_node *a;
   dw_loc_list_ref *curr, *start, loc;
   unsigned ix;
 
@@ -25063,7 +25049,7 @@ static void
 optimize_location_lists_1 (dw_die_ref die, loc_list_hash_type *htab)
 {
   dw_die_ref c;
-  dw_attr_ref a;
+  dw_attr_node *a;
   unsigned ix;
   dw_loc_list_struct **slot;
 
@@ -25092,7 +25078,7 @@ static void
 index_location_lists (dw_die_ref die)
 {
   dw_die_ref c;
-  dw_attr_ref a;
+  dw_attr_node *a;
   unsigned ix;
 
   FOR_EACH_VEC_SAFE_ELT (die->die_attr, ix, a)
@@ -25142,7 +25128,7 @@ dwarf2out_finish (const char *filename)
   /* PCH might result in DW_AT_producer string being restored from the
      header compilation, so always fill it with empty string initially
      and overwrite only here.  */
-  dw_attr_ref producer = get_AT (comp_unit_die (), DW_AT_producer);
+  dw_attr_node *producer = get_AT (comp_unit_die (), DW_AT_producer);
   producer_string = gen_producer_string ();
   producer->dw_attr_val.v.val_str->refcount--;
   producer->dw_attr_val.v.val_str = find_AT_string (producer_string);
-- 
2.4.0

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 08/10] dwarf2cfi.c: remove typedef that hides pointerness
  2015-09-03  5:26 [PATCH 00/10] removal of typedefs that hide pointerness episode 1 tbsaunde+gcc
                   ` (8 preceding siblings ...)
  2015-09-03  5:31 ` [PATCH 09/10] dwarf2out.c: remove typedefs that hide pointerness tbsaunde+gcc
@ 2015-09-03  5:47 ` tbsaunde+gcc
  2015-09-03  9:51 ` [PATCH 00/10] removal of typedefs that hide pointerness episode 1 Richard Biener
  2015-09-04 20:24 ` Jeff Law
  11 siblings, 0 replies; 16+ messages in thread
From: tbsaunde+gcc @ 2015-09-03  5:47 UTC (permalink / raw)
  To: gcc-patches

From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org>

gcc/ChangeLog:

2015-09-03  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* dwarf2cfi.c (dw_trace_info_ref): Remove typedef.
---
 gcc/dwarf2cfi.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/gcc/dwarf2cfi.c b/gcc/dwarf2cfi.c
index ab18062..1cfa6a7 100644
--- a/gcc/dwarf2cfi.c
+++ b/gcc/dwarf2cfi.c
@@ -160,9 +160,6 @@ struct dw_trace_info
 };
 
 
-typedef dw_trace_info *dw_trace_info_ref;
-
-
 /* Hashtable helpers.  */
 
 struct trace_info_hasher : nofree_ptr_hash <dw_trace_info>
@@ -186,7 +183,7 @@ trace_info_hasher::equal (const dw_trace_info *a, const dw_trace_info *b)
 
 /* The variables making up the pseudo-cfg, as described above.  */
 static vec<dw_trace_info> trace_info;
-static vec<dw_trace_info_ref> trace_work_list;
+static vec<dw_trace_info *> trace_work_list;
 static hash_table<trace_info_hasher> *trace_index;
 
 /* A vector of call frame insns for the CIE.  */
-- 
2.4.0

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 00/10] removal of typedefs that hide pointerness episode 1
  2015-09-03  5:26 [PATCH 00/10] removal of typedefs that hide pointerness episode 1 tbsaunde+gcc
                   ` (9 preceding siblings ...)
  2015-09-03  5:47 ` [PATCH 08/10] dwarf2cfi.c: remove typedef that hides pointerness tbsaunde+gcc
@ 2015-09-03  9:51 ` Richard Biener
  2015-09-10 15:30   ` David Malcolm
  2015-09-04 20:24 ` Jeff Law
  11 siblings, 1 reply; 16+ messages in thread
From: Richard Biener @ 2015-09-03  9:51 UTC (permalink / raw)
  To: tbsaunde+gcc, David Malcolm; +Cc: GCC Patches

On Thu, Sep 3, 2015 at 7:26 AM,  <tbsaunde+gcc@tbsaunde.org> wrote:
> From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
>
> Hi,
>
> Personally I think hiding that variables are pointers is confusing, and I
> believe consensus is we should move away from this style.  So this series
> starts to do that.

Btw, what happened to the promised gimple -> gimple * conversion?

> patches individually bootstrapped + regtested on x86_64-linux-gnu, ok?

Leaving some time for others to start bikeshedding.

Richard.

> Trev
>
> Trevor Saunders (10):
>   don't typedef alias_set_entry and unhide pointerness
>   dse.c: remove some typedefs that hide pointerness
>   var-tracking.c: remove typedef of location_chain
>   var-tracking.c: remove typedef of shared_hash
>   bt-load.c: remove typedefs that hide pointerness
>   tree-ssa-ter.c: remove typedefs that hide pointerness
>   tree-vrp.c: remove typedefs that hide pointerness
>   dwarf2cfi.c: remove typedef that hides pointerness
>   dwarf2out.c: remove typedefs that hide pointerness
>   tree-ssa-loop-im.c: remove typedefs that hide pointerness
>
>  gcc/alias.c            |  31 +++--
>  gcc/bt-load.c          | 140 ++++++++++----------
>  gcc/dse.c              | 115 ++++++++---------
>  gcc/dwarf2cfi.c        |   5 +-
>  gcc/dwarf2out.c        | 340 ++++++++++++++++++++++++-------------------------
>  gcc/tree-ssa-loop-im.c |  98 +++++++-------
>  gcc/tree-ssa-ter.c     |  39 +++---
>  gcc/tree-vrp.c         |  22 ++--
>  gcc/var-tracking.c     | 192 ++++++++++++++--------------
>  9 files changed, 479 insertions(+), 503 deletions(-)
>
> --
> 2.4.0
>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 00/10] removal of typedefs that hide pointerness episode 1
  2015-09-03  5:26 [PATCH 00/10] removal of typedefs that hide pointerness episode 1 tbsaunde+gcc
                   ` (10 preceding siblings ...)
  2015-09-03  9:51 ` [PATCH 00/10] removal of typedefs that hide pointerness episode 1 Richard Biener
@ 2015-09-04 20:24 ` Jeff Law
  11 siblings, 0 replies; 16+ messages in thread
From: Jeff Law @ 2015-09-04 20:24 UTC (permalink / raw)
  To: tbsaunde+gcc, gcc-patches

On 09/02/2015 11:26 PM, tbsaunde+gcc@tbsaunde.org wrote:
> From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
>
> Hi,
>
> Personally I think hiding that variables are pointers is confusing, and I
> believe consensus is we should move away from this style.  So this series
> starts to do that.
>
> patches individually bootstrapped + regtested on x86_64-linux-gnu, ok?
That's the consensus as I remember it.  Removing it for gimple will a 
huge mega-patch ;-)

jeff

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 01/10] don't typedef alias_set_entry and unhide pointerness
  2015-09-03  5:27 ` [PATCH 01/10] don't typedef alias_set_entry and unhide pointerness tbsaunde+gcc
@ 2015-09-04 20:28   ` Jeff Law
  0 siblings, 0 replies; 16+ messages in thread
From: Jeff Law @ 2015-09-04 20:28 UTC (permalink / raw)
  To: tbsaunde+gcc, gcc-patches

On 09/02/2015 11:26 PM, tbsaunde+gcc@tbsaunde.org wrote:
> From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
>
> gcc/ChangeLog:
>
> 2015-09-02  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
>
> 	* alias.c (alias_set_entry_d): Rename to alias_set_entry.
> 	(alias_set_entry): Remove typedef.
> 	(alias_set_subset_of): Adjust.
> 	(alias_sets_conflict_p): Likewise.
> 	(init_alias_set_entry): Likewise.
> 	(get_alias_set): Likewise.
> 	(new_alias_set): Likewise.
> 	(record_alias_subset): Likewise.
OK.
jeff

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 02/10] dse.c: remove some typedefs that hide pointerness
  2015-09-03  5:27 ` [PATCH 02/10] dse.c: remove some " tbsaunde+gcc
@ 2015-09-04 20:30   ` Jeff Law
  0 siblings, 0 replies; 16+ messages in thread
From: Jeff Law @ 2015-09-04 20:30 UTC (permalink / raw)
  To: tbsaunde+gcc, gcc-patches

On 09/02/2015 11:26 PM, tbsaunde+gcc@tbsaunde.org wrote:
> From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
>
> gcc/ChangeLog:
>
> 2015-09-02  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
>
> 	* dse.c (store_info_t): Remove typedef.
> 	(group_info_t): Likewise.
> 	(const_group_info_t): Likewise.
> 	(deferred_change_t): Likewise.
> 	(get_group_info): Adjust.
> 	(free_store_info): Likewise.
> 	(canon_address): Likewise.
> 	(clear_rhs_from_active_local_stores): Likewise.
> 	(record_store): Likewise.
> 	(replace_read): Likewise.
> 	(check_mem_read_rtx): Likewise.
> 	(scan_insn): Likewise.
> 	(remove_useless_values): Likewise.
> 	(dse_step1): Likewise.
> 	(dse_step2_init): Likewise.
> 	(dse_step2_nospill): Likewise.
> 	(scan_stores_nospill): Likewise.
> 	(scan_reads_nospill): Likewise.
> 	(dse_step3_exit_block_scan): Likewise.
> 	(dse_step3): Likewise.
> 	(dse_step5_nospill): Likewise.
> 	(dse_step6): Likewise.
Given its highly mechanical nature, I'm going to approve the rest of 
this 10 part series.  Future changes of this nature can be considered 
pre-approved as well.

jeff

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 00/10] removal of typedefs that hide pointerness episode 1
  2015-09-03  9:51 ` [PATCH 00/10] removal of typedefs that hide pointerness episode 1 Richard Biener
@ 2015-09-10 15:30   ` David Malcolm
  0 siblings, 0 replies; 16+ messages in thread
From: David Malcolm @ 2015-09-10 15:30 UTC (permalink / raw)
  To: Richard Biener; +Cc: tbsaunde+gcc, GCC Patches

On Thu, 2015-09-03 at 11:48 +0200, Richard Biener wrote:
> On Thu, Sep 3, 2015 at 7:26 AM,  <tbsaunde+gcc@tbsaunde.org> wrote:
> > From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
> >
> > Hi,
> >
> > Personally I think hiding that variables are pointers is confusing, and I
> > believe consensus is we should move away from this style.  So this series
> > starts to do that.
> 
> Btw, what happened to the promised gimple -> gimple * conversion?

My recollection is that we hoped to do that after GCC 5 stage 1 closed
(to avoid breaking people's development branchs), and I think I got
distracted by other things (probably the jit).  

Sorry.

I'm working on a big revamp of diagnostics (underlined ranges, fixit
hints, etc) that I hope to get in for GCC 6 stage 1 and am trying to
focus on that right now.

If you think it's still worth doing the gimple -> gimple * conversion
(presumably for immediately after close of stage 1), I can try out my
scripts then.

[snip discussion of Trevor's patches]

Dave

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2015-09-10 15:16 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-03  5:26 [PATCH 00/10] removal of typedefs that hide pointerness episode 1 tbsaunde+gcc
2015-09-03  5:26 ` [PATCH 06/10] tree-ssa-ter.c: remove typedefs that hide pointerness tbsaunde+gcc
2015-09-03  5:27 ` [PATCH 02/10] dse.c: remove some " tbsaunde+gcc
2015-09-04 20:30   ` Jeff Law
2015-09-03  5:27 ` [PATCH 05/10] bt-load.c: remove " tbsaunde+gcc
2015-09-03  5:27 ` [PATCH 07/10] tree-vrp.c: " tbsaunde+gcc
2015-09-03  5:27 ` [PATCH 01/10] don't typedef alias_set_entry and unhide pointerness tbsaunde+gcc
2015-09-04 20:28   ` Jeff Law
2015-09-03  5:27 ` [PATCH 10/10] tree-ssa-loop-im.c: remove typedefs that hide pointerness tbsaunde+gcc
2015-09-03  5:27 ` [PATCH 03/10] var-tracking.c: remove typedef of location_chain tbsaunde+gcc
2015-09-03  5:27 ` [PATCH 04/10] var-tracking.c: remove typedef of shared_hash tbsaunde+gcc
2015-09-03  5:31 ` [PATCH 09/10] dwarf2out.c: remove typedefs that hide pointerness tbsaunde+gcc
2015-09-03  5:47 ` [PATCH 08/10] dwarf2cfi.c: remove typedef that hides pointerness tbsaunde+gcc
2015-09-03  9:51 ` [PATCH 00/10] removal of typedefs that hide pointerness episode 1 Richard Biener
2015-09-10 15:30   ` David Malcolm
2015-09-04 20:24 ` Jeff Law

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).