diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ff02e19..560c277 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2015-08-07 Maxim Ostapenko + + * asan.c (make_pass_asan_O0): Remove pass. + * tsan.c (make_pass_tsan_O0): Likewise. + * passes.def: Change place for ASan and TSan passes. + * tree-pass.h: Remove passes. + 2015-08-05 Richard Biener PR tree-optimization/67055 diff --git a/gcc/asan.c b/gcc/asan.c index 4f5adaa..b651ddb 100644 --- a/gcc/asan.c +++ b/gcc/asan.c @@ -2788,40 +2788,4 @@ make_pass_asan (gcc::context *ctxt) return new pass_asan (ctxt); } -namespace { - -const pass_data pass_data_asan_O0 = -{ - GIMPLE_PASS, /* type */ - "asan0", /* name */ - OPTGROUP_NONE, /* optinfo_flags */ - TV_NONE, /* tv_id */ - ( PROP_ssa | PROP_cfg | PROP_gimple_leh ), /* properties_required */ - 0, /* properties_provided */ - 0, /* properties_destroyed */ - 0, /* todo_flags_start */ - TODO_update_ssa, /* todo_flags_finish */ -}; - -class pass_asan_O0 : public gimple_opt_pass -{ -public: - pass_asan_O0 (gcc::context *ctxt) - : gimple_opt_pass (pass_data_asan_O0, ctxt) - {} - - /* opt_pass methods: */ - virtual bool gate (function *) { return !optimize && gate_asan (); } - virtual unsigned int execute (function *) { return asan_instrument (); } - -}; // class pass_asan_O0 - -} // anon namespace - -gimple_opt_pass * -make_pass_asan_O0 (gcc::context *ctxt) -{ - return new pass_asan_O0 (ctxt); -} - #include "gt-asan.h" diff --git a/gcc/passes.def b/gcc/passes.def index 6b66f8f..a0ca2e7 100644 --- a/gcc/passes.def +++ b/gcc/passes.def @@ -217,8 +217,6 @@ along with GCC; see the file COPYING3. If not see NEXT_PASS (pass_split_crit_edges); NEXT_PASS (pass_pre); NEXT_PASS (pass_sink_code); - NEXT_PASS (pass_asan); - NEXT_PASS (pass_tsan); /* Pass group that runs when 1) enabled, 2) there are loops in the function. Make sure to run pass_fix_loops before to discover/remove loops before running the gate function @@ -349,8 +347,8 @@ along with GCC; see the file COPYING3. If not see NEXT_PASS (pass_lower_vaarg); NEXT_PASS (pass_lower_vector); NEXT_PASS (pass_lower_complex_O0); - NEXT_PASS (pass_asan_O0); - NEXT_PASS (pass_tsan_O0); + NEXT_PASS (pass_asan); + NEXT_PASS (pass_tsan); NEXT_PASS (pass_sanopt); NEXT_PASS (pass_cleanup_eh); NEXT_PASS (pass_lower_resx); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index aab1f85..b5e22ec 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2015-08-07 Maxim Ostapenko + + * c-c++-common/asan/inc.c: Adjust. + 2015-08-05 Paolo Carlini PR c++/66595 diff --git a/gcc/testsuite/c-c++-common/asan/inc.c b/gcc/testsuite/c-c++-common/asan/inc.c index 5abf373..495195c 100644 --- a/gcc/testsuite/c-c++-common/asan/inc.c +++ b/gcc/testsuite/c-c++-common/asan/inc.c @@ -1,4 +1,4 @@ -/* { dg-options "-fdump-tree-asan0" } */ +/* { dg-options "-fdump-tree-asan" } */ /* { dg-do compile } */ /* { dg-skip-if "" { *-*-* } { "*" } { "-O0" } } */ @@ -16,5 +16,5 @@ main () return 0; } -/* { dg-final { scan-tree-dump-times "ASAN_" 1 "asan0" } } */ -/* { dg-final { scan-tree-dump "ASAN_CHECK \\(.*, 4\\);" "asan0" } } */ +/* { dg-final { scan-tree-dump-times "ASAN_" 1 "asan" } } */ +/* { dg-final { scan-tree-dump "ASAN_CHECK \\(.*, 4\\);" "asan" } } */ diff --git a/gcc/tree-pass.h b/gcc/tree-pass.h index 7b66a1c..ab31d26 100644 --- a/gcc/tree-pass.h +++ b/gcc/tree-pass.h @@ -340,9 +340,7 @@ extern simple_ipa_opt_pass *make_pass_ipa_chkp_produce_thunks (gcc::context *ctx extern gimple_opt_pass *make_pass_chkp (gcc::context *ctxt); extern gimple_opt_pass *make_pass_chkp_opt (gcc::context *ctxt); extern gimple_opt_pass *make_pass_asan (gcc::context *ctxt); -extern gimple_opt_pass *make_pass_asan_O0 (gcc::context *ctxt); extern gimple_opt_pass *make_pass_tsan (gcc::context *ctxt); -extern gimple_opt_pass *make_pass_tsan_O0 (gcc::context *ctxt); extern gimple_opt_pass *make_pass_lower_cf (gcc::context *ctxt); extern gimple_opt_pass *make_pass_refactor_eh (gcc::context *ctxt); extern gimple_opt_pass *make_pass_lower_eh (gcc::context *ctxt); diff --git a/gcc/tsan.c b/gcc/tsan.c index 56fb7b2..bcfadbf 100644 --- a/gcc/tsan.c +++ b/gcc/tsan.c @@ -860,44 +860,3 @@ make_pass_tsan (gcc::context *ctxt) return new pass_tsan (ctxt); } -namespace { - -const pass_data pass_data_tsan_O0 = -{ - GIMPLE_PASS, /* type */ - "tsan0", /* name */ - OPTGROUP_NONE, /* optinfo_flags */ - TV_NONE, /* tv_id */ - ( PROP_ssa | PROP_cfg ), /* properties_required */ - 0, /* properties_provided */ - 0, /* properties_destroyed */ - 0, /* todo_flags_start */ - TODO_update_ssa, /* todo_flags_finish */ -}; - -class pass_tsan_O0 : public gimple_opt_pass -{ -public: - pass_tsan_O0 (gcc::context *ctxt) - : gimple_opt_pass (pass_data_tsan_O0, ctxt) - {} - - /* opt_pass methods: */ - virtual bool gate (function *) - { - return ((flag_sanitize & SANITIZE_THREAD) != 0 && !optimize - && !lookup_attribute ("no_sanitize_thread", - DECL_ATTRIBUTES (current_function_decl))); - } - - virtual unsigned int execute (function *) { return tsan_pass (); } - -}; // class pass_tsan_O0 - -} // anon namespace - -gimple_opt_pass * -make_pass_tsan_O0 (gcc::context *ctxt) -{ - return new pass_tsan_O0 (ctxt); -}