This is part of the implementation of the dataflow analysis framework.
See "[RFC] A dataflow analysis framework for Clang AST" on cfe-dev.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp | ||
---|---|---|
114 | Shouldn't we ensure that operator== return true when we have two PointerValues with the same pointee above? That would make this piece of code redundant. |
clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp | ||
---|---|---|
114 | Never mind, just realized the above is comparing pointers. But I still think we might want to have a separate operator== for Values as we might want to compare values in many separate places. |
clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp | ||
---|---|---|
114 | Or alternatively, Values could be internalized, and all PointerValues with the same pointee could have the same address. |
clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp | ||
---|---|---|
114 | Right. Currently, all tests that assign values in loops (including the test introduced in this patch) are hitting the maximum iterations limit because we don't have a way to tell the framework how to compare distinct values (e.g. there's no need to continue iterating if the has_value properties of distinct optional values are the same). This will be the focus of my next patch. |
clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp | ||
---|---|---|
114 | Oh, I see. In this case let's merge this and looking forward to the next one :) |
Shouldn't we ensure that operator== return true when we have two PointerValues with the same pointee above? That would make this piece of code redundant.