Hi, a few HSA gridification testcase have been failing (as it turns out for quite many weeks, shame on me for taking so long to fix) because two dump_printf_loc producing optimization hints were not properly guarded by dump_enabled_p.
The fix is straightforward, I have tested it on an HSA-enabled APU and bootstrapped and tested with enabled HSA offloading. Since this part of omp processing is specific to HSA, I'll go forward and commit it today as the HSA maintainer. Martin 2019-01-30 Martin Jambor <mjam...@suse.cz> * omp-grid.c (grid_target_follows_gridifiable_pattern): Guard two missed optimization dump with dump_enabled_p. --- gcc/omp-grid.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/gcc/omp-grid.c b/gcc/omp-grid.c index 12029b72445..79e9405ce3f 100644 --- a/gcc/omp-grid.c +++ b/gcc/omp-grid.c @@ -745,9 +745,10 @@ grid_target_follows_gridifiable_pattern (gomp_target *target, grid_prop *grid) tree group_size = NULL; if (!teams) { - dump_printf_loc (MSG_MISSED_OPTIMIZATION, tloc, - GRID_MISSED_MSG_PREFIX "it does not have a sole teams " - "construct in it.\n"); + if (dump_enabled_p ()) + dump_printf_loc (MSG_MISSED_OPTIMIZATION, tloc, + GRID_MISSED_MSG_PREFIX "it does not have a sole " + "teams construct in it.\n"); return false; } @@ -788,9 +789,10 @@ grid_target_follows_gridifiable_pattern (gomp_target *target, grid_prop *grid) gomp_for *dist = dyn_cast <gomp_for *> (stmt); if (!dist) { - dump_printf_loc (MSG_MISSED_OPTIMIZATION, tloc, - GRID_MISSED_MSG_PREFIX "the teams construct does not " - "have a single distribute construct in it.\n"); + if (dump_enabled_p ()) + dump_printf_loc (MSG_MISSED_OPTIMIZATION, tloc, + GRID_MISSED_MSG_PREFIX "the teams construct does not " + "have a single distribute construct in it.\n"); return false; } -- 2.20.1