[clang] [clang][dataflow] Strengthen pointer comparison. (PR #75170)
Gábor Horváth via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 12 10:46:36 PST 2023
Xazax-hun wrote:
An alternative approach would be to do [hash consing](https://en.wikipedia.org/wiki/Hash_consing). Since pointer values are completely determined by the pointee (for some definition of the pointee, e.g., we might have `void*` and `int*` pointers pointing to the same storage location), we could have a single representation for all of the equal pointer values and continue to rely on identity. This can also be beneficial for memory consumption, but we have to pay for that by making value creation a bit more expensive (and the pointer values needs to be immutable).
That being said, this would be a bit of a departure from the current architecture, so I think even if we want to do this, it should be a separate PR.
https://github.com/llvm/llvm-project/pull/75170
More information about the cfe-commits
mailing list