This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [hsa merge 09/10] Majority of the HSA back-end
- From: Jakub Jelinek <jakub at redhat dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>, Martin Liska <mliska at suse dot cz>
- Date: Fri, 15 Jan 2016 16:18:04 +0100
- Subject: Re: [hsa merge 09/10] Majority of the HSA back-end
- Authentication-results: sourceware.org; auth=none
- References: <20160113173925 dot 220029649 at virgil dot suse dot cz> <20160113173925 dot 914372077 at virgil dot suse dot cz> <20160114140533 dot GG3017 at tucnak dot redhat dot com> <20160115150814 dot GM3982 at virgil dot suse dot cz>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, Jan 15, 2016 at 04:08:14PM +0100, Martin Jambor wrote:
> We don't error, apart from issuing a warning we basically ignore them.
> I believe we can do it even in the long term and that it is in fact
> useful because the standard says that the "effect" if these routines
> is "unspecified" if they get called from a target region.
>
> Perhaps this is even something we should warn about earlier in omp
> lowering/expansion.
Well, only some of the omp.h functions are not allowed to be called from
the target regions, others are.
For the others that have unspecified behavior, there is always the question
when it is desirable to warn. In target construct body it might be a
warning candidate, the only possibility that it is not invoking unspec
behavior is if the target construct is not encountered, if it is in dead
code in that body, or just never encountered.
But if you have declare target routine, it is more controversial to warn,
because the routine can be run both on host (where it is fine) and on target
(where it is not), whether it calls the argument e.g. could depend on some
parameter or result of some function (say check whether it is in offloaded
region).
Anyway, thanks for fixing this, the patch is ok for trunk. And after the
commit you're the maintainer, so it is up to you to review further changes
to it. Please keep it nicely and consistently formatted in the future ;)
Jakub