[PATCH] D101029: [WebAssembly] Serialize params/results in MachineFunctionInfo

Heejin Ahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 22 12:03:07 PDT 2021


aheejin added inline comments.


================
Comment at: llvm/test/CodeGen/WebAssembly/function-info.mir:109
+# CHECK:    machineFunctionInfo:
+# CHECK:      params:          [ v16i8, v8i16, v4i32, v2i64 ]
+# CHECK-NEXT: results:         [  ]
----------------
tlively wrote:
> Does MIR use MVTs for its types? I thought it would be using WebAssembly register classes instead. If it uses register classes, then these would all be represented by `V128`.
`WebAssemblyMachineFunctionInfo` uses them: https://github.com/llvm/llvm-project/blob/007158ac42c785cd59aab8bc4b4b39085b960a58/llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h#L36-L37

So it's not an MIR thing, but how we store the info. Come to think of it, I'm not sure if there is any compelling reason we should store them as MVTs though. We just [[ https://github.com/llvm/llvm-project/blob/007158ac42c785cd59aab8bc4b4b39085b960a58/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp#L1119-L1174 | happen ]] to do that in ISelLowering.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101029



More information about the llvm-commits mailing list