Stream: git-cranelift

Topic: cranelift / Issue #1299 Generalize "global values" to "te...


view this post on Zulip GitHub (Dec 19 2019 at 09:39):

bnjbvr commented on Issue #1299:

And a supplementary question: this seems to redefine a new IR for templates, with call, if/then/else, etc. Wouldn't it be possible to reuse the same IR/layout notions that Cranelift already knows, to avoid a lot of concept (and i expect code) duplication? Otherwise, users would be limited to the template IR for their needs, and would need to add template IR nodes as they require, which wouldn't make a very pleasant developer experience.

view this post on Zulip GitHub (Dec 19 2019 at 19:35):

fitzgen commented on Issue #1299:

I believe that @sunfishcode was intending that this could be reused across lightbeam and cranelift so that we could use the same barrier implementations at whatever tier JIT we were on in Wasmtime.

This is a trade off: we add a little complexity in the form of a new (or at least, expanding) IR language, and we sacrifice some control over the precise generated code for a barrier / global / table. What we gain is the portability. And this is much more limited in scope compared to the template strawperson I wrote up in #1176. The only precise control we really need for barriers are which side of an if/else should fallthrough, I think. This does address that with the IfElse::else_is_cold flag.

A reasonable alternative would be to say that lightbeam, as a baseline-style JIT rather than an optimizing one, would always use out-of-line calls for barriers, and then we could have a proper subset of clif for the templates.

view this post on Zulip GitHub (Feb 28 2020 at 23:36):

alexcrichton commented on Issue #1299:

Thanks for the PR again, and as a procedural note the Cranelift repository has now merged into the wasmtime repository.

PRs are no longer landing in this repository, and unfortunately there's no "one button" solution to move a PR to the wasmtime repository. A script has been prepared, however, to assist you in transferring this PR to the wasmtime repo. Feel free to reach out on Zulip with any questions!


Last updated: Nov 22 2024 at 17:03 UTC