Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
Filligree
· 4y ago · 0 comments
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.
Comments
[–]
pcwalton
4y ago
Rust (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.
[–]
coolreader18
4y ago
In any case, it's still UB under the language guidelines, it's just not exploited yet.
[–]
oconnor663
4y ago
I believe since the last time they were turned on they have stayed on, yes.
[–]
kzrdude
4y ago
Rust does not use type-based alias analysis (the "strict aliasing" problem), however.