[PATCH] D95425: Implementation of global.get/set for reftypes in LLVM IR

Paulo Matos via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 26 04:11:35 PDT 2021


pmatos added a comment.

In D95425#2646638 <https://reviews.llvm.org/D95425#2646638>, @tlively wrote:

> In D95425#2643765 <https://reviews.llvm.org/D95425#2643765>, @pmatos wrote:
>
>> In D95425#2643730 <https://reviews.llvm.org/D95425#2643730>, @lebedev.ri wrote:
>>
>>> Once again, are the changes to the LLVM IR (LLVMTypeKind & friends) actually needed?
>>> I'm not seeing any usages of that in the tests.
>>
>> Hi, I was going refer to those in a separate comment. My apologies for the delay.
>> Those were required to get this to work due to a call in SelectionDAGBuilder.cpp (current like 9966) to `VT.getTypeForEVT`. This requires me to create a type for the EVT `externref` and `funcref`. This forced the change to `ValueTypes.cpp`.  Once you create the Type for `externref` and `funcref` the other changes come along either by necessity or to avoid warnings that certain cases were not handled in switches.
>
> It would make sense for `VT.getTypeForEVT` to return the appropriate address space pointer types that we are lowering to externref and funcref, right?

Unsure here to be honest because it's not clear to me where this TypeForEVT fits in the optimizations done by LLVM, but I can give it a try to use the type we are loweing to instead of creating  a new one specifically for `externref` and `funcref`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D95425



More information about the llvm-commits mailing list