[LLVMdev] Enhancing BasicAliasAnalysis for Rust

John Kåre Alsaker john.mailinglists at gmail.com
Mon Jul 28 17:35:04 PDT 2014


Since Rust references usually never aliases it would be nice if we could
exploit this for code generation. One idea I had to improve alias analysis
is to insert metadata on pointer loads. !inheritalias could be added to
load instructions to indicate that if we know all the aliases of the
pointer we load from, then we also know all the aliases of the pointer
value loaded. Given that pointer loads are common and things are likely
marked with `noalias` in Rust, this seems like useful metadata. It could
also for example apply to loading C++'s unique_ptr fields.

I'm wondering what the feasibility of extending BasicAliasAnalysis to
utilize the proposed metadata would be.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140729/c328b00c/attachment.html>


More information about the llvm-dev mailing list