44 ms·
That optimization is useful to C and C++ code, they use "restrict": https://en.wikipedia.org/wiki/Restrict https://en.wikipedia.org/wiki/Restrict Does LLVM imp
by wolf550e 9y ago
That optimization is useful to C and C++ code, they use "restrict": https://en.wikipedia.org/wiki/Restrict https://en.wikipedia.org/wiki/Restrict
Does LLVM implement optimization that only Rust can use, or at least those that cannot be used from C/C++?
- steveklabnik 9y ago&mut T pointers are basically restrict by default. LLVM is adding some semantics specific to non-C or C++ languages. I’m on my phone so I can’t link you, but they’re adding an intrinsic related to infinite loops because languages like Rust have different semantics here.
- Manishearth 9y agoNot anymore, LLVM was buggy about this and we had to remove this.
- steveklabnik 9y agoThat’s why I said “basically”, it’s been fixed upstream and will be turned on again soon.