On Fri, Jan 22, 2016 at 02:18:38PM +0100, Bernd Schmidt wrote:
> On 01/22/2016 09:36 AM, Jakub Jelinek wrote:
> >
> >I think it is a bad idea to go against what the user wrote.  Warning that
> >some code might not be efficient?  Perhaps (if properly guarded with some
> >warning option one can turn off, either on a per-source file or using
> >pragmas even more fine grained).  But by default not offloading?  That is
> >just wrong.
> 
> I'm leaning more towards Thomas' side of the argument. The kernels construct
> is a hint, a "do your best" request to the compiler. If the compiler sees
> that it can't parallelize a loop inside a kernels region, it's probably best
> not to offload it.
> 

Shouldn't such optimization feedback be output in MSG_NOTE dumps?
Vectorizer uses it to inform the user what it is doing, supposedly
with the intention to help the programmer find out why specific loops
are not vectorized (and run slowly).  I have also decided to use it to
inform the user whether a combination of OpenMP constructs is
gridified or not.

Unfortunately, notes seem to appear only in "detailed" dumps, which
often are not the best place for users to look into because of too
much information on gcc internals.  So the user interface aspect of
notes could perhaps be re-thought a bit.

In any event, I think that at least in the near term, good compiler
feedback could ease the efficient use of accelerators quite a lot,
like (they say) it did with early auto-vectorizing compilers.

Martin

Reply via email to