This revision was automatically updated to reflect the committed changes.
Closed by commit rG9fdcae7c81f5: [analyzer] Do not cache out on some shared
implicit AST nodes (authored by xazax.hun).
Changed prior to commit:
https://reviews.llvm.org/D71371?vs=233468&id=233475#toc
Repository:
rG LL
NoQ accepted this revision.
NoQ added a comment.
This revision is now accepted and ready to land.
Thanks!!
Comment at: clang/lib/StaticAnalyzer/Core/ExprEngine.cpp:1318
case Expr::MSDependentExistsStmtClass:
llvm_unreachable("Stmt should not be in analyzer evaluatio
xazax.hun updated this revision to Diff 233468.
xazax.hun added a comment.
- Removed leftover code from previous approach.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71371/new/
https://reviews.llvm.org/D71371
Files:
clang/include/clang/Analysis/CFG.h
clang/lib/Analysis/CFG.cpp
xazax.hun updated this revision to Diff 233467.
xazax.hun edited the summary of this revision.
xazax.hun added a comment.
- Omit nodes from CFG instead of trying to make the states distinct.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71371/new/
https://reviews.llvm.org/D71371
Files:
NoQ added a comment.
I doubt we'll ever need these callbacks. I can't imagine any kind of analysis
that would need them. Like, these statements have absolutely no effect on the
runtime program state.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D7
xazax.hun added a comment.
Hmm loops. Right. So this solution is insufficient because it can prevent
legitimate caching out in loops.
If we remove those initializers from the CFG wouldn't we loose the Pre/PostStmt
callbacks? Is that acceptable? If not, we might need to create a new program
poi
NoQ added a comment.
One way to criticize the current solution would be to put an `InitListExpr` in
a loop and immediately discard it and see how states after different numbers of
iterations no longer join together only because they have different
`NoCachingOutForConsts` values.
Repository:
NoQ added a comment.
Ahaa. Ahaa. Okay.
So the AST is like
| |-DeclStmt 0x7f9f3b8932e0
| | `-VarDecl 0x7f9f3b892f50 col:7 used a 'int [5]' cinit
| | `-InitListExpr 0x7f9f3b893268 'int [5]'
| | |-array_filler: ImplicitValueInitExpr 0x7f9f3b8932d0 <> 'int'
| | |-Int
xazax.hun created this revision.
xazax.hun added reviewers: NoQ, dcoughlin, Szelethus, baloghadamsoftware,
haowei.
xazax.hun added a project: clang.
Herald added subscribers: Charusso, gamesh411, dkrupp, donat.nagy,
mikhail.ramalho, a.sidorin, rnkovacs, szepet.
Some AST nodes that stands for imp