[PATCH] Canonicalize an assume(load != null) into !nonnull metadata
Philip Reames
listmail at philipreames.com
Thu Oct 23 17:18:09 PDT 2014
Hi hfinkel,
We currently have two ways of informing the optimizer that the result of a load is never null: metadata and assume. This change converts the second in to the former. This avoids a need to implement optimizations using both forms.
We should probably extend this basic idea to metadata of other forms; in particular, range metadata. We view is that assumes should be considered a "last resort" for when there isn't a more canonical way to represent something.
http://reviews.llvm.org/D5951
Files:
lib/Transforms/InstCombine/InstCombineCalls.cpp
test/Transforms/InstCombine/assume.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5951.15370.patch
Type: text/x-patch
Size: 2946 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141024/05387986/attachment.bin>
More information about the llvm-commits
mailing list