[PATCH] D111227: Implementation of new polymorphic type llvm_anyref_ty
Thomas Lively via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 14 22:20:16 PST 2021
tlively added inline comments.
================
Comment at: llvm/include/llvm/IR/Intrinsics.td:171-175
class LLVMQualPointerType<LLVMType elty, int addrspace>
: LLVMType<iPTR>{
LLVMType ElTy = elty;
int AddrSpace = addrspace;
}
----------------
Instead of having to build Wasm-specific knowledge into so many new parts of LLVM, can we instead use `LLVMQualPointerType`? I guess this wouldn't allow us to define polymorphic intrinsics after all, though. As long as we have just externref and funcref, that might be fine, but do we know whether we will be adding more reference types in the future? The more we will need to add, the more amenable to these changes I would be. One option is to not land this change now, but keep it in our back pocket for if/when we need to add more reference types in the future.
================
Comment at: llvm/include/llvm/Support/MachineValueType.h:314
+
+ // Any Wasm reference type
+ rAny = 253,
----------------
This should also have the `This is only for tblgen's consumption!` warning.
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