[cfe-dev] [analyzer] Summary IPA thoughts +code
Gábor Horváth via cfe-dev
cfe-dev at lists.llvm.org
Wed Mar 2 06:08:15 PST 2016
Hi Aleksei,
On 2 March 2016 at 14:42, Aleksei Sidorin via cfe-dev <
cfe-dev at lists.llvm.org> wrote:
> Hello Gabor,
>
> We still use a file-by-file approach so we don't build a full AST but
> merging ASTs of analyzed callees only where possible. We build a mapping
> showing what file contains required functions. Then, we analyze a project
> file-by-file. During analysis, we import this definition to our TU if we
> meet a call with a callee definition in another file, and continue
> analysis as usually.
>
> This approach seems to work. It should get much better performance after
> implementation of summary serialization due to summary inter-TU reusage. We
> don't build a full project AST but this is not a memory bottleneck: a real
> bottleneck currently is function summaries.
>
So basically this approach is functional right now on large scale projects
and it is orthogonal to the summary based method you developed (so it can
be used with inlining), but you are not satisfied with the performance (and
I/O is not the bottleneck). Is that right? Did you make some benchmarks?
What happens when you meet a call with a callee definition in another file
in a just imported definition? Do you import that definition as well? Don't
you end up having almost all of the project AST in the memory this way?
>
> Currently we're working on upstreaming our ASTImporter work. This work is
> slow enough because it requires massive test writing (ASTImporter lacks
> tests now). But we hope, it will become available for all clang users who
> needs it.
>
That sounds awesome, thank you :)
Regards,
Gábor
>
> Hi!
>>
>> Do you have some updates? I checked the repository, and there are python
>> scripts indicating cross TU analysis support (and there were also some
>> ASTImporter work). I was wondering what is the state of this? What is the
>> approach you are using? Does that approach work, when the unified AST
>> possibly not fit into the memory?
>>
>>
>>
> --
> Best regards,
> Aleksei Sidorin
> Software Engineer,
> IMSWL-IMCG, SRR, Samsung Electronics
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://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/20160302/78882a2f/attachment.html>
More information about the cfe-dev
mailing list