[Attributor] Introduce AAInstanceInfo
The Attributor, as many other parts in LLVM, uses pointer equivalence for `llvm::Value`s. This only works as long as `llvm::Value`s are dynamically unique, or, to be exact, we will never end up with the same `llvm::Value` representing two dynamic instances. We already provided a helper to check the former, namely `AA::isDynamicallyUnique`, however we could not check the latter. In this patch we move the logic into a separate AA which helps with the growing complexity and use cases. We also extend the interface to answer the second question rather than the first. So we do not determine dynamically uniqueness but if we might end up with the `llvm::Value` describing a different dynamic instance. Note that the latter is very much tied to the Attributor capabilities to look through memory, recursion, etc. so we need to update the logic as we go.
Loading
Please register or sign in to comment