Emit dereferenceable
assumptions for slices
#137568
Labels
A-codegen
Area: Code generation
A-LLVM
Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.
C-bug
Category: This is a bug.
I-slow
Issue: Problems and improvements with respect to performance of generated code.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Rust currently emits
dereferenceable
attributes/metadata for pointers toSized
types. The number of bytes indereferenceable
attributes/metadata must be a constant, so cannot be used for pointers to dynamically sized types like[T]
,str
. Butassume
operand bundles can be non-constants. So for pointers to DSTs, Rust should emit appropriateassume
s.Currently LLVM does not make use of variable-sized
dereferenceable
assumptions, but that may be changing soon, so it would be good if Rust could exploit this once it is added.The text was updated successfully, but these errors were encountered: