3 ms·
Rust actually already does this to some degree, using LLVM’s noalias annotations (after many years of exposing latent LLVM bugs and having to disable them). The
by cwzwarich 3y ago
Rust actually already does this to some degree, using LLVM’s noalias annotations (after many years of exposing latent LLVM bugs and having to disable them). There’s more that can be done here, see e.g.
https://github.com/rust-lang/rust/issues/16515 https://github.com/rust-lang/rust/issues/16515
There are also soundness issues around async/await:
https://github.com/rust-lang/rust/issues/63818 https://github.com/rust-lang/rust/issues/63818
LLVM’s aliasing model isn’t really optimal for a language like Rust with very precise memory dependence information, but using anything else would mean making a whole new optimizer/backend from scratch.