[PATCH] D120711: [clang][dataflow] Add flow condition constraints to Environment
Yitzhak Mandelbaum via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 1 11:26:32 PST 2022
ymandel added inline comments.
================
Comment at: clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp:43
+
+ auto Res = ConjunctionVals.try_emplace(
+ std::move(Key),
----------------
xazax.hun wrote:
> As far as I understand, we need to do the double lookup (`find` and later `try_emplace`) because we do not want to allocate + take ownership when we hit the cache. An alternative is to first do `try_emplace` with a `nullptr` and overwrite the value if the emplace was successful. But I guess that also can be confusing, so it is up to you which one would you prefer.
good point. I was thinking of the value case. Sorry.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120711/new/
https://reviews.llvm.org/D120711
More information about the cfe-commits
mailing list