[PATCH] D99066: [AutoUpgrade] Take unnamed types into account.

Jeroen Dobbelaere via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 22 05:12:04 PDT 2021


jeroen.dobbelaere added a comment.

In D99066#2641043 <https://reviews.llvm.org/D99066#2641043>, @fhahn wrote:

> Is there a way to ensure all call sites that may need to handle opaque pointers pass the module? can we add an assertion ensuring the module is passed if the intrinsic takes overloaded pointer types?

The easiest way is to always pass the `Module` when a list of types is provided. But that is not a guarantee that the Module pointer will ever be needed for that specific intrinsic.

We could add an extra assertion that triggers when a pointer type is provided, but no `Module` is given. But also here, there will be false positives. (Intrinsics that can get a pointer, but not a pointer involving an unnamed type.)
I tried this in out, and got extra failures because of `prefetch`, `masked_load`, `masked_store`, `masked_gather`, `masked_scatter`. Can these intrinsics use pointers that involve unnamed types ?

Note: There might also be an issue with `LLVMIntrinsicCopyOverloadedName`, which does not have a `Module` parameter. As long as no unnamed types are used, that interface is fine, but it does not support unnamed types.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D99066/new/

https://reviews.llvm.org/D99066



More information about the llvm-commits mailing list