Better HN
topnewbestaskshowjobs
Log inSign up

maikklein_dev

5 karma · joined Oct 21, 2019 (7y ago) · 3 submissions

Submissions

comment 6y ago · link · parent

If I understood it correctly, it just turns undefined behavior regarding aliasing into compiler errors

comment 7y ago · link · parent

The standard library is a bit awkward at places with its pointer usage. This is why I have a custom one.

From a language point of view, it fits really well. I am also constrained with syntax as I want rlsl to be a strict subset of rust.

Closures capture by references which means you always have to capture explicitly with move (No pointers in structs in SPIR-V). Although I am fairly confident that this can be fixed.

Also MIR optimization passes are pretty weak right now, and rlsl would require an optimizer in the future. like SPIR-V <-> LLVM. I am not sure how good spirv-opt is right now.

comment 7y ago · link · parent

I didn't choose cranelift because there was no real benefit for it. If the focus would have been on optimizations, I might have used it. The IR seems more friendly compared MIR, although I think there is a rewrite coming to make MIR more suitable for optimizations as well :).

And I do quite a lot of transformations at the MIR level, so I am looking forward to a more optimization friendly IR.