This patch adds a pass, controlled by an option and off by default for now, for making implicit get_local/set_local explicit. This simplifies emitting wasm with MC.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp | ||
---|---|---|
61 ↗ | (On Diff #75330) | use LLVM's lovely functionStyleCapitalization here and below. And might as well clang-format this file if it hasn't been, too. |
293 ↗ | (On Diff #75330) | So, after this pass runs, we expect every VReg to be stackified, right? Should we run a pass over the MIs (maybe behind !NDEBUG) to check this? |
lib/Target/WebAssembly/WebAssemblyInstrInfo.td | ||
155 ↗ | (On Diff #75330) | might as well add the binary opcodes for the local operations too. |
162 ↗ | (On Diff #75330) | why is this modeled as mayStore? just because it's no longer a register-like operation? Or we want LLVM to think of locals as something like memory? We should probably have some more explanatory text (maybe in this file) about how we model the locals. |
lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp | ||
44 ↗ | (On Diff #75330) | general question: should we be somehow prefixing our wasm-specific options, e.g. wasm-enable-explicit-locals? |