4 ms·
Thanks! Do you know if the Rust compiler is able to pass this information to LLVM somehow?
by sapiogram 3y ago
Thanks! Do you know if the Rust compiler is able to pass this information to LLVM somehow?
- hkalbasi 3y agoIt seems it isn't yet: https://github.com/rust-lang/rust/issues/116744 https://github.com/rust-lang/rust/issues/116744
- deleted 3y ago[deleted]
- afdbcreid 3y agoIt does pass this information to LLVM, in the form of the `readonly` attribute. This seems to be a bug in LLVM that does not optimize the function propely, I don't know why.