Make possible 'scan-tree-dump' of 'lower_omp_target' mapping kinds

Thomas Schwinge thomas@codesourcery.com
Mon May 27 19:21:00 GMT 2019


Hi!

On Mon, 27 May 2019 18:51:22 +0200, Jakub Jelinek <jakub@redhat.com> wrote:
> On Sun, May 26, 2019 at 06:46:19PM +0200, Thomas Schwinge wrote:
> > To establish some suitable testsuite coverage for a task that I'm working
> > on, I need to do 'scan-tree-dump' of 'lower_omp_target' mapping kinds.
> > Is the attached OK?
> > 
> > Any suggestions about whether/how to restrict the (effective?) targets
> > this gets run for, because no doubt there are target-specific bits at
> > least in the alignment chosen.  The attached test case passes for
> > x86_64-pc-linux-gnu with '--target_board=unix\{,-m32,-mx32\}'.  (I didn't
> > verify the mappings generated, but just documented the status quo.)
> 
> The arrays are emitted in the *.omplower dump, so I think it is much better
> to scan-tree-dump their content

That's not feasible in the general case.

> if for whatever reason adding a runtime
> testcase isn't sufficient

Why should I have an execution test for something that should really be
verified at the compiler side, at compile time?  And, for example, an
execution test cannot detect if a 'GOMP_MAP_FIRSTPRIVATE_INT' is being
used (instead of something else).

> over adding further printouts and matching that.

I had assumed that you'd noticed that a lot of compiler passes are
dumping stuff that can then be scanned for.  Are you insisting that GCC's
OMP code must be complex and unmaintainable?


Current version of that patch is attached: changed to generally print
'kind' first, and don't print non-existing 'align' for
'OMP_CLAUSE_USE_DEVICE_PTR', 'OMP_CLAUSE_IS_DEVICE_PTR'.

If approving this patch, please respond with "Reviewed-by: NAME <EMAIL>"
so that your effort will be recorded in the commit log, see
<https://gcc.gnu.org/wiki/Reviewed-by>.


Grüße
 Thomas


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Make-possible-scan-tree-dump-of-lower_omp_targ.trunk.patch
Type: text/x-diff
Size: 10292 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20190527/695db39c/attachment.bin>


More information about the Gcc-patches mailing list