[PATCH] D104752: [LLParser] Remove special handling for call address space

Alexander Richardson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 23 02:34:49 PDT 2021


arichardson added a comment.

In D104752#2834718 <https://reviews.llvm.org/D104752#2834718>, @nikic wrote:

> In D104752#2834690 <https://reviews.llvm.org/D104752#2834690>, @aeubanks wrote:
>
>> I'm confused by "The pointer address space of the callee should always match the specified addrspace". The addrspace on the call sounds like it's basically the "expected" addrspace and could affect lower of the call instruction itself. But the call operand might not be of that addrspace, whether it's a direct call's callee, or an indirect call's function pointer.
>
> LangRef says:
>
>> The optional addrspace attribute can be used to indicate the address space of the called function. If it is not specified, the program address space from the datalayout string will be used.
>
> My reading here is that the call addrspace and the callee addrspace must be the same.
>
> Looking back over D47541 <https://reviews.llvm.org/D47541>, I think this code is an artifact from an earlier version of the patch that did not have addrspace on calls.

It's been a long time since I looked at that code, but it was originally needed to avoid adding `addrspace(200)` to every call instruction. I just tried removing this from our downstream CHERI LLParser.cpp and all tests are still passing so it is clearly no longer needed.


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

https://reviews.llvm.org/D104752



More information about the llvm-commits mailing list