Move Value.isDereferenceablePointer to ValueTracking [NFC]
authorPhilip Reames <listmail@philipreames.com>
Thu, 23 Apr 2015 17:36:48 +0000 (17:36 +0000)
committerPhilip Reames <listmail@philipreames.com>
Thu, 23 Apr 2015 17:36:48 +0000 (17:36 +0000)
commit5461d45abf940b51cfe97eaa0a7cf274d43cb394
tree845d9fad452f4df7f391da8abd6e16db6633b136
parent745615ca0059ac89b4871d8426f57a9e6f283fa7
Move Value.isDereferenceablePointer to ValueTracking [NFC]

Move isDereferenceablePointer function to Analysis. This function recursively tracks dereferencability over a chain of values like other functions in ValueTracking.

This refactoring is motivated by further changes to support dereferenceable_or_null attribute (http://reviews.llvm.org/D8650). isDereferenceablePointer will be extended to perform context-sensitive analysis and IR is not a good place to have such functionality.

Patch by: Artur Pilipenko <apilipenko@azulsystems.com>
Differential Revision: reviews.llvm.org/D9075

llvm-svn: 235611
llvm/include/llvm/Analysis/ValueTracking.h
llvm/include/llvm/IR/Value.h
llvm/lib/Analysis/MemDerefPrinter.cpp
llvm/lib/Analysis/ValueTracking.cpp
llvm/lib/IR/Value.cpp
llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
llvm/lib/Transforms/Scalar/SROA.cpp
llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp