[PATCH] D128363: [clang][dataflow] Implement functionality for flow condition variable substitution.

Gábor Horváth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 24 08:49:07 PDT 2022


xazax.hun accepted this revision.
xazax.hun added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp:217
+    llvm::DenseMap<AtomicBoolValue *, BoolValue *> Substitutions) {
+  llvm::DenseMap<BoolValue *, BoolValue *> SubstitutionsCache;
+  SubstitutionsCache.insert(Substitutions.begin(), Substitutions.end());
----------------
I think `DenseMap` has a constructor that accepts two iterators.


================
Comment at: clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp:233-236
+  auto ConstraintsIT = FlowConditionConstraints.find(&Token);
+  if (ConstraintsIT == FlowConditionConstraints.end()) {
+    return getBoolLiteralValue(true);
+  }
----------------
Should we move this check to the beginning to save work? 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D128363/new/

https://reviews.llvm.org/D128363



More information about the cfe-commits mailing list