[BasicAA] Avoid duplicate query for GEPs with identical offsets (NFCI)
authorNikita Popov <nikita.ppv@gmail.com>
Sat, 13 Feb 2021 22:43:57 +0000 (23:43 +0100)
committerNikita Popov <nikita.ppv@gmail.com>
Sun, 14 Feb 2021 16:18:28 +0000 (17:18 +0100)
commit53ae96d4bb4976c458b5c50e00782980efba9ded
tree62185ee5f22a145fdac19099ff4a5a83f7b6f59b
parent728803ed74e26b370600002dcffe4994ce3ec37a
[BasicAA] Avoid duplicate query for GEPs with identical offsets (NFCI)

For two GEPs with identical offsets, we currently first perform
a base address query without size information, and then if it is
MayAlias, perform another with size information. This is pointless,
as the latter query should produce strictly better results.

This was not quite true historically due to the way that NoAlias
assumptions were handled, but that issue has since been resolved.
llvm/lib/Analysis/BasicAliasAnalysis.cpp