[PATCH] D17611: NFC. Introduce Value::isPointerDereferenceable

David Majnemer via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 27 07:33:16 PDT 2016


On Wed, Apr 27, 2016 at 6:48 AM, Artur Pilipenko <apilipenko at azulsystems.com
> wrote:

> apilipenko added inline comments.
>
> ================
> Comment at: lib/IR/Value.cpp:556
> @@ -555,1 +555,3 @@
>
> +bool Value::isPointerDereferenceable(bool &CanBeNull) const {
> +  assert(getType()->isPointerTy() && "must be pointer");
> ----------------
> majnemer wrote:
> > I'd expect this to call isDereferenceableFromAttribute.
> Can you elaborate? isDereferenceableFromAttribute is an internal function
> in Loads.cpp, while this is a public API to get inherent property of the
> value.
>

There is no inherent reason why isPointerDereferenceable _must_ be a member
of Value, it is quite reasonable for it to be exposed in Loads.h seeing as
how it seems quite similar to isSafeToLoadUnconditionally.


>
>
> http://reviews.llvm.org/D17611
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160427/f6e2efd4/attachment.html>


More information about the llvm-commits mailing list