diff options
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/omp-low.c | 26 |
2 files changed, 29 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a34883e..7ce5fdc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2016-02-26 Martin Jambor <mjambor@suse.cz> + + * omp-low.c (grid_find_ungridifiable_statement): Store problematic + statements to wi->info. Also disallow omp simd constructs. + (grid_target_follows_gridifiable_pattern): Use wi.info to dump reason + for not gridifying. Dump special string for omp_for. + 2016-02-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com> PR target/69245 diff --git a/gcc/omp-low.c b/gcc/omp-low.c index fcbb3e0..989d03e 100644 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@ -17241,7 +17241,7 @@ grid_find_single_omp_among_assignments (gimple_seq seq, location_t target_loc, static tree grid_find_ungridifiable_statement (gimple_stmt_iterator *gsi, bool *handled_ops_p, - struct walk_stmt_info *) + struct walk_stmt_info *wi) { *handled_ops_p = false; gimple *stmt = gsi_stmt (*gsi); @@ -17251,6 +17251,7 @@ grid_find_ungridifiable_statement (gimple_stmt_iterator *gsi, if (gimple_call_noreturn_p (as_a <gcall *> (stmt))) { *handled_ops_p = true; + wi->info = stmt; return error_mark_node; } break; @@ -17266,8 +17267,19 @@ grid_find_ungridifiable_statement (gimple_stmt_iterator *gsi, case GIMPLE_OMP_TARGET: case GIMPLE_OMP_ORDERED: *handled_ops_p = true; + wi->info = stmt; return error_mark_node; + case GIMPLE_OMP_FOR: + if ((gimple_omp_for_kind (stmt) & GF_OMP_FOR_SIMD) + && gimple_omp_for_combined_into_p (stmt)) + { + *handled_ops_p = true; + wi->info = stmt; + return error_mark_node; + } + break; + default: break; } @@ -17509,10 +17521,11 @@ grid_target_follows_gridifiable_pattern (gomp_target *target, tree *group_size_p struct walk_stmt_info wi; memset (&wi, 0, sizeof (wi)); - if (gimple *bad = walk_gimple_seq (gimple_omp_body (gfor), - grid_find_ungridifiable_statement, - NULL, &wi)) + if (walk_gimple_seq (gimple_omp_body (gfor), + grid_find_ungridifiable_statement, + NULL, &wi)) { + gimple *bad = (gimple *) wi.info; if (dump_enabled_p ()) { if (is_gimple_call (bad)) @@ -17520,6 +17533,11 @@ grid_target_follows_gridifiable_pattern (gomp_target *target, tree *group_size_p "Will not turn target construct into a gridified " " GPGPU kernel because the inner loop contains " "call to a noreturn function\n"); + if (gimple_code (bad) == GIMPLE_OMP_FOR) + dump_printf_loc (MSG_NOTE, tloc, + "Will not turn target construct into a gridified " + " GPGPU kernel because the inner loop contains " + "a simd construct\n"); else dump_printf_loc (MSG_NOTE, tloc, "Will not turn target construct into a gridified " |