[PATCH] D124540: [clang][dataflow] Perform structural comparison of indirection values in `join`.

Stanislav Gatev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 28 00:37:42 PDT 2022


sgatev accepted this revision.
sgatev 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;
----------------
Let's add merging of distinct indirection values to `mergeDistinctValues` where we already have code for merging distinct boolean values.


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