aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-mca/llvm-mca.cpp
diff options
context:
space:
mode:
authormartinboehme <mboehme@google.com>2024-05-07 10:12:23 +0200
committerGitHub <noreply@github.com>2024-05-07 10:12:23 +0200
commitf3fbd21fa4e25496725c22d987e4e47e4c39c8b0 (patch)
tree8810eb1c9eac7ed15629c827806570bc9bd8d557 /llvm/tools/llvm-mca/llvm-mca.cpp
parentd9f2b9391887af95acdd91dfea2e72eb3a9d8d05 (diff)
downloadllvm-f3fbd21fa4e25496725c22d987e4e47e4c39c8b0.zip
llvm-f3fbd21fa4e25496725c22d987e4e47e4c39c8b0.tar.gz
llvm-f3fbd21fa4e25496725c22d987e4e47e4c39c8b0.tar.bz2
[clang][dataflow] Strengthen pointer comparison. (#75170)
- Instead of comparing the identity of the `PointerValue`s, compare the underlying `StorageLocation`s. - If the `StorageLocation`s are the same, return a definite "true" as the result of the comparison. Before, if the `PointerValue`s were different, we would return an atom, even if the storage locations themselves were the same. - If the `StorageLocation`s are different, return an atom (as before). Pointers that have different storage locations may still alias, so we can't return a definite "false" in this case. The application-level gains from this are relatively modest. For the Crubit nullability check running on an internal codebase, this change reduces the number of functions on which the SAT solver times out from 223 to 221; the number of "pointer expression not modeled" errors reduces from 3815 to 3778. Still, it seems that the gain in precision is generally worthwhile. @Xazax-hun inspired me to think about this with his [comments](https://github.com/llvm/llvm-project/pull/73860#pullrequestreview-1761484615) on a different PR.
Diffstat (limited to 'llvm/tools/llvm-mca/llvm-mca.cpp')
0 files changed, 0 insertions, 0 deletions