mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-15 03:26:05 +00:00
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235611 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -186,6 +186,13 @@ namespace llvm {
|
||||
/// are lifetime markers.
|
||||
bool onlyUsedByLifetimeMarkers(const Value *V);
|
||||
|
||||
/// isDereferenceablePointer - Return true if this is always a dereferenceable
|
||||
/// pointer.
|
||||
///
|
||||
/// Test if this value is always a pointer to allocated and suitably aligned
|
||||
/// memory for a simple load or store.
|
||||
bool isDereferenceablePointer(const Value *V, const DataLayout &DL);
|
||||
|
||||
/// isSafeToSpeculativelyExecute - Return true if the instruction does not
|
||||
/// have any effects besides calculating the result and does not have
|
||||
/// undefined behavior.
|
||||
|
Reference in New Issue
Block a user