[PATCH] D122830: [clang][dataflow] Add support for (built-in) (in)equality operators
Gábor Horváth via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 31 09:23:44 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/Transfer.cpp:56
+ Env.getValue(*RHSNorm, SkipPast::Reference)))
+ return Env.makeIff(*LHSValue, *RHSValue);
+
----------------
I think a possible alternative way to handle this is to do some sort of "unification" for the two values. The current approach is superior in the sense that solving and generating constraints are clearly separate. Also this might be better for generating useful error messages. In case the solver ever becomes a bottleneck, I wonder whether replacing this with a unification step would speed things up a bit.
Although that would only work for the equality case.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122830/new/
https://reviews.llvm.org/D122830
More information about the cfe-commits
mailing list