This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [OpenACC 2/11] PTX backend changes
- From: Nathan Sidwell <nathan at acm dot org>
- To: Bernd Schmidt <bschmidt at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: Jakub Jelinek <jakub at redhat dot com>, Jason Merrill <jason at redhat dot com>, "Joseph S. Myers" <joseph at codesourcery dot com>
- Date: Thu, 22 Oct 2015 10:24:41 -0400
- Subject: Re: [OpenACC 2/11] PTX backend changes
- Authentication-results: sourceware.org; auth=none
- References: <5627DD78 dot 9040302 at acm dot org> <5627E303 dot 5050701 at acm dot org> <5628ECE5 dot 6080901 at redhat dot com>
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