On 04/20/16 12:59, Alexander Monakov wrote:
This patch implements per-warp compiler-defined stacks under -msoft-stack
option, and implements alloca on top of that.  In a few obvious places,
changes from -muniform-simt patch are present in the hunks.


It'd be better to not mix fragments of patches, and have a description of how soft stacks works.

+      /* fstmp2 = &__nvptx_stacks[tid.y];  */

?

+      /* crtl->is_leaf is not initialized because RA is not run.  */

Cryptic comment is cryptic.


+      fprintf (asm_out_file, ".extern .shared .u%d __nvptx_stacks[32];\n",

Magic constant '32'?

+  if (need_unisimt_decl)
+    {
+      write_var_marker (asm_out_file, false, true, "__nvptx_uni");
+      fprintf (asm_out_file, ".extern .shared .u32 __nvptx_uni[32];\n");
+    }

Looks like some other patch?




  /* Expander for the shuffle builtins.  */
diff --git a/gcc/config/nvptx/nvptx.h b/gcc/config/nvptx/nvptx.h
index 381269e..6da4d06 100644
--- a/gcc/config/nvptx/nvptx.h
+++ b/gcc/config/nvptx/nvptx.h

+      if (TARGET_UNIFORM_SIMT)                 \
+        builtin_define ("__nvptx_unisimt__");        \

Likewise.


+  rtx unisimt_master; /* Master lane index for "uniform simt" mode.  */
+  rtx unisimt_predicate; /* Predicate register for "uniform simt".  */

Likewise.

Needs testcases.

nathan

Reply via email to