2012-11-23 Jakub Jelinek <jakub@redhat.com>
+ * tsan.c: Fix up comment formatting.
+ (instrument_gimple): Ignore gimple_clobber_p stmts.
+ (pass_tsan, pass_tsan_O0): Remove TODO_update_address_taken
+ from todo_flags_finish.
+
PR sanitizer/55435
* asan.c (gate_asan): Don't instrument functions with
no_address_safety_analysis attribute.
}
/* Instruments EXPR if needed. If any instrumentation is inserted,
- * return true. */
+ return true. */
static bool
instrument_expr (gimple_stmt_iterator gsi, tree expr, bool is_write)
|| bitsize != size * BITS_PER_UNIT)
return false;
- /* TODO: handle other case: ARRAY_RANGE_REF. */
+ /* TODO: handle other case: ARRAY_RANGE_REF. */
if (tcode != ARRAY_REF
&& tcode != VAR_DECL
&& tcode != COMPONENT_REF
{
/* If the call can throw, it must be the last stmt in
a basic block, so the instrumented stmts need to be
- inserted in successor bbs. */
+ inserted in successor bbs. */
if (is_ctrl_altering_stmt (stmt))
{
edge e;
}
/* Instruments the gimple pointed to by GSI. Return
- * true if func entry/exit should be instrumented. */
+ true if func entry/exit should be instrumented. */
static bool
instrument_gimple (gimple_stmt_iterator gsi)
&& (gimple_call_fndecl (stmt)
!= builtin_decl_implicit (BUILT_IN_TSAN_INIT)))
return true;
- else if (is_gimple_assign (stmt))
+ else if (is_gimple_assign (stmt)
+ && !gimple_clobber_p (stmt))
{
if (gimple_store_p (stmt))
{
}
/* Instruments all interesting memory accesses in the current function.
- * Return true if func entry/exit should be instrumented. */
+ Return true if func entry/exit should be instrumented. */
static bool
instrument_memory_accesses (void)
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
- TODO_verify_all | TODO_update_ssa
- | TODO_update_address_taken /* todo_flags_finish */
+ TODO_verify_all | TODO_update_ssa /* todo_flags_finish */
}
};
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
- TODO_verify_all | TODO_update_ssa
- | TODO_update_address_taken /* todo_flags_finish */
+ TODO_verify_all | TODO_update_ssa /* todo_flags_finish */
}
};