[cfe-dev] Speed up debug version of LibTooling AST parsing

Whisperity via cfe-dev cfe-dev at lists.llvm.org
Mon Feb 17 06:13:15 PST 2020


Unless you need the actual Debug build for anything, maybe try sticking to
assertions and a release build? (-DLLVM_ENABLE_ASSERTIONS=ON
-DCMAKE_BUILD_TYPE=Release) Release build is fast, small, and with enough
assertions (and maybe putting "llvm/Support/Debug.h" into the file and
calling the frontend with -debug?) you could get most of the stuff you need
for debugging.

Jan Ryšavý via cfe-dev <cfe-dev at lists.llvm.org> ezt írta (időpont: 2020.
febr. 17., H, 10:19):

> We are using Clang LibTooling for source-to-source conversion. Size of
> converted headers is around 10MB.
>
> Release version of our conversion utility works fine, but debug version is
> spending 20 seconds in clang::ParseAST.
>
> Is there any chance how to speed up parsing, for example using precompiled
> headers (or storing parsed AST)?
>
> Could you please point me in the right direction?
>
> Best regards
> Jan Rysavy
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20200217/8d79ddf0/attachment.html>


More information about the cfe-dev mailing list