-
-
Notifications
You must be signed in to change notification settings - Fork 121
SIMD #2294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
SIMD #2294
Conversation
spotandjake
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks awesome overall, I've just done an initial review so far, but want to go back over against the wasm api.
| "build": [ | ||
| "dune build @native --no-buffer" | ||
| ], | ||
| "build": ["dune build @native --no-buffer"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did the formatting change here?
| from "runtime/unsafe/wasmv128" include WasmV128 | ||
| use WasmV128.* | ||
|
|
||
| let (==) = (x, y) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not provide this in the runtime module?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
compiler/test/runtime might be a better place for this. I know the other unsafe tests exist here but we should honestly move those too. Especially as we would like to eventually split the runtime and stdlib.
| | WasmSimdConstI8x16 => | ||
| prim_type( | ||
| [ | ||
| ("lane0", Builtin_types.type_wasmi32), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if it would have been worth using a helper like List.init((index) => ("lane" ++ toString(index),Builtin_types.type_wasmi32), 15) for all of these.
| }; | ||
| let features = | ||
| if (Config.simd^) { | ||
| [Module.Feature.simd128, ...features]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Binaryen's default behaviour is to error if a feature isn't enabled but the code is used right?
| // TODO(#): Use a more descriptive name once we get fixes into Binaryen | ||
| let grain_memory = "0"; | ||
|
|
||
| let gensym_counter = ref(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't these already exist?
| ), | ||
| ); | ||
| | None => | ||
| // The wrapper function generated for this can never provide immediate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem here is we have no way to say something needs to be a proper constant for align and such right??
Similar to the issue we run into with load and store?
No description provided.