aboutsummaryrefslogtreecommitdiff
path: root/gcc/tsan.c
diff options
context:
space:
mode:
authorTrevor Saunders <tbsaunde@tbsaunde.org>2015-09-20 00:52:59 +0000
committerTrevor Saunders <tbsaunde@gcc.gnu.org>2015-09-20 00:52:59 +0000
commit355fe0884b8097c32e859f0df57c83bde0c6bd26 (patch)
treeaadb7908b4b80ecaf7e744ca1ae42a59a12b07ea /gcc/tsan.c
parente4f2a3e4588bbc3691b452d8a2c520e8196b0ef3 (diff)
downloadgcc-355fe0884b8097c32e859f0df57c83bde0c6bd26.zip
gcc-355fe0884b8097c32e859f0df57c83bde0c6bd26.tar.gz
gcc-355fe0884b8097c32e859f0df57c83bde0c6bd26.tar.bz2
switch from gimple to gimple*
This renames the gimple_statement_base struct to gimple removes the typedef of gimple_statement_base * to gimple, and then adjusts all of the places that use the type. gcc/ChangeLog: 2015-09-19 Trevor Saunders <tbsaunde@tbsaunde.org> * coretypes.h (gimple): Change typedef to be a forward declaration. * gimple.h (gimple_statement_base): rename to gimple. * (all functions and types using gimple): Adjust. * *.[ch]: Likewise. gcc/cp/ChangeLog: 2015-09-19 Trevor Saunders <tbsaunde@tbsaunde.org> * cp-gimplify.c (gimplify_must_not_throw_expr): Adjust. From-SVN: r227941
Diffstat (limited to 'gcc/tsan.c')
-rw-r--r--gcc/tsan.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/gcc/tsan.c b/gcc/tsan.c
index 56fb7b2..f35ef27 100644
--- a/gcc/tsan.c
+++ b/gcc/tsan.c
@@ -91,7 +91,7 @@ get_memory_access_decl (bool is_write, unsigned size)
/* Check as to whether EXPR refers to a store to vptr. */
static tree
-is_vptr_store (gimple stmt, tree expr, bool is_write)
+is_vptr_store (gimple *stmt, tree expr, bool is_write)
{
if (is_write == true
&& gimple_assign_single_p (stmt)
@@ -114,7 +114,7 @@ instrument_expr (gimple_stmt_iterator gsi, tree expr, bool is_write)
tree base, rhs, expr_ptr, builtin_decl;
basic_block bb;
HOST_WIDE_INT size;
- gimple stmt, g;
+ gimple *stmt, *g;
gimple_seq seq;
location_t loc;
unsigned int align;
@@ -489,7 +489,7 @@ static const struct tsan_map_atomic
static void
instrument_builtin_call (gimple_stmt_iterator *gsi)
{
- gimple stmt = gsi_stmt (*gsi), g;
+ gimple *stmt = gsi_stmt (*gsi), *g;
tree callee = gimple_call_fndecl (stmt), last_arg, args[6], t, lhs;
enum built_in_function fcode = DECL_FUNCTION_CODE (callee);
unsigned int i, num = gimple_call_num_args (stmt), j;
@@ -645,7 +645,7 @@ instrument_builtin_call (gimple_stmt_iterator *gsi)
static bool
instrument_gimple (gimple_stmt_iterator *gsi)
{
- gimple stmt;
+ gimple *stmt;
tree rhs, lhs;
bool instrumented = false;
@@ -682,10 +682,10 @@ instrument_gimple (gimple_stmt_iterator *gsi)
/* Replace TSAN_FUNC_EXIT internal call with function exit tsan builtin. */
static void
-replace_func_exit (gimple stmt)
+replace_func_exit (gimple *stmt)
{
tree builtin_decl = builtin_decl_implicit (BUILT_IN_TSAN_FUNC_EXIT);
- gimple g = gimple_build_call (builtin_decl, 0);
+ gimple *g = gimple_build_call (builtin_decl, 0);
gimple_set_location (g, cfun->function_end_locus);
gimple_stmt_iterator gsi = gsi_for_stmt (stmt);
gsi_replace (&gsi, g, true);
@@ -699,7 +699,7 @@ instrument_func_exit (void)
location_t loc;
basic_block exit_bb;
gimple_stmt_iterator gsi;
- gimple stmt, g;
+ gimple *stmt, *g;
tree builtin_decl;
edge e;
edge_iterator ei;
@@ -730,12 +730,12 @@ instrument_memory_accesses (void)
gimple_stmt_iterator gsi;
bool fentry_exit_instrument = false;
bool func_exit_seen = false;
- auto_vec<gimple> tsan_func_exits;
+ auto_vec<gimple *> tsan_func_exits;
FOR_EACH_BB_FN (bb, cfun)
for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
{
- gimple stmt = gsi_stmt (gsi);
+ gimple *stmt = gsi_stmt (gsi);
if (is_gimple_call (stmt)
&& gimple_call_internal_p (stmt)
&& gimple_call_internal_fn (stmt) == IFN_TSAN_FUNC_EXIT)
@@ -750,7 +750,7 @@ instrument_memory_accesses (void)
fentry_exit_instrument |= instrument_gimple (&gsi);
}
unsigned int i;
- gimple stmt;
+ gimple *stmt;
FOR_EACH_VEC_ELT (tsan_func_exits, i, stmt)
if (fentry_exit_instrument)
replace_func_exit (stmt);
@@ -770,7 +770,7 @@ static void
instrument_func_entry (void)
{
tree ret_addr, builtin_decl;
- gimple g;
+ gimple *g;
gimple_seq seq = NULL;
builtin_decl = builtin_decl_implicit (BUILT_IN_RETURN_ADDRESS);