passes.c (pass_manager::execute_early_local_passes): Guard execution of pass_chkp_ins...
authorRichard Biener <rguenther@suse.de>
Wed, 25 Mar 2015 12:07:10 +0000 (12:07 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 25 Mar 2015 12:07:10 +0000 (12:07 +0000)
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.

From-SVN: r221660

gcc/ChangeLog
gcc/passes.c

index 66e0b2c7cfbec89679ab55d0a38168d1b87dcae6..b4c8aff8cb2b6334d0582f2aa03eac6cc84bb6c1 100644 (file)
@@ -1,3 +1,10 @@
+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.
+
 2015-03-25  Martin Liska  <mliska@suse.cz>
 
        PR tree-optimization/65538
index 23a90d9e2ebf680574ccecf8c631bda6fd236fef..062ae4f0d1b40c0dddfafefc1e79e85d7926c706 100644 (file)
@@ -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