diff options
author | Nikita Popov <npopov@redhat.com> | 2022-10-17 13:09:32 +0200 |
---|---|---|
committer | Nikita Popov <npopov@redhat.com> | 2022-10-27 10:29:41 +0200 |
commit | 6c269a3f89edde33a472d53ed017c1adfb62afcb (patch) | |
tree | 3aae05f58aaef79ed3b65975bae98af30cb436af /clang/lib/Lex/Preprocessor.cpp | |
parent | 17059753f1337209fb4cb06098c1bc65418775e9 (diff) | |
download | llvm-6c269a3f89edde33a472d53ed017c1adfb62afcb.zip llvm-6c269a3f89edde33a472d53ed017c1adfb62afcb.tar.gz llvm-6c269a3f89edde33a472d53ed017c1adfb62afcb.tar.bz2 |
[BasicAA] Replace VisitedPhiBBs with a single flag
When looking through phis, BasicAA has to guard against the
possibility that values from two separate cycle iterations are
being compared -- in this case, even though the SSA values may
be the same, they cannot be considered as equal.
This is currently done by keeping a set of VisitedPhiBBs for any
phis we looked through, and then checking whether the relevant
instruction is reachable from one of the phis.
This patch replaces this set with a single flag. If the flag is
set, then we will not assume equality for any instruction part
of a cycle. While this is nominally less accurate, it makes
essentially no difference in practice. Here are the AA stats
for test-suite:
aa.NumMayAlias | 3072005 | 3072016
aa.NumMustAlias | 337858 | 337854
aa.NumNoAlias | 13255345 | 13255349
The motivation for the change is to expose the MayBeCrossIteration
flag to AA users, which will allow fixing miscompiles related to
incorrect handling of cross-iteration AA queries.
Differential Revision: https://reviews.llvm.org/D136174
Diffstat (limited to 'clang/lib/Lex/Preprocessor.cpp')
0 files changed, 0 insertions, 0 deletions