4 ms·
Does Rust apply aliasing optimisations now? Last I heard of that, they kept having to turn it back off because of LLVM bugs concerning aliasing.
by Filligree 5y ago
Does Rust apply aliasing optimisations now? Last I heard of that, they kept having to turn it back off because of LLVM bugs concerning aliasing.
- kzrdude 5y agoRust does not use type-based alias analysis (the "strict aliasing" problem), however.
- coolreader18 5y agoIn any case, it's still UB under the language guidelines, it's just not exploited yet.
- oconnor663 5y agoI believe since the last time they were turned on they have stayed on, yes.
- pcwalton 5y agoRust (and, for that matter, C++ compilers) have always applied optimizations that rely on alias analysis. What I assume this thread is referring to is the noalias LLVM attribute on &mut function parameters. Rust now applies this.