+2015-09-13 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.
+
2015-09-13 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
* bt-load.c (struct btr_def_group): Rename from btr_def_group_s.
/* 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. */
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)
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);
vector. */
static bitmap
-free_temp_expr_table (temp_expr_table_p t)
+free_temp_expr_table (temp_expr_table *t)
{
bitmap ret = NULL;
/* 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;
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);
/* 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])
{
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);
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;
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;
/* 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;
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;
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));
}
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);
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;
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);
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;