This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Guard pass_chkp_instrumentation_passes with flag_check_pointer_bounds
- From: Richard Biener <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 25 Mar 2015 13:03:06 +0100 (CET)
- Subject: [PATCH] Guard pass_chkp_instrumentation_passes with flag_check_pointer_bounds
- Authentication-results: sourceware.org; auth=none
Avoids a fixup-cfg and cgraph edge rebuild.
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied.
Richard.
2015-03-25 Richard Biener <rguenther@suse.de>
* passes.c (pass_manager::execute_early_local_passes): Guard
execution of pass_chkp_instrumentation_passes with
flag_check_pointer_bounds.
(pass_chkp_instrumentation_passes::gate): Likewise.
Index: gcc/passes.c
===================================================================
--- gcc/passes.c (revision 221633)
+++ gcc/passes.c (working copy)
@@ -156,7 +156,8 @@ void
pass_manager::execute_early_local_passes ()
{
execute_pass_list (cfun, pass_build_ssa_passes_1->sub);
- execute_pass_list (cfun, pass_chkp_instrumentation_passes_1->sub);
+ if (flag_check_pointer_bounds)
+ execute_pass_list (cfun, pass_chkp_instrumentation_passes_1->sub);
execute_pass_list (cfun, pass_local_optimization_passes_1->sub);
}
@@ -424,7 +425,8 @@ public:
virtual bool gate (function *)
{
/* Don't bother doing anything if the program has errors. */
- return (!seen_error () && !in_lto_p);
+ return (flag_check_pointer_bounds
+ && !seen_error () && !in_lto_p);
}
}; // class pass_chkp_instrumentation_passes