summaryrefslogtreecommitdiff
path: root/gcc/omp-low.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/omp-low.c')
-rw-r--r--gcc/omp-low.c36
1 files changed, 17 insertions, 19 deletions
diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index cadec81ef84..0e96b881d77 100644
--- a/gcc/omp-low.c
+++ b/gcc/omp-low.c
@@ -8326,13 +8326,6 @@ execute_expand_omp (void)
/* OMP expansion -- the default pass, run before creation of SSA form. */
-static bool
-gate_expand_omp (void)
-{
- return ((flag_openmp != 0 || flag_openmp_simd != 0
- || flag_cilkplus != 0) && !seen_error ());
-}
-
namespace {
const pass_data pass_data_expand_omp =
@@ -8357,7 +8350,12 @@ public:
{}
/* opt_pass methods: */
- bool gate () { return gate_expand_omp (); }
+ virtual bool gate (function *)
+ {
+ return ((flag_openmp != 0 || flag_openmp_simd != 0
+ || flag_cilkplus != 0) && !seen_error ());
+ }
+
unsigned int execute () { return execute_expand_omp (); }
}; // class pass_expand_omp
@@ -10617,12 +10615,6 @@ diagnose_omp_structured_block_errors (void)
return 0;
}
-static bool
-gate_diagnose_omp_blocks (void)
-{
- return flag_openmp || flag_cilkplus;
-}
-
namespace {
const pass_data pass_data_diagnose_omp_blocks =
@@ -10647,7 +10639,7 @@ public:
{}
/* opt_pass methods: */
- bool gate () { return gate_diagnose_omp_blocks (); }
+ virtual bool gate (function *) { return flag_openmp || flag_cilkplus; }
unsigned int execute () {
return diagnose_omp_structured_block_errors ();
}
@@ -11811,13 +11803,19 @@ public:
{}
/* opt_pass methods: */
- bool gate () { return ((flag_openmp || flag_openmp_simd
- || flag_cilkplus || (in_lto_p && !flag_wpa))
- && (targetm.simd_clone.compute_vecsize_and_simdlen
- != NULL)); }
+ virtual bool gate (function *);
unsigned int execute () { return ipa_omp_simd_clone (); }
};
+bool
+pass_omp_simd_clone::gate (function *)
+{
+ return ((flag_openmp || flag_openmp_simd
+ || flag_cilkplus
+ || (in_lto_p && !flag_wpa))
+ && (targetm.simd_clone.compute_vecsize_and_simdlen != NULL));
+}
+
} // anon namespace
simple_ipa_opt_pass *