[omp, ftracer] Ignore IFN_GOMP_SIMT_XCHG_* in ignore_bb_p
authorTom de Vries <tdevries@suse.de>
Mon, 5 Oct 2020 12:26:04 +0000 (14:26 +0200)
committerTom de Vries <tdevries@suse.de>
Mon, 5 Oct 2020 14:03:17 +0000 (16:03 +0200)
As IFN_GOMP_SIMT_XCHG_* are part of the group marked by
IFN_GOMP_SIMT_ENTER_ALLOC/IFN_GOMP_SIMT_EXIT, handle them conservatively
in ignore_bb_p.

Build on x86_64-linux with nvptx accelerator, tested with libgomp.

gcc/ChangeLog:

2020-10-05  Tom de Vries  <tdevries@suse.de>

* tracer.c (ignore_bb_p): Ignore GOMP_SIMT_XCHG_*.

gcc/tracer.c

index 5ee66511f8d5219f0cdb5dee779210ac09fa6f5f..7f32ccb7e21358af8d051ff5edcf9a8a9a994c66 100644 (file)
@@ -115,12 +115,14 @@ ignore_bb_p (const_basic_block bb)
 
       /* An IFN_GOMP_SIMT_ENTER_ALLOC/IFN_GOMP_SIMT_EXIT call must be
         duplicated as part of its group, or not at all.
-        The IFN_GOMP_SIMT_VOTE_ANY is part of such a group, so the same holds
-        there.  */
+        The IFN_GOMP_SIMT_VOTE_ANY and IFN_GOMP_SIMT_XCHG_* are part of such a
+        group, so the same holds there.  */
       if (is_gimple_call (g)
          && (gimple_call_internal_p (g, IFN_GOMP_SIMT_ENTER_ALLOC)
              || gimple_call_internal_p (g, IFN_GOMP_SIMT_EXIT)
-             || gimple_call_internal_p (g, IFN_GOMP_SIMT_VOTE_ANY)))
+             || gimple_call_internal_p (g, IFN_GOMP_SIMT_VOTE_ANY)
+             || gimple_call_internal_p (g, IFN_GOMP_SIMT_XCHG_BFLY)
+             || gimple_call_internal_p (g, IFN_GOMP_SIMT_XCHG_IDX)))
        return true;
     }