[PATCH] D18738: Add new !unconditionally_dereferenceable load instruction metadata
    whitequark via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu Nov 10 07:23:57 PST 2016
    
    
  
whitequark requested a review of this revision.
whitequark added a comment.
The source level rule is as follows: I have a memory-safe language with region-based memory management. Once an object is constructed, pointers to it are guaranteed by the frontend to live no longer than the object. Thus, most* pointers constructed, even in dead code, can be dereferenced at any time when it is possible at all to construct it.
- The language is fairly simple and has two major object types at runtime, arrays and fields. Loads of pointers from fields always result in dereferenceable pointers because objects never contain trap representations in fields except during construction, and hoisting a load across a store used during construction is not permitted because of aliasing. Loads of pointers from arrays can result in non-dereferenceable pointers if the load is hoisted above a bounds check.
Do you feel this is too niche?
Repository:
  rL LLVM
https://reviews.llvm.org/D18738
    
    
More information about the llvm-commits
mailing list