This is an archive of the discontinued LLVM Phabricator instance.

[MC][WebAssembly] For type checking for bulk memory instructions
ClosedPublic

Authored by sbc100 on Apr 4 2023, 8:44 AM.

Details

Summary

This code currently assumes that all bulk memory operations occur on
memory 0 which who's type is determined by the wasm32 vs wasm64 target
triple. Further improvement would be need to support multi-memory.

Diff Detail

Event Timeline

sbc100 created this revision.Apr 4 2023, 8:44 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 4 2023, 8:44 AM
Herald added subscribers: pmatos, asb, wingo and 5 others. · View Herald Transcript
sbc100 requested review of this revision.Apr 4 2023, 8:44 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 4 2023, 8:44 AM
sbc100 updated this revision to Diff 510821.Apr 4 2023, 8:45 AM
  • revert

This following emscripten change is currently blocked due to this bug: https://github.com/emscripten-core/emscripten/pull/19128

tlively added inline comments.Apr 4 2023, 11:53 AM
llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmTypeCheck.cpp
283
tlively accepted this revision.Apr 4 2023, 11:55 AM

LGTM with the type fixed.

This revision is now accepted and ready to land.Apr 4 2023, 11:55 AM
sbc100 added inline comments.Apr 4 2023, 12:06 PM
llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmTypeCheck.cpp
283

Good point... I guess it was decided that each individual segment could never exceed i32 space?

sbc100 updated this revision to Diff 510888.Apr 4 2023, 12:16 PM
  • feedback
tlively added inline comments.Apr 4 2023, 12:41 PM
llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmTypeCheck.cpp
283

Yeah, I guess that's the reason.

This revision was landed with ongoing or failed builds.Apr 4 2023, 2:10 PM
This revision was automatically updated to reflect the committed changes.