[PATCH] D86669: [ValueTracking] Remove MaxLookup from getUnderlyingObjects
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 6 12:12:12 PDT 2022
efriedma added a comment.
In D86669#3561125 <https://reviews.llvm.org/D86669#3561125>, @vitalybuka wrote:
> In D86669#3560983 <https://reviews.llvm.org/D86669#3560983>, @efriedma wrote:
>
>> If you're seeing a miscompile, something is probably wrong with the caller. getUnderlyingObjects() is, in general, not guaranteed to produce an identifiable object. If the caller cares, it should check; for example, GlobalsAAResult::getModRefInfoForArgument checks `all_of(Objects, isIdentifiedObject)`.
>
> I am not sure why do don't want to make it guaranty with a patch like this?
How could we possibly guarantee that? In general, we're going to find some opaque thing that both getUnderlyingObjects() and its caller can't understand.
I mean, I guess we could define an API that narrowly guarantees it looks though all bitcast, addrspacecast, gep, phi, and select operations. But that would be expensive in general, and it's not obvious to me it solves anything.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86669/new/
https://reviews.llvm.org/D86669
More information about the llvm-commits
mailing list