[PATCH] D124540: [clang][dataflow] Perform structural comparison of indirection values in `join`.
Yitzhak Mandelbaum via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 28 10:58:57 PDT 2022
ymandel marked an inline comment as done.
ymandel added inline comments.
================
Comment at: clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp:357-365
+ // FIXME: add unit tests that cover this statement.
+ if (auto *IndVal1 = dyn_cast<IndirectionValue>(Val)) {
+ auto *IndVal2 = cast<IndirectionValue>(It->second);
+ assert(IndVal1->getKind() == IndVal2->getKind());
+ if (&IndVal1->getPointeeLoc() == &IndVal2->getPointeeLoc()) {
+ JoinedEnv.LocToVal.insert({Loc, Val});
+ continue;
----------------
sgatev wrote:
> Let's add merging of distinct indirection values to `mergeDistinctValues` where we already have code for merging distinct boolean values.
Good idea, done. That's nicer, thanks.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124540/new/
https://reviews.llvm.org/D124540
More information about the cfe-commits
mailing list