This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [OpenACC 2/11] PTX backend changes


On 10/22/15 10:04, Bernd Schmidt wrote:

+  if (par->mask & GOMP_DIM_MASK (GOMP_DIM_MAX))
+    { /* No propagation needed for a call.  */ }
+  else if (par->mask & GOMP_DIM_MASK (GOMP_DIM_WORKER))

Ok that looks weird with the open brace on the line before the else. I think the
standard practice is to just use "/* .. */;", but possibly just invert the if
condition and move the else branches into it.

I find it more obviously an empty if -- that ';' can get lost with the comment (I have vague memories of a compiler warning too, I'll give it a try. Inverting the condition makes the sequence confusing, IMHO.


+      else
+    { /* Parent will skip this parallel itself.  */ }

Here too - actually no need to have an empty else at all.

I wanted somewhere clear for the comment to go. (Actually, I think this is the one the compiler warns about -- empty dangling else).

+  "%.\\tmov.b64\\t{%0,%1}, %2;")
 > +  "%.\\tmov.b64\\t%0, {%1,%2};")

Might want to add a space after the comma. I can see arguments for and against,
so do what you like.

Yeah, same thoughts ran through my head ...

nathan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]