Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
noalias on all parameters by default (with debug safety); ability to specify mayalias #1108
I'm extracting this (flawed) proposal out of #733.
Depends on #561 so we can put llvm parameter attributes on slice pointers
This proposal needs work. Consider this example:
This would trigger the proposed debug safety but it does not actually represent problematic behavior, since the value is never accessed via the other pointer.
One proposal adjustment could be to do all the runtime safety only at store instructions for everything. I fear this would be too slow in practice, however it is worth experimenting with before shutting the idea down. I'll first verify that LLVM would be able to take advantage of these annotations though.