[PATCH] Dereferenceable, dereferenceable_or_null metadata for loads
Philip Reames
listmail at philipreames.com
Tue May 5 16:24:07 PDT 2015
Code wise, looks fine. The tests need a bit more coverage and you need to update the LangRef. Once that's done, should be easy to do a final signoff.
Although, am I correct in believing your second test is dependent on your LICM changes? If so, you might want to separate that test case for the moment. I suspect this patch will be landing first.
================
Comment at: test/Analysis/ValueTracking/memory-dereferenceable.ll:32
@@ -29,1 +31,3 @@
%load5 = load i32, i32 addrspace(1)* %nparam
+ %dload = load i32*, i32** @globali32ptr, !dereferenceable !0
+ %load6 = load i32, i32* %dload
----------------
I'd really like to see some more exhaustive testing here. Cases to cover include:
load from an offset not covered by the dereferenceable portion
load from a potentially null point with dereferenceable_or_null
load from a non-null pointer with dereferenceable_or_null (i.e. pointer has nonnull metadata as well)
http://reviews.llvm.org/D9365
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list