[cfe-dev] [analyzer] Summary IPA thoughts +code

Gábor Horváth via cfe-dev cfe-dev at lists.llvm.org
Wed Mar 2 05:07:35 PST 2016


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,
Gábor

On 26 October 2015 at 16:31, Artem Dergachev via cfe-dev <
cfe-dev at lists.llvm.org> wrote:

> Dear All,
>
> We've published a snapshot of one of our development branches, which
> contains the Summary IPA prototype preview. As we mentioned, there are a
> lot of problems with it, including,
>
>   - it's branched from clang-3.4,
>   - it includes quite a bit of unrelated changes, including our inter-unit
> draft, in a single blob;
>
> so even though it's in no way ready for any sort of review, i guess it
> could help a bit as a temporary reference in discussing issues.
>
> We deeply apologize for the mess; of course the code will be changed
> significantly if/once we decide to put it on actual review for accepting
> into the base clang repo, but at least we got it at least somehow working
> and got a chance to make properly :)
>
>
> The github branch with a single blob for everything is at:
>
>   https://github.com/haoNoQ/clang/tree/summary-ipa-draft
>
>
>
> === Places to look at, with necessary pre-cautions :) ===
>
>
>   * ExprEngine::inlineCall()
>
> https://github.com/haoNoQ/clang/blob/summary-ipa-draft/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp#L468
>
>
> Most of the calling bureaucracy is coded there, such as storing summaries,
> creating auxiliary ExprEngine's for constructing ExplodedGraphs for
> summaries, etc.
>
> -----
>
>   * include/clang/StaticAnalyzer/Core/PathSensitive/FunctionCallSummary.h
>
> https://github.com/haoNoQ/clang/blob/summary-ipa-draft/include/clang/StaticAnalyzer/Core/PathSensitive/FunctionCallSummary.h
>
>   * lib/StaticAnalyzer/Core/FunctionCallSummary.cpp
>
> https://github.com/haoNoQ/clang/blob/summary-ipa-draft/lib/StaticAnalyzer/Core/FunctionCallSummary.cpp
>
>     These files include the alpha-renaming stuff (the "Summarizer" object
> and its "compose***()" methods), and the procedure of applying the summary
> ("CallFunction()"). The latter includes summary-apply procedures for store
> bindings (TODO - move to ***StoreManager.cpp, fix the necessary
> abstractions, fix HandleBinding() accordingly), return values, and calling
> checkers. TODO - the procedure for alpha-renaming CXXTempObjectRegion will
> be fixed, do not look there yet :)
>
> -----
>
>   * RangeConstraintManager::applyCallBranchSummary(),
>
> https://github.com/haoNoQ/clang/blob/summary-ipa-draft/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp#L1337
>
>   *                         handleSummaryRange()
>
> https://github.com/haoNoQ/clang/blob/summary-ipa-draft/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp#L1295
>
>     The procedure of applying the summary for range constraints, which
> includes finding pre-conditions for the summary and handling unreachable
> branches.
>
> -----
>
>   * lib/StaticAnalyzer/Checkers/IntegerOverflowChecker.cpp
>
> https://github.com/haoNoQ/clang/blob/summary-ipa-draft/lib/StaticAnalyzer/Checkers/IntegerOverflowChecker.cpp
>
>   * lib/StaticAnalyzer/Checkers/ConstModifiedChecker.cpp
>
> https://github.com/haoNoQ/clang/blob/summary-ipa-draft/lib/StaticAnalyzer/Checkers/ConstModifiedChecker.cpp
>
>     The two checkers, with necessary modifications for running under
> summary IPA, which were used for gathering experimental data. The
> IntegerOverflow checker was also discussed in
> http://reviews.llvm.org/D4066 , authored by Julia Trofimovich, another
> colleague of ours, and the ConstModified checker was created by Alexey,
> also corresponding to one of the items in the list of potential checkers.
>
> -----
>
>   * test/Analysis/summary-ipa*
>
> https://github.com/haoNoQ/clang/blob/summary-ipa-draft/test/Analysis/summary-ipa.cpp
>
> https://github.com/haoNoQ/clang/blob/summary-ipa-draft/test/Analysis/summary-ipa.c
>
> https://github.com/haoNoQ/clang/blob/summary-ipa-draft/test/Analysis/summary-ipa-temporaries.cpp
>
> https://github.com/haoNoQ/clang/blob/summary-ipa-draft/test/Analysis/summary-ipa-symranges.cpp
>
> https://github.com/haoNoQ/clang/blob/summary-ipa-draft/test/Analysis/summary-ipa-xfail.cpp
>
>     Some fancy tests which we pass. They don't cover everything (TODO -
> we'd have to cover most of the paths during the refactoring, of course),
> but these tests already have some fancy examples we had to dig through.
> _______________________________________________
> 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/e4762da0/attachment.html>


More information about the cfe-dev mailing list