Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Propose a new LLVM CPU configuration: Lime1 (#235)
* Propose a new LLVM CPU configuration: Lime1 ## Overview I propose a new target CPU configuration for LLVM, and any toolchain or engine that wishes to share it, named "lime1". Lime1 would enable mutable-globals, bulk-memory-opt*, multivalue, sign-ext, nontrapping-fptoint, extended-const, and call-indirect-overlong**. The specific set is open to debate here. The idea is, once we stabilize it, Lime1 would be stable and we would not add or remove features from that point on. Lime1 could be followed by Lime2 and so on in the future if we wish to add or remove features after that. And we can always define new non-Lime CPUs as well, if there are needs for different sets. \* bulk-memory-opt would be a new feature that just includes `memory.copy` and `memory.fill`, and not the rest of bulk-memory \*\* call-indirect-overlong would be a new feature that just introduces the new `call_indirect` encoding from reference-types and not the actual reference types. ## Further background The LLVM Wasm target defaults to a "generic" CPU, which adds features over time as major engines support them. That's good for some users, but other users would benefit from more stable CPU options. Currently the only stable CPU in LLVM is "mvp", however that's pretty old at this point. We've always planned to add more CPUs, but haven't had convenient occasions. The Wasm spec gives us "Wasm 1.0" and "Wasm 2.0" and so on, however while those names may sound like curated user-facing versions, in practice they're more like snapshots of the spec at moments when the spec process reaches certain points. There have been discussions at the CG level about defining official subsets of the language, for engines that don't want to implement threads or other things. If the CG ends up defining specific subsets, we can certainly add new stable CPUs based on them. However, I expect that'll will be some time in the future yet, and it seems beneficial to define something LLVM can use sooner as well. So because there is no convenient external milestones, let's invent one! The name "Lime" is short for "*Li*near *me*mory", and refers to how this target is relatively focused on linear-memory languages. Just as the Wasm spec itself has no concept of "wasm32", it won't have any concept of "lime" either. Lime will just be an informal tooling and engine convention.
- Loading branch information