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

Sean Silva chisophugis at gmail.com
Wed May 13 14:49:43 PDT 2015


On Wed, May 13, 2015 at 12:28 PM, Renato Golin <renato.golin at linaro.org>
wrote:

> On 13 May 2015 at 17:53, Reid Kleckner <rnk at google.com> wrote:
> > If you want the AST, you want to use libTooling or libclang to
> > programmatically examine the AST. The -ast-dump flag will print the AST
> for
> > debugging purposes, but it cannot be deserialized.
>
> Hi Reid,
>
> Apologies for the lack of context. I sent him here. :)
>
> Basically, he wants something similar to OpenMP (parallel loops,
> separate threads, multi-core CPUs) but without having to specify
> pragmas and command line options.
>
> My assumption is that, doing it at the IR level, it's already too
> late, because there's a lot of OpenMP that is Clang-based. So, if he
> could add a pass (possibly out-of-tree),


There isn't really a notion of "pass" on the clang AST; the result of
parsing is considered immutable.

-- Sean Silva


> that could identify loops and
> mark them with OpenMP pragmas (as they are, when the pragmas exist in
> the source), then he could benefit from OpenMP without requiring the
> users to add the pragmas to their sources or add command-line options
> to their Makefiles.
>
> In theory, if the toolchain he distributes has lib*omp in the right
> place, it should be completely transparent.
>
> Are my assumptions in the right track?
>
> cheers,
> --renato
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150513/d73852e1/attachment.html>


More information about the cfe-dev mailing list