Commit 11478306 by Jan Hubicka Committed by Jan Hubicka

tree-ssa-ccp.c (prop_value_d): Rename to ...


	* tree-ssa-ccp.c (prop_value_d): Rename to ...
	(ccp_prop_value_t): ... this one to avoid ODR violation; update uses.
	* ipa-prop.c (struct type_change_info): Rename to ...
	(prop_type_change_info): ... this; update uses.
	* ggc-page.c (globals): Rename to ...
	(static struct ggc_globals): ... this; update uses.
	* tree-ssa-loop-im.c (mem_ref): Rename to ...
	(im_mem_ref): ... this; update uses.
	* ggc-common.c (loc_descriptor): Rename to ...
	(ggc_loc_descriptor): ... this; update uses.
	* lra-eliminations.c (elim_table): Rename to ...
	(lra_elim_table): ... this; update uses.
	* bitmap.c (output_info): Rename to ...
	(bitmap_output_info): ... this; update uses.
	* gcse.c (expr): Rename to ...
	(gcse_expr) ... this; update uses.
	(occr): Rename to ...
	(gcse_occr): .. this; update uses.
	* tree-ssa-copy.c (prop_value_d): Rename to ...
	(prop_value_t): ... this.
	* predict.c (block_info_def): Rename to ...
	(block_info): ... this; update uses.
	(edge_info_def): Rename to ...
	(edge_info): ... this; update uses.
	* profile.c (bb_info): Rename to ...
	(bb_profile_info): ... this; update uses.
	* alloc-pool.c (output_info): Rename to ...
	(pool_output_info): ... this; update uses.
	* ipa-cp.c (topo_info): Rename to ..
	(ipa_topo_info): ... this; update uses.
	* tree-nrv.c (nrv_data): Rename to ...
	(nrv_data_t): ... this; update uses.
	* ipa-split.c (bb_info): Rename to ...
	(split_bb_info): ... this one.
	* profile.h (edge_info): Rename to ...
	(edge_profile_info): ... this one; update uses.
	* dse.c (bb_info): Rename to ...
	(dse_bb_info): ... this one; update uses.
	* cprop.c (occr): Rename to ...
	(cprop_occr): ... this one; update uses.
	(expr): Rename to ...
	(cprop_expr): ... this one; update uses.

From-SVN: r215480
parent 6863c41a
2014-09-22 Jan Hubicka <hubicka@ucw.cz>
* tree-ssa-ccp.c (prop_value_d): Rename to ...
(ccp_prop_value_t): ... this one to avoid ODR violation; update uses.
* ipa-prop.c (struct type_change_info): Rename to ...
(prop_type_change_info): ... this; update uses.
* ggc-page.c (globals): Rename to ...
(static struct ggc_globals): ... this; update uses.
* tree-ssa-loop-im.c (mem_ref): Rename to ...
(im_mem_ref): ... this; update uses.
* ggc-common.c (loc_descriptor): Rename to ...
(ggc_loc_descriptor): ... this; update uses.
* lra-eliminations.c (elim_table): Rename to ...
(lra_elim_table): ... this; update uses.
* bitmap.c (output_info): Rename to ...
(bitmap_output_info): ... this; update uses.
* gcse.c (expr): Rename to ...
(gcse_expr) ... this; update uses.
(occr): Rename to ...
(gcse_occr): .. this; update uses.
* tree-ssa-copy.c (prop_value_d): Rename to ...
(prop_value_t): ... this.
* predict.c (block_info_def): Rename to ...
(block_info): ... this; update uses.
(edge_info_def): Rename to ...
(edge_info): ... this; update uses.
* profile.c (bb_info): Rename to ...
(bb_profile_info): ... this; update uses.
* alloc-pool.c (output_info): Rename to ...
(pool_output_info): ... this; update uses.
* ipa-cp.c (topo_info): Rename to ..
(ipa_topo_info): ... this; update uses.
* tree-nrv.c (nrv_data): Rename to ...
(nrv_data_t): ... this; update uses.
* ipa-split.c (bb_info): Rename to ...
(split_bb_info): ... this one.
* profile.h (edge_info): Rename to ...
(edge_profile_info): ... this one; update uses.
* dse.c (bb_info): Rename to ...
(dse_bb_info): ... this one; update uses.
* cprop.c (occr): Rename to ...
(cprop_occr): ... this one; update uses.
(expr): Rename to ...
(cprop_expr): ... this one; update uses.
2014-09-22 Jason Merrill <jason@redhat.com>
* Makefile.in (check-parallel-%): Add @.
......@@ -339,7 +339,7 @@ pool_free (alloc_pool pool, void *ptr)
/* Output per-alloc_pool statistics. */
/* Used to accumulate statistics about alloc_pool sizes. */
struct output_info
struct pool_output_info
{
unsigned long total_created;
unsigned long total_allocated;
......@@ -350,7 +350,7 @@ struct output_info
bool
print_alloc_pool_statistics (const char *const &name,
const alloc_pool_descriptor &d,
struct output_info *i)
struct pool_output_info *i)
{
if (d.allocated)
{
......@@ -369,7 +369,7 @@ print_alloc_pool_statistics (const char *const &name,
void
dump_alloc_pool_statistics (void)
{
struct output_info info;
struct pool_output_info info;
if (! GATHER_STATISTICS)
return;
......@@ -381,7 +381,7 @@ dump_alloc_pool_statistics (void)
fprintf (stderr, "--------------------------------------------------------------------------------------------------------------\n");
info.total_created = 0;
info.total_allocated = 0;
alloc_pool_hash->traverse <struct output_info *,
alloc_pool_hash->traverse <struct pool_output_info *,
print_alloc_pool_statistics> (&info);
fprintf (stderr, "--------------------------------------------------------------------------------------------------------------\n");
fprintf (stderr, "%-22s %7lu %10lu\n",
......
......@@ -2143,7 +2143,7 @@ bitmap_print (FILE *file, const_bitmap head, const char *prefix,
/* Used to accumulate statistics about bitmap sizes. */
struct output_info
struct bitmap_output_info
{
uint64_t size;
uint64_t count;
......@@ -2152,7 +2152,7 @@ struct output_info
/* Called via hash_table::traverse. Output bitmap descriptor pointed out by
SLOT and update statistics. */
int
print_statistics (bitmap_descriptor_d **slot, output_info *i)
print_statistics (bitmap_descriptor_d **slot, bitmap_output_info *i)
{
bitmap_descriptor d = *slot;
char s[4096];
......@@ -2181,7 +2181,7 @@ print_statistics (bitmap_descriptor_d **slot, output_info *i)
void
dump_bitmap_statistics (void)
{
struct output_info info;
struct bitmap_output_info info;
if (! GATHER_STATISTICS)
return;
......@@ -2197,7 +2197,7 @@ dump_bitmap_statistics (void)
fprintf (stderr, "---------------------------------------------------------------------------------\n");
info.count = 0;
info.size = 0;
bitmap_desc_hash->traverse <output_info *, print_statistics> (&info);
bitmap_desc_hash->traverse <bitmap_output_info *, print_statistics> (&info);
fprintf (stderr, "---------------------------------------------------------------------------------\n");
fprintf (stderr,
"%-41s %9"PRId64" %15"PRId64"\n",
......
......@@ -55,19 +55,19 @@ static struct obstack cprop_obstack;
There is one per basic block. If a pattern appears more than once the
last appearance is used. */
struct occr
struct cprop_occr
{
/* Next occurrence of this expression. */
struct occr *next;
struct cprop_occr *next;
/* The insn that computes the expression. */
rtx_insn *insn;
};
typedef struct occr *occr_t;
typedef struct cprop_occr *occr_t;
/* Hash table entry for assignment expressions. */
struct expr
struct cprop_expr
{
/* The expression (DEST := SRC). */
rtx dest;
......@@ -76,12 +76,12 @@ struct expr
/* Index in the available expression bitmaps. */
int bitmap_index;
/* Next entry with the same hash. */
struct expr *next_same_hash;
struct cprop_expr *next_same_hash;
/* List of available occurrence in basic blocks in the function.
An "available occurrence" is one that is the last occurrence in the
basic block and whose operands are not modified by following statements
in the basic block [including this insn]. */
struct occr *avail_occr;
struct cprop_occr *avail_occr;
};
/* Hash table for copy propagation expressions.
......@@ -97,7 +97,7 @@ struct hash_table_d
{
/* The table itself.
This is an array of `set_hash_table_size' elements. */
struct expr **table;
struct cprop_expr **table;
/* Size of the hash table, in elements. */
unsigned int size;
......@@ -184,8 +184,8 @@ insert_set_in_table (rtx dest, rtx src, rtx_insn *insn,
{
bool found = false;
unsigned int hash;
struct expr *cur_expr, *last_expr = NULL;
struct occr *cur_occr;
struct cprop_expr *cur_expr, *last_expr = NULL;
struct cprop_occr *cur_occr;
hash = hash_mod (REGNO (dest), table->size);
......@@ -203,8 +203,8 @@ insert_set_in_table (rtx dest, rtx src, rtx_insn *insn,
if (! found)
{
cur_expr = GOBNEW (struct expr);
bytes_used += sizeof (struct expr);
cur_expr = GOBNEW (struct cprop_expr);
bytes_used += sizeof (struct cprop_expr);
if (table->table[hash] == NULL)
/* This is the first pattern that hashed to this index. */
table->table[hash] = cur_expr;
......@@ -237,8 +237,8 @@ insert_set_in_table (rtx dest, rtx src, rtx_insn *insn,
else
{
/* First occurrence of this expression in this basic block. */
cur_occr = GOBNEW (struct occr);
bytes_used += sizeof (struct occr);
cur_occr = GOBNEW (struct cprop_occr);
bytes_used += sizeof (struct cprop_occr);
cur_occr->insn = insn;
cur_occr->next = cur_expr->avail_occr;
cur_expr->avail_occr = cur_occr;
......@@ -335,11 +335,11 @@ dump_hash_table (FILE *file, const char *name, struct hash_table_d *table)
{
int i;
/* Flattened out table, so it's printed in proper order. */
struct expr **flat_table;
struct cprop_expr **flat_table;
unsigned int *hash_val;
struct expr *expr;
struct cprop_expr *expr;
flat_table = XCNEWVEC (struct expr *, table->n_elems);
flat_table = XCNEWVEC (struct cprop_expr *, table->n_elems);
hash_val = XNEWVEC (unsigned int, table->n_elems);
for (i = 0; i < (int) table->size; i++)
......@@ -451,8 +451,8 @@ alloc_hash_table (struct hash_table_d *table)
Making it an odd number is simplest for now.
??? Later take some measurements. */
table->size |= 1;
n = table->size * sizeof (struct expr *);
table->table = XNEWVAR (struct expr *, n);
n = table->size * sizeof (struct cprop_expr *);
table->table = XNEWVAR (struct cprop_expr *, n);
}
/* Free things allocated by alloc_hash_table. */
......@@ -471,7 +471,7 @@ compute_hash_table (struct hash_table_d *table)
{
/* Initialize count of number of entries in hash table. */
table->n_elems = 0;
memset (table->table, 0, table->size * sizeof (struct expr *));
memset (table->table, 0, table->size * sizeof (struct cprop_expr *));
compute_hash_table_work (table);
}
......@@ -481,11 +481,11 @@ compute_hash_table (struct hash_table_d *table)
/* Lookup REGNO in the set TABLE. The result is a pointer to the
table entry, or NULL if not found. */
static struct expr *
static struct cprop_expr *
lookup_set (unsigned int regno, struct hash_table_d *table)
{
unsigned int hash = hash_mod (regno, table->size);
struct expr *expr;
struct cprop_expr *expr;
expr = table->table[hash];
......@@ -497,8 +497,8 @@ lookup_set (unsigned int regno, struct hash_table_d *table)
/* Return the next entry for REGNO in list EXPR. */
static struct expr *
next_set (unsigned int regno, struct expr *expr)
static struct cprop_expr *
next_set (unsigned int regno, struct cprop_expr *expr)
{
do
expr = expr->next_same_hash;
......@@ -599,13 +599,13 @@ compute_local_properties (sbitmap *kill, sbitmap *comp,
for (i = 0; i < table->size; i++)
{
struct expr *expr;
struct cprop_expr *expr;
for (expr = table->table[i]; expr != NULL; expr = expr->next_same_hash)
{
int indx = expr->bitmap_index;
df_ref def;
struct occr *occr;
struct cprop_occr *occr;
/* For each definition of the destination pseudo-reg, the expression
is killed in the block where the definition is. */
......@@ -799,12 +799,12 @@ try_replace_reg (rtx from, rtx to, rtx_insn *insn)
/* Find a set of REGNOs that are available on entry to INSN's block. Return
NULL no such set is found. */
static struct expr *
static struct cprop_expr *
find_avail_set (int regno, rtx_insn *insn)
{
/* SET1 contains the last set found that can be returned to the caller for
use in a substitution. */
struct expr *set1 = 0;
struct cprop_expr *set1 = 0;
/* Loops are not possible here. To get a loop we would need two sets
available at the start of the block containing INSN. i.e. we would
......@@ -818,7 +818,7 @@ find_avail_set (int regno, rtx_insn *insn)
while (1)
{
rtx src;
struct expr *set = lookup_set (regno, &set_hash_table);
struct cprop_expr *set = lookup_set (regno, &set_hash_table);
/* Find a set that is available at the start of the block
which contains INSN. */
......@@ -1040,7 +1040,7 @@ retry:
rtx reg_used = reg_use_table[i];
unsigned int regno = REGNO (reg_used);
rtx src;
struct expr *set;
struct cprop_expr *set;
/* If the register has already been set in this block, there's
nothing we can do. */
......@@ -1429,15 +1429,15 @@ static int bypass_last_basic_block;
block BB. Return NULL if no such set is found. Based heavily upon
find_avail_set. */
static struct expr *
static struct cprop_expr *
find_bypass_set (int regno, int bb)
{
struct expr *result = 0;
struct cprop_expr *result = 0;
for (;;)
{
rtx src;
struct expr *set = lookup_set (regno, &set_hash_table);
struct cprop_expr *set = lookup_set (regno, &set_hash_table);
while (set)
{
......@@ -1561,7 +1561,7 @@ bypass_block (basic_block bb, rtx_insn *setcc, rtx_insn *jump)
rtx reg_used = reg_use_table[i];
unsigned int regno = REGNO (reg_used);
basic_block dest, old_dest;
struct expr *set;
struct cprop_expr *set;
rtx src, new_rtx;
set = find_bypass_set (regno, e->src->index);
......
......@@ -421,7 +421,7 @@ static alloc_pool insn_info_pool;
static insn_info_t active_local_stores;
static int active_local_stores_len;
struct bb_info
struct dse_bb_info
{
/* Pointer to the insn info for the last insn in the block. These
......@@ -479,7 +479,7 @@ struct bb_info
bitmap regs_live;
};
typedef struct bb_info *bb_info_t;
typedef struct dse_bb_info *bb_info_t;
static alloc_pool bb_info_pool;
/* Table to hold all bb_infos. */
......@@ -757,7 +757,7 @@ dse_step0 (void)
sizeof (struct insn_info), 100);
bb_info_pool
= create_alloc_pool ("bb_info_pool",
sizeof (struct bb_info), 100);
sizeof (struct dse_bb_info), 100);
rtx_group_info_pool
= create_alloc_pool ("rtx_group_info_pool",
sizeof (struct group_info), 100);
......@@ -2700,7 +2700,7 @@ dse_step1 (void)
insn_info_t ptr;
bb_info_t bb_info = (bb_info_t) pool_alloc (bb_info_pool);
memset (bb_info, 0, sizeof (struct bb_info));
memset (bb_info, 0, sizeof (struct dse_bb_info));
bitmap_set_bit (all_blocks, bb->index);
bb_info->regs_live = regs_live;
......
......@@ -904,7 +904,7 @@ init_ggc_heuristics (void)
}
/* Datastructure used to store per-call-site statistics. */
struct loc_descriptor
struct ggc_loc_descriptor
{
const char *file;
int line;
......@@ -918,42 +918,42 @@ struct loc_descriptor
/* Hash table helper. */
struct loc_desc_hasher : typed_noop_remove <loc_descriptor>
struct ggc_loc_desc_hasher : typed_noop_remove <ggc_loc_descriptor>
{
typedef loc_descriptor value_type;
typedef loc_descriptor compare_type;
typedef ggc_loc_descriptor value_type;
typedef ggc_loc_descriptor compare_type;
static inline hashval_t hash (const value_type *);
static inline bool equal (const value_type *, const compare_type *);
};
inline hashval_t
loc_desc_hasher::hash (const value_type *d)
ggc_loc_desc_hasher::hash (const value_type *d)
{
return htab_hash_pointer (d->function) | d->line;
}
inline bool
loc_desc_hasher::equal (const value_type *d, const compare_type *d2)
ggc_loc_desc_hasher::equal (const value_type *d, const compare_type *d2)
{
return (d->file == d2->file && d->line == d2->line
&& d->function == d2->function);
}
/* Hashtable used for statistics. */
static hash_table<loc_desc_hasher> *loc_hash;
static hash_table<ggc_loc_desc_hasher> *loc_hash;
struct ptr_hash_entry
struct ggc_ptr_hash_entry
{
void *ptr;
struct loc_descriptor *loc;
struct ggc_loc_descriptor *loc;
size_t size;
};
/* Helper for ptr_hash table. */
struct ptr_hash_hasher : typed_noop_remove <ptr_hash_entry>
struct ptr_hash_hasher : typed_noop_remove <ggc_ptr_hash_entry>
{
typedef ptr_hash_entry value_type;
typedef ggc_ptr_hash_entry value_type;
typedef void compare_type;
static inline hashval_t hash (const value_type *);
static inline bool equal (const value_type *, const compare_type *);
......@@ -975,22 +975,22 @@ ptr_hash_hasher::equal (const value_type *p, const compare_type *p2)
static hash_table<ptr_hash_hasher> *ptr_hash;
/* Return descriptor for given call site, create new one if needed. */
static struct loc_descriptor *
static struct ggc_loc_descriptor *
make_loc_descriptor (const char *name, int line, const char *function)
{
struct loc_descriptor loc;
struct loc_descriptor **slot;
struct ggc_loc_descriptor loc;
struct ggc_loc_descriptor **slot;
loc.file = name;
loc.line = line;
loc.function = function;
if (!loc_hash)
loc_hash = new hash_table<loc_desc_hasher> (10);
loc_hash = new hash_table<ggc_loc_desc_hasher> (10);
slot = loc_hash->find_slot (&loc, INSERT);
if (*slot)
return *slot;
*slot = XCNEW (struct loc_descriptor);
*slot = XCNEW (struct ggc_loc_descriptor);
(*slot)->file = name;
(*slot)->line = line;
(*slot)->function = function;
......@@ -1002,9 +1002,9 @@ void
ggc_record_overhead (size_t allocated, size_t overhead, void *ptr,
const char *name, int line, const char *function)
{
struct loc_descriptor *loc = make_loc_descriptor (name, line, function);
struct ptr_hash_entry *p = XNEW (struct ptr_hash_entry);
ptr_hash_entry **slot;
struct ggc_loc_descriptor *loc = make_loc_descriptor (name, line, function);
struct ggc_ptr_hash_entry *p = XNEW (struct ggc_ptr_hash_entry);
ggc_ptr_hash_entry **slot;
p->ptr = ptr;
p->loc = loc;
......@@ -1023,9 +1023,9 @@ ggc_record_overhead (size_t allocated, size_t overhead, void *ptr,
/* Helper function for prune_overhead_list. See if SLOT is still marked and
remove it from hashtable if it is not. */
int
ggc_prune_ptr (ptr_hash_entry **slot, void *b ATTRIBUTE_UNUSED)
ggc_prune_ptr (ggc_ptr_hash_entry **slot, void *b ATTRIBUTE_UNUSED)
{
struct ptr_hash_entry *p = *slot;
struct ggc_ptr_hash_entry *p = *slot;
if (!ggc_marked_p (p->ptr))
{
p->loc->collected += p->size;
......@@ -1047,15 +1047,15 @@ ggc_prune_overhead_list (void)
void
ggc_free_overhead (void *ptr)
{
ptr_hash_entry **slot
ggc_ptr_hash_entry **slot
= ptr_hash->find_slot_with_hash (ptr, htab_hash_pointer (ptr), NO_INSERT);
struct ptr_hash_entry *p;
struct ggc_ptr_hash_entry *p;
/* The pointer might be not found if a PCH read happened between allocation
and ggc_free () call. FIXME: account memory properly in the presence of
PCH. */
if (!slot)
return;
p = (struct ptr_hash_entry *) *slot;
p = (struct ggc_ptr_hash_entry *) *slot;
p->loc->freed += p->size;
ptr_hash->clear_slot (slot);
free (p);
......@@ -1065,10 +1065,10 @@ ggc_free_overhead (void *ptr)
static int
final_cmp_statistic (const void *loc1, const void *loc2)
{
const struct loc_descriptor *const l1 =
*(const struct loc_descriptor *const *) loc1;
const struct loc_descriptor *const l2 =
*(const struct loc_descriptor *const *) loc2;
const struct ggc_loc_descriptor *const l1 =
*(const struct ggc_loc_descriptor *const *) loc1;
const struct ggc_loc_descriptor *const l2 =
*(const struct ggc_loc_descriptor *const *) loc2;
long diff;
diff = ((long)(l1->allocated + l1->overhead - l1->freed) -
(l2->allocated + l2->overhead - l2->freed));
......@@ -1079,10 +1079,10 @@ final_cmp_statistic (const void *loc1, const void *loc2)
static int
cmp_statistic (const void *loc1, const void *loc2)
{
const struct loc_descriptor *const l1 =
*(const struct loc_descriptor *const *) loc1;
const struct loc_descriptor *const l2 =
*(const struct loc_descriptor *const *) loc2;
const struct ggc_loc_descriptor *const l1 =
*(const struct ggc_loc_descriptor *const *) loc1;
const struct ggc_loc_descriptor *const l2 =
*(const struct ggc_loc_descriptor *const *) loc2;
long diff;
diff = ((long)(l1->allocated + l1->overhead - l1->freed - l1->collected) -
......@@ -1095,9 +1095,9 @@ cmp_statistic (const void *loc1, const void *loc2)
}
/* Collect array of the descriptors from hashtable. */
static struct loc_descriptor **loc_array;
static struct ggc_loc_descriptor **loc_array;
int
ggc_add_statistics (loc_descriptor **slot, int *n)
ggc_add_statistics (ggc_loc_descriptor **slot, int *n)
{
loc_array[*n] = *slot;
(*n)++;
......@@ -1120,7 +1120,7 @@ dump_ggc_loc_statistics (bool final)
ggc_force_collect = true;
ggc_collect ();
loc_array = XCNEWVEC (struct loc_descriptor *,
loc_array = XCNEWVEC (struct ggc_loc_descriptor *,
loc_hash->elements_with_deleted ());
fprintf (stderr, "-------------------------------------------------------\n");
fprintf (stderr, "\n%-48s %10s %10s %10s %10s %10s\n",
......@@ -1131,7 +1131,7 @@ dump_ggc_loc_statistics (bool final)
final ? final_cmp_statistic : cmp_statistic);
for (i = 0; i < nentries; i++)
{
struct loc_descriptor *d = loc_array[i];
struct ggc_loc_descriptor *d = loc_array[i];
allocated += d->allocated;
times += d->times;
freed += d->freed;
......@@ -1140,7 +1140,7 @@ dump_ggc_loc_statistics (bool final)
}
for (i = 0; i < nentries; i++)
{
struct loc_descriptor *d = loc_array[i];
struct ggc_loc_descriptor *d = loc_array[i];
if (d->allocated)
{
const char *s1 = d->file;
......
......@@ -378,7 +378,7 @@ struct free_object
#endif
/* The rest of the global variables. */
static struct globals
static struct ggc_globals
{
/* The Nth element in this array is a page with objects of size 2^N.
If there are any pages with free objects, they will be at the
......
......@@ -573,7 +573,7 @@ ipcp_cloning_candidate_p (struct cgraph_node *node)
/* Arrays representing a topological ordering of call graph nodes and a stack
of noes used during constant propagation. */
struct topo_info
struct ipa_topo_info
{
struct cgraph_node **order;
struct cgraph_node **stack;
......@@ -583,7 +583,7 @@ struct topo_info
/* Allocate the arrays in TOPO and topologically sort the nodes into order. */
static void
build_toporder_info (struct topo_info *topo)
build_toporder_info (struct ipa_topo_info *topo)
{
topo->order = XCNEWVEC (struct cgraph_node *, symtab->cgraph_count);
topo->stack = XCNEWVEC (struct cgraph_node *, symtab->cgraph_count);
......@@ -596,7 +596,7 @@ build_toporder_info (struct topo_info *topo)
TOPO. */
static void
free_toporder_info (struct topo_info *topo)
free_toporder_info (struct ipa_topo_info *topo)
{
ipa_free_postorder_info ();
free (topo->order);
......@@ -606,7 +606,7 @@ free_toporder_info (struct topo_info *topo)
/* Add NODE to the stack in TOPO, unless it is already there. */
static inline void
push_node_to_stack (struct topo_info *topo, struct cgraph_node *node)
push_node_to_stack (struct ipa_topo_info *topo, struct cgraph_node *node)
{
struct ipa_node_params *info = IPA_NODE_REF (node);
if (info->node_enqueued)
......@@ -619,7 +619,7 @@ push_node_to_stack (struct topo_info *topo, struct cgraph_node *node)
is empty. */
static struct cgraph_node *
pop_node_from_stack (struct topo_info *topo)
pop_node_from_stack (struct ipa_topo_info *topo)
{
if (topo->stack_top)
{
......@@ -2198,7 +2198,7 @@ add_all_node_vals_to_toposort (struct cgraph_node *node)
connected components. */
static void
propagate_constants_topo (struct topo_info *topo)
propagate_constants_topo (struct ipa_topo_info *topo)
{
int i;
......@@ -2297,7 +2297,7 @@ propagate_effects (void)
interprocedurally. */
static void
ipcp_propagate_stage (struct topo_info *topo)
ipcp_propagate_stage (struct ipa_topo_info *topo)
{
struct cgraph_node *node;
......@@ -3658,7 +3658,7 @@ identify_dead_nodes (struct cgraph_node *node)
TOPO and make specialized clones if deemed beneficial. */
static void
ipcp_decision_stage (struct topo_info *topo)
ipcp_decision_stage (struct ipa_topo_info *topo)
{
int i;
......@@ -3693,7 +3693,7 @@ ipcp_driver (void)
{
struct cgraph_2edge_hook_list *edge_duplication_hook_holder;
struct cgraph_edge_hook_list *edge_removal_hook_holder;
struct topo_info topo;
struct ipa_topo_info topo;
ipa_check_create_node_params ();
ipa_check_create_edge_args ();
......
......@@ -592,7 +592,7 @@ ipa_get_bb_info (struct func_body_info *fbi, basic_block bb)
/* Structure to be passed in between detect_type_change and
check_stmt_for_type_change. */
struct type_change_info
struct prop_type_change_info
{
/* Offset into the object where there is the virtual method pointer we are
looking for. */
......@@ -680,7 +680,7 @@ stmt_may_be_vtbl_ptr_store (gimple stmt)
identified, return the type. Otherwise return NULL_TREE. */
static tree
extr_type_from_vtbl_ptr_store (gimple stmt, struct type_change_info *tci)
extr_type_from_vtbl_ptr_store (gimple stmt, struct prop_type_change_info *tci)
{
HOST_WIDE_INT offset, size, max_size;
tree lhs, rhs, base, binfo;
......@@ -726,13 +726,13 @@ extr_type_from_vtbl_ptr_store (gimple stmt, struct type_change_info *tci)
detect_type_change to check whether a particular statement may modify
the virtual table pointer, and if possible also determine the new type of
the (sub-)object. It stores its result into DATA, which points to a
type_change_info structure. */
prop_type_change_info structure. */
static bool
check_stmt_for_type_change (ao_ref *ao ATTRIBUTE_UNUSED, tree vdef, void *data)
{
gimple stmt = SSA_NAME_DEF_STMT (vdef);
struct type_change_info *tci = (struct type_change_info *) data;
struct prop_type_change_info *tci = (struct prop_type_change_info *) data;
if (stmt_may_be_vtbl_ptr_store (stmt))
{
......@@ -830,7 +830,7 @@ detect_type_change_from_memory_writes (tree arg, tree base, tree comp_type,
gimple call, struct ipa_jump_func *jfunc,
HOST_WIDE_INT offset)
{
struct type_change_info tci;
struct prop_type_change_info tci;
ao_ref ao;
bool entry_reached = false;
......
......@@ -117,9 +117,9 @@ typedef struct
{
unsigned int size;
unsigned int time;
} bb_info;
} split_bb_info;
static vec<bb_info> bb_info_vec;
static vec<split_bb_info> bb_info_vec;
/* Description of split point. */
......
......@@ -77,7 +77,7 @@ along with GCC; see the file COPYING3. If not see
/* This structure is used to record information about hard register
eliminations. */
struct elim_table
struct lra_elim_table
{
/* Hard register number to be eliminated. */
int from;
......@@ -105,7 +105,7 @@ struct elim_table
of eliminating a register in favor of another. If there is more
than one way of eliminating a particular register, the most
preferred should be specified first. */
static struct elim_table *reg_eliminate = 0;
static struct lra_elim_table *reg_eliminate = 0;
/* This is an intermediate structure to initialize the table. It has
exactly the members provided by ELIMINABLE_REGS. */
......@@ -131,7 +131,7 @@ static const struct elim_table_1
static void
print_elim_table (FILE *f)
{
struct elim_table *ep;
struct lra_elim_table *ep;
for (ep = reg_eliminate; ep < &reg_eliminate[NUM_ELIMINABLE_REGS]; ep++)
fprintf (f, "%s eliminate %d to %d (offset=" HOST_WIDE_INT_PRINT_DEC
......@@ -151,7 +151,7 @@ lra_debug_elim_table (void)
VALUE. Setup FRAME_POINTER_NEEDED if elimination from frame
pointer to stack pointer is not possible anymore. */
static void
setup_can_eliminate (struct elim_table *ep, bool value)
setup_can_eliminate (struct lra_elim_table *ep, bool value)
{
ep->can_eliminate = ep->prev_can_eliminate = value;
if (! value
......@@ -163,12 +163,12 @@ setup_can_eliminate (struct elim_table *ep, bool value)
or NULL if none. The elimination table may contain more than
one elimination for the same hard register, but this map specifies
the one that we are currently using. */
static struct elim_table *elimination_map[FIRST_PSEUDO_REGISTER];
static struct lra_elim_table *elimination_map[FIRST_PSEUDO_REGISTER];
/* When an eliminable hard register becomes not eliminable, we use the
following special structure to restore original offsets for the
register. */
static struct elim_table self_elim_table;
static struct lra_elim_table self_elim_table;
/* Offsets should be used to restore original offsets for eliminable
hard register which just became not eliminable. Zero,
......@@ -184,7 +184,7 @@ static void
setup_elimination_map (void)
{
int i;
struct elim_table *ep;
struct lra_elim_table *ep;
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
elimination_map[i] = NULL;
......@@ -249,7 +249,7 @@ form_sum (rtx x, rtx y)
int
lra_get_elimination_hard_regno (int hard_regno)
{
struct elim_table *ep;
struct lra_elim_table *ep;
if (hard_regno < 0 || hard_regno >= FIRST_PSEUDO_REGISTER)
return hard_regno;
......@@ -260,11 +260,11 @@ lra_get_elimination_hard_regno (int hard_regno)
/* Return elimination which will be used for hard reg REG, NULL
otherwise. */
static struct elim_table *
static struct lra_elim_table *
get_elimination (rtx reg)
{
int hard_regno;
struct elim_table *ep;
struct lra_elim_table *ep;
HOST_WIDE_INT offset;
lra_assert (REG_P (reg));
......@@ -306,7 +306,7 @@ lra_eliminate_regs_1 (rtx_insn *insn, rtx x, enum machine_mode mem_mode,
bool subst_p, bool update_p, bool full_p)
{
enum rtx_code code = GET_CODE (x);
struct elim_table *ep;
struct lra_elim_table *ep;
rtx new_rtx;
int i, j;
const char *fmt;
......@@ -674,7 +674,7 @@ static void
mark_not_eliminable (rtx x, enum machine_mode mem_mode)
{
enum rtx_code code = GET_CODE (x);
struct elim_table *ep;
struct lra_elim_table *ep;
int i, j;
const char *fmt;
......@@ -856,7 +856,7 @@ eliminate_regs_in_insn (rtx_insn *insn, bool replace_p, bool first_p)
int i;
rtx substed_operand[MAX_RECOG_OPERANDS];
rtx orig_operand[MAX_RECOG_OPERANDS];
struct elim_table *ep;
struct lra_elim_table *ep;
rtx plus_src, plus_cst_src;
lra_insn_recog_data_t id;
struct lra_static_insn_data *static_id;
......@@ -1130,7 +1130,7 @@ static bool
update_reg_eliminate (bitmap insns_with_changed_offsets)
{
bool prev, result;
struct elim_table *ep, *ep1;
struct lra_elim_table *ep, *ep1;
HARD_REG_SET temp_hard_reg_set;
/* Clear self elimination offsets. */
......@@ -1235,14 +1235,14 @@ update_reg_eliminate (bitmap insns_with_changed_offsets)
static void
init_elim_table (void)
{
struct elim_table *ep;
struct lra_elim_table *ep;
#ifdef ELIMINABLE_REGS
bool value_p;
const struct elim_table_1 *ep1;
#endif
if (!reg_eliminate)
reg_eliminate = XCNEWVEC (struct elim_table, NUM_ELIMINABLE_REGS);
reg_eliminate = XCNEWVEC (struct lra_elim_table, NUM_ELIMINABLE_REGS);
memset (self_elim_offsets, 0, sizeof (self_elim_offsets));
/* Initiate member values which will be never changed. */
......@@ -1291,7 +1291,7 @@ init_elimination (void)
bool stop_to_sp_elimination_p;
basic_block bb;
rtx_insn *insn;
struct elim_table *ep;
struct lra_elim_table *ep;
init_elim_table ();
FOR_EACH_BB_FN (bb, cfun)
......@@ -1325,7 +1325,7 @@ void
lra_eliminate_reg_if_possible (rtx *loc)
{
int regno;
struct elim_table *ep;
struct lra_elim_table *ep;
lra_assert (REG_P (*loc));
if ((regno = REGNO (*loc)) >= FIRST_PSEUDO_REGISTER
......@@ -1369,7 +1369,7 @@ lra_eliminate (bool final_p, bool first_p)
unsigned int uid;
bitmap_head insns_with_changed_offsets;
bitmap_iterator bi;
struct elim_table *ep;
struct lra_elim_table *ep;
gcc_assert (! final_p || ! first_p);
......
......@@ -2496,7 +2496,7 @@ predict_paths_leading_to_edge (edge e, enum br_predictor pred,
/* This is used to carry information about basic blocks. It is
attached to the AUX field of the standard CFG block. */
typedef struct block_info_def
struct block_info
{
/* Estimated frequency of execution of basic_block. */
sreal frequency;
......@@ -2506,10 +2506,10 @@ typedef struct block_info_def
/* Number of predecessors we need to visit first. */
int npredecessors;
} *block_info;
};
/* Similar information for edges. */
typedef struct edge_info_def
struct edge_prob_info
{
/* In case edge is a loopback edge, the probability edge will be reached
in case header is. Estimated number of iterations of the loop can be
......@@ -2517,10 +2517,10 @@ typedef struct edge_info_def
sreal back_edge_prob;
/* True if the edge is a loopback edge in the natural loop. */
unsigned int back_edge:1;
} *edge_info;
};
#define BLOCK_INFO(B) ((block_info) (B)->aux)
#define EDGE_INFO(E) ((edge_info) (E)->aux)
#define BLOCK_INFO(B) ((block_info *) (B)->aux)
#define EDGE_INFO(E) ((edge_prob_info *) (E)->aux)
/* Helper function for estimate_bb_frequencies.
Propagate the frequencies in blocks marked in
......@@ -2935,8 +2935,8 @@ estimate_bb_frequencies (bool force)
REG_BR_PROB_BASE;
/* Set up block info for each basic block. */
alloc_aux_for_blocks (sizeof (struct block_info_def));
alloc_aux_for_edges (sizeof (struct edge_info_def));
alloc_aux_for_blocks (sizeof (block_info));
alloc_aux_for_edges (sizeof (edge_prob_info));
FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR_FOR_FN (cfun), NULL, next_bb)
{
edge e;
......
......@@ -23,7 +23,7 @@ along with GCC; see the file COPYING3. If not see
#define PROFILE_H
/* Additional information about edges. */
struct edge_info
struct edge_profile_info
{
unsigned int count_valid:1;
......@@ -35,7 +35,7 @@ struct edge_info
unsigned int ignore:1;
};
#define EDGE_INFO(e) ((struct edge_info *) (e)->aux)
#define EDGE_INFO(e) ((struct edge_profile_info *) (e)->aux)
/* Smoothes the initial assigned basic block and edge counts using
a minimum cost flow algorithm. */
......
......@@ -55,7 +55,7 @@ along with GCC; see the file COPYING3. If not see
This is basically a generic equivalent to the C++ front-end's
Named Return Value optimization. */
struct nrv_data
struct nrv_data_t
{
/* This is the temporary (a VAR_DECL) which appears in all of
this function's RETURN_EXPR statements. */
......@@ -84,7 +84,7 @@ static tree
finalize_nrv_r (tree *tp, int *walk_subtrees, void *data)
{
struct walk_stmt_info *wi = (struct walk_stmt_info *) data;
struct nrv_data *dp = (struct nrv_data *) wi->info;
struct nrv_data_t *dp = (struct nrv_data_t *) wi->info;
/* No need to walk into types. */
if (TYPE_P (*tp))
......@@ -150,7 +150,7 @@ pass_nrv::execute (function *fun)
tree found = NULL;
basic_block bb;
gimple_stmt_iterator gsi;
struct nrv_data data;
struct nrv_data_t data;
/* If this function does not return an aggregate type in memory, then
there is nothing to do. */
......
......@@ -76,11 +76,10 @@ along with GCC; see the file COPYING3. If not see
When visiting a statement or PHI node the lattice value for an
SSA name can transition from UNDEFINED to COPY to VARYING. */
struct prop_value_d {
struct prop_value_t {
/* Copy-of value. */
tree value;
};
typedef struct prop_value_d prop_value_t;
static prop_value_t *copy_of;
static unsigned n_copy_of;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment