On 02/24/2016 09:07 PM, Nathan Sidwell wrote:
this patch fixes the ICE reported in pr69916
(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69916)  The loop is
lowered at omp-lowering, but subsequently determined to be dead before
we get  to oacc-target-lower.  The loop CF is removed along with the
(pure) IFN_OACC_LOOP function calls inserted during lowering.  However
the IFN_UNIQUE loop head & tail calls remain (because they are not
pure).  Thus in  the oacc-target-lower pass we rediscover the loop
structure.

@@ -20726,10 +20742,12 @@ oacc_loop_xform_head_tail (gcall *from,
     determined partitioning mask and chunking argument.  */

  static void
-oacc_loop_xform_loop (gcall *end_marker, tree mask_arg, tree chunk_arg)
+oacc_loop_xform_loop (gcall *end_marker, unsigned ifns,
+                     tree mask_arg, tree chunk_arg)

Document the new arg.

+  gcc_checking_assert (ifns);

I prefer "ifns != 0" and "ifns == 0" for non-booleans. I don't think it's a requirement, so your call.

-      /* If we didn't see LOOP_BOUND, it should be in the single
-        successor block.  */
+      /* The LOOP_BOUND ifn, could be in the single successor
+        block.  */

Lose the comma?

Ok with these changes.


Bernd

Reply via email to