[LLVMdev] [RFC] Parallelization metadata and intrinsics in LLVM (for OpenMP, etc.)

Andrey Bokhanko andreybokhanko at gmail.com
Wed Oct 3 01:30:08 PDT 2012


> Actually, it is perfectly possible to have a program with OpenMP
> directives that is NOT valid when those directives are ignored.  In
> other words, it's possible to write a legal OMP program that relies on
> parallelism to function correctly.  In practice this doesn't happen in
> production codes but it's wrong to say the compiler can just ignore
> directives with no problems whatsoever.

You might be right. But this is as good as one can do compiling an
OpenMP program for a target with no OpenMP support.

> What are the important optimizations?

You mean "that should be done before procedurization"?

As you understand, there is only way to know -- try it.

As been mentioned elsewhere, Intel Compiler employs essentially the
same design as we proposed. [Tian05] (use this link to access the
paper: http://citeseerx.ist.psu.edu/viewdoc/download?doi=
describes phase ordering that Intel Compiler developers found to
provide good performance while preserving correctness.

>> 4) Make all optimizations thread-aware. Best approach in theory, no
>> compilers exist that go as far.
> This is probably not practical.  It may be fine in academia but in
> production environments the resources don't exist, unfortunately.

I do agree! :-)

That's why we propose what we propose -- the design leaves all doors opened.

Software Engineer
Intel Compiler Team
Intel Corp.

More information about the llvm-dev mailing list