[PATCH] D111227: [WebAssembly] Implementation of table.grow/size and ref.null intrinsics
Paulo Matos via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 9 07:56:00 PST 2021
pmatos added inline comments.
================
Comment at: llvm/include/llvm/CodeGen/ValueTypes.td:240
// Pseudo valuetype mapped to the current pointer size.
def iPTR : ValueType<0, 254>;
----------------
pmatos wrote:
> tlively wrote:
> > Hmm, I wonder what "current pointer size" means here. The contrast between this and `iPTRAny` makes me think that there should be a way to control the address space of `iPTR` arguments. Maybe it's the address space attached to the call instruction for the intrinsic? If we can find a target-independent way to pass pointers to particular address spaces to intrinsics, that seems like it would be a better solution that putting specific knowledge of WebAssembly address spaces into IR/Type.h. This also might be worth asking about on llvm-dev.
> Good point. I will take a look at this and if I can't figure it out in a reasonable amount of time, I will ask llvm-dev.
hummm, I think this might not be that useful, a quick glance at the code shows:
```
// An int value the size of the pointer of the current
// target to any address space. This must only be used internal to
// tblgen. Other than for overloading, we treat iPTRAny the same as iPTR.
iPTRAny = 250,
```
and
```
// An int value the size of the pointer of the current
// target. This should only be used internal to tblgen!
iPTR = 254,
```
I think that this is independent of address space. `iPTRAny` is barely used in code. I think for most purposes it's identical to `iPTR`. I will discuss this problem in `llvm-dev`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111227/new/
https://reviews.llvm.org/D111227
More information about the llvm-commits
mailing list