[PATCH] Add a dereferencable attribute

Philip Reames listmail at philipreames.com
Fri Jul 11 14:27:10 PDT 2014

I'm happy with the new encodings.  Some of my previous comments still stand (naming, comments, etc..), but the overall structure looks good.

I am uncomfortable with the coupling of dereferenceable and nonnull.  I don't have an actual counter example, but could we separate that from the current patch and revisit it separately?

Thinking out loud, I wonder about a truly perverse runtime system that wanted to use loads from null+offset to represent calls to runtime functions.  The signal handler could advance the PC and parse the load instruction to "return" a value in the right register.  This would be a "dereferenceable" load (very indirectly!), but not non-null.  I don't think you could represent this in LLVM for other reasons, but it's the best I could do on the spot.  :)


More information about the llvm-commits mailing list