[PATCH] D104272: [OpaquePtr] Mangle intrinsics with opaque pointers arguments

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 15 16:53:46 PDT 2021


dblaikie added a comment.

In D104272#2820617 <https://reviews.llvm.org/D104272#2820617>, @zequanwu wrote:

> In D104272#2820587 <https://reviews.llvm.org/D104272#2820587>, @dblaikie wrote:
>
>>> The patch looks mostly good, but I'm not sold on "op". Can we just use "p"?
>>
>> Presumably then we wouldn't know whether to parse a type after the address space or not? Unless we only support this when everything is opaque pointers? (so there can be no confusion between opaque pointers or not)
>
> It seems what's after "{intrinsic}." is not important for IR parsing: https://github.com/llvm/llvm-project/blob/main/llvm/lib/IR/IntrinsicInst.cpp#L127.

Though currently the mangling scheme does allow arbitrary overloading, I think, yeah? If we don't allow arbitrary overloading of intrinsics with the same name, but only use the mangling to fix different parameter types while always having the same number of parameters, then it's probably fine. (then we'd only hit ambiguities in really niche cases maybe?)

But with this change we couldn't overload some intrinsic with "(ptr, int)" and "(ptr)" because they'd produce the same mangling in the case where the former was an opaque pointer and the latter was a typed int pointer?

But we probably don't actually do that?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D104272



More information about the llvm-commits mailing list