[cfe-dev] LLVM- AST contents display and dependency analysis

Renato Golin renato.golin at linaro.org
Fri May 15 09:47:36 PDT 2015

On 14 May 2015 at 18:24, Reid Kleckner <rnk at google.com> wrote:
> I think you are on the right track, but this is going to be really hard due
> to the current design of OpenMP in Clang. A lot of OpenMP processing happens
> in Sema right now, like formation of CapturedStmts. There also isn't any
> alias analysis at the AST level, so separating dependent computations will
> be hard.

I was assuming if the user puts a pragma on a loop and the loop isn't
safe, OpenMP wouldn't try to parallelise it.

If that's the case, just putting pragmas on *every* loop would make
Clang slower, as OpenMP would be working a lot harder on all loops for
very little extra gain, but still safe.

> Is this tool intended to run automatically, or as a programmer aide to
> insert pragmas based on a potentially optimistic analysis? If it's a
> programmer aide, I wonder if you could use the Clang CFG to the dependency
> analysis.

I have to say, I don't know exactly what Yaduveer is trying to do. But
I think he now has a lot of options to try out.

I just don't think that any automated use of OpenMP without
command-line flags (on of his requirements) will be making upstream
any time soon, so the change has to be as little invasive as possible
for him to keep his sanity while merging to future versions of clang.


More information about the cfe-dev mailing list