2002-08-22 20:25:20 +02:00
|
|
|
//===- llvm/Analysis/AliasAnalysis.h - Alias Analysis Interface -*- C++ -*-===//
|
2005-04-21 22:19:05 +02:00
|
|
|
//
|
2003-10-20 22:19:47 +02:00
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
2007-12-29 20:59:42 +01:00
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
2005-04-21 22:19:05 +02:00
|
|
|
//
|
2003-10-20 22:19:47 +02:00
|
|
|
//===----------------------------------------------------------------------===//
|
2002-08-22 20:25:20 +02:00
|
|
|
//
|
|
|
|
// This file defines the generic AliasAnalysis interface, which is used as the
|
|
|
|
// common interface used by all clients of alias analysis information, and
|
2003-02-26 20:24:47 +01:00
|
|
|
// implemented by all alias analysis implementations. Mod/Ref information is
|
|
|
|
// also captured by this interface.
|
2002-08-22 20:25:20 +02:00
|
|
|
//
|
|
|
|
// Implementations of this interface must implement the various virtual methods,
|
|
|
|
// which automatically provides functionality for the entire suite of client
|
|
|
|
// APIs.
|
|
|
|
//
|
2003-02-26 20:24:47 +01:00
|
|
|
// This API represents memory as a (Pointer, Size) pair. The Pointer component
|
|
|
|
// specifies the base memory address of the region, the Size specifies how large
|
|
|
|
// of an area is being queried. If Size is 0, two pointers only alias if they
|
|
|
|
// are exactly equal. If size is greater than zero, but small, the two pointers
|
|
|
|
// alias if the areas pointed to overlap. If the size is very large (ie, ~0U),
|
|
|
|
// then the two pointers alias if they may be pointing to components of the same
|
|
|
|
// memory object. Pointers that point to two completely different objects in
|
|
|
|
// memory never alias, regardless of the value of the Size component.
|
|
|
|
//
|
2002-08-22 20:25:20 +02:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef LLVM_ANALYSIS_ALIAS_ANALYSIS_H
|
|
|
|
#define LLVM_ANALYSIS_ALIAS_ANALYSIS_H
|
|
|
|
|
2003-02-26 20:24:47 +01:00
|
|
|
#include "llvm/Support/CallSite.h"
|
2006-07-26 18:18:00 +02:00
|
|
|
#include "llvm/System/IncludeFile.h"
|
2007-02-12 06:00:35 +01:00
|
|
|
#include <vector>
|
2003-11-11 23:41:34 +01:00
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
|
2003-02-26 20:24:47 +01:00
|
|
|
class LoadInst;
|
|
|
|
class StoreInst;
|
2005-06-20 17:24:23 +02:00
|
|
|
class VAArgInst;
|
2003-02-26 20:24:47 +01:00
|
|
|
class TargetData;
|
2006-06-07 22:00:19 +02:00
|
|
|
class Pass;
|
|
|
|
class AnalysisUsage;
|
2003-02-26 20:24:47 +01:00
|
|
|
|
|
|
|
class AliasAnalysis {
|
|
|
|
protected:
|
2004-05-23 23:12:38 +02:00
|
|
|
const TargetData *TD;
|
|
|
|
AliasAnalysis *AA; // Previous Alias Analysis to chain to.
|
|
|
|
|
2003-02-26 20:24:47 +01:00
|
|
|
/// InitializeAliasAnalysis - Subclasses must call this method to initialize
|
|
|
|
/// the AliasAnalysis interface before any other methods are called. This is
|
|
|
|
/// typically called by the run* methods of these subclasses. This may be
|
|
|
|
/// called multiple times.
|
|
|
|
///
|
|
|
|
void InitializeAliasAnalysis(Pass *P);
|
2005-04-21 22:19:05 +02:00
|
|
|
|
2008-05-30 02:01:36 +02:00
|
|
|
/// getAnalysisUsage - All alias analysis implementations should invoke this
|
2009-07-25 02:48:42 +02:00
|
|
|
/// directly (using AliasAnalysis::getAnalysisUsage(AU)).
|
2003-02-26 20:24:47 +01:00
|
|
|
virtual void getAnalysisUsage(AnalysisUsage &AU) const;
|
|
|
|
|
|
|
|
public:
|
2007-05-03 03:11:54 +02:00
|
|
|
static char ID; // Class identification, replacement for typeinfo
|
2004-05-23 23:12:38 +02:00
|
|
|
AliasAnalysis() : TD(0), AA(0) {}
|
2003-02-26 20:24:47 +01:00
|
|
|
virtual ~AliasAnalysis(); // We want to be subclassed
|
|
|
|
|
2009-07-25 02:48:42 +02:00
|
|
|
/// getTargetData - Return a pointer to the current TargetData object, or
|
|
|
|
/// null if no TargetData object is available.
|
2004-03-12 00:08:20 +01:00
|
|
|
///
|
2009-07-25 02:48:42 +02:00
|
|
|
const TargetData *getTargetData() const { return TD; }
|
|
|
|
|
|
|
|
/// getTypeStoreSize - Return the TargetData store size for the given type,
|
|
|
|
/// if known, or a conservative value otherwise.
|
|
|
|
///
|
|
|
|
unsigned getTypeStoreSize(const Type *Ty);
|
2002-08-22 20:25:20 +02:00
|
|
|
|
2003-02-26 20:24:47 +01:00
|
|
|
//===--------------------------------------------------------------------===//
|
|
|
|
/// Alias Queries...
|
|
|
|
///
|
2002-08-22 20:25:20 +02:00
|
|
|
|
2002-08-22 23:22:25 +02:00
|
|
|
/// Alias analysis result - Either we know for sure that it does not alias, we
|
|
|
|
/// know for sure it must alias, or we don't know anything: The two pointers
|
|
|
|
/// _might_ alias. This enum is designed so you can do things like:
|
|
|
|
/// if (AA.alias(P1, P2)) { ... }
|
|
|
|
/// to check to see if two pointers might alias.
|
|
|
|
///
|
2003-02-26 20:24:47 +01:00
|
|
|
enum AliasResult { NoAlias = 0, MayAlias = 1, MustAlias = 2 };
|
2002-08-22 20:25:20 +02:00
|
|
|
|
2002-08-22 23:22:25 +02:00
|
|
|
/// alias - The main low level interface to the alias analysis implementation.
|
|
|
|
/// Returns a Result indicating whether the two pointers are aliased to each
|
|
|
|
/// other. This is the interface that must be implemented by specific alias
|
|
|
|
/// analysis implementations.
|
|
|
|
///
|
2003-02-26 20:24:47 +01:00
|
|
|
virtual AliasResult alias(const Value *V1, unsigned V1Size,
|
2004-05-23 23:12:38 +02:00
|
|
|
const Value *V2, unsigned V2Size);
|
2002-08-22 20:25:20 +02:00
|
|
|
|
2009-11-23 17:38:54 +01:00
|
|
|
/// isNoAlias - A trivial helper function to check to see if the specified
|
|
|
|
/// pointers are no-alias.
|
|
|
|
bool isNoAlias(const Value *V1, unsigned V1Size,
|
|
|
|
const Value *V2, unsigned V2Size) {
|
|
|
|
return alias(V1, V1Size, V2, V2Size) == NoAlias;
|
|
|
|
}
|
|
|
|
|
2004-01-30 23:15:41 +01:00
|
|
|
/// pointsToConstantMemory - If the specified pointer is known to point into
|
|
|
|
/// constant global memory, return true. This allows disambiguation of store
|
|
|
|
/// instructions from constant pointers.
|
|
|
|
///
|
2004-05-23 23:12:38 +02:00
|
|
|
virtual bool pointsToConstantMemory(const Value *P);
|
2003-06-29 02:23:11 +02:00
|
|
|
|
2004-12-15 08:21:39 +01:00
|
|
|
//===--------------------------------------------------------------------===//
|
|
|
|
/// Simple mod/ref information...
|
|
|
|
///
|
|
|
|
|
|
|
|
/// ModRefResult - Represent the result of a mod/ref query. Mod and Ref are
|
|
|
|
/// bits which may be or'd together.
|
|
|
|
///
|
|
|
|
enum ModRefResult { NoModRef = 0, Ref = 1, Mod = 2, ModRef = 3 };
|
2005-04-21 22:19:05 +02:00
|
|
|
|
|
|
|
|
2004-12-15 08:21:39 +01:00
|
|
|
/// ModRefBehavior - Summary of how a function affects memory in the program.
|
|
|
|
/// Loads from constant globals are not considered memory accesses for this
|
|
|
|
/// interface. Also, functions may freely modify stack space local to their
|
|
|
|
/// invocation without having to report it through these interfaces.
|
|
|
|
enum ModRefBehavior {
|
|
|
|
// DoesNotAccessMemory - This function does not perform any non-local loads
|
|
|
|
// or stores to memory.
|
|
|
|
//
|
|
|
|
// This property corresponds to the GCC 'const' attribute.
|
|
|
|
DoesNotAccessMemory,
|
2005-04-21 22:19:05 +02:00
|
|
|
|
2009-02-13 18:36:13 +01:00
|
|
|
// AccessesArguments - This function accesses function arguments in well
|
|
|
|
// known (possibly volatile) ways, but does not access any other memory.
|
2004-12-15 08:21:39 +01:00
|
|
|
//
|
2008-12-05 06:35:21 +01:00
|
|
|
// Clients may use the Info parameter of getModRefBehavior to get specific
|
|
|
|
// information about how pointer arguments are used.
|
2004-12-15 08:21:39 +01:00
|
|
|
AccessesArguments,
|
2005-04-21 22:19:05 +02:00
|
|
|
|
2004-12-15 08:21:39 +01:00
|
|
|
// AccessesArgumentsAndGlobals - This function has accesses function
|
2009-02-13 18:36:13 +01:00
|
|
|
// arguments and global variables well known (possibly volatile) ways, but
|
2004-12-15 08:21:39 +01:00
|
|
|
// does not access any other memory.
|
|
|
|
//
|
2008-12-05 06:35:21 +01:00
|
|
|
// Clients may use the Info parameter of getModRefBehavior to get specific
|
|
|
|
// information about how pointer arguments are used.
|
2004-12-15 08:21:39 +01:00
|
|
|
AccessesArgumentsAndGlobals,
|
2005-04-21 22:19:05 +02:00
|
|
|
|
2004-12-15 08:21:39 +01:00
|
|
|
// OnlyReadsMemory - This function does not perform any non-local stores or
|
|
|
|
// volatile loads, but may read from any memory location.
|
|
|
|
//
|
|
|
|
// This property corresponds to the GCC 'pure' attribute.
|
|
|
|
OnlyReadsMemory,
|
2005-04-21 22:19:05 +02:00
|
|
|
|
2004-12-15 08:21:39 +01:00
|
|
|
// UnknownModRefBehavior - This indicates that the function could not be
|
|
|
|
// classified into one of the behaviors above.
|
|
|
|
UnknownModRefBehavior
|
|
|
|
};
|
2005-04-21 22:19:05 +02:00
|
|
|
|
2004-12-15 08:21:39 +01:00
|
|
|
/// PointerAccessInfo - This struct is used to return results for pointers,
|
|
|
|
/// globals, and the return value of a function.
|
|
|
|
struct PointerAccessInfo {
|
|
|
|
/// V - The value this record corresponds to. This may be an Argument for
|
|
|
|
/// the function, a GlobalVariable, or null, corresponding to the return
|
|
|
|
/// value for the function.
|
|
|
|
Value *V;
|
2005-04-21 22:19:05 +02:00
|
|
|
|
2004-12-15 08:21:39 +01:00
|
|
|
/// ModRefInfo - Whether the pointer is loaded or stored to/from.
|
|
|
|
///
|
|
|
|
ModRefResult ModRefInfo;
|
2005-04-21 22:19:05 +02:00
|
|
|
|
2004-12-15 08:21:39 +01:00
|
|
|
/// AccessType - Specific fine-grained access information for the argument.
|
|
|
|
/// If none of these classifications is general enough, the
|
|
|
|
/// getModRefBehavior method should not return AccessesArguments*. If a
|
|
|
|
/// record is not returned for a particular argument, the argument is never
|
|
|
|
/// dead and never dereferenced.
|
|
|
|
enum AccessType {
|
|
|
|
/// ScalarAccess - The pointer is dereferenced.
|
|
|
|
///
|
|
|
|
ScalarAccess,
|
2005-04-21 22:19:05 +02:00
|
|
|
|
2004-12-15 08:21:39 +01:00
|
|
|
/// ArrayAccess - The pointer is indexed through as an array of elements.
|
|
|
|
///
|
|
|
|
ArrayAccess,
|
2005-04-21 22:19:05 +02:00
|
|
|
|
2004-12-15 08:21:39 +01:00
|
|
|
/// ElementAccess ?? P->F only?
|
2005-04-21 22:19:05 +02:00
|
|
|
|
2004-12-15 08:21:39 +01:00
|
|
|
/// CallsThrough - Indirect calls are made through the specified function
|
|
|
|
/// pointer.
|
2006-02-22 17:23:43 +01:00
|
|
|
CallsThrough
|
2004-12-15 08:21:39 +01:00
|
|
|
};
|
2005-04-21 22:19:05 +02:00
|
|
|
};
|
|
|
|
|
2007-12-01 08:51:45 +01:00
|
|
|
/// getModRefBehavior - Return the behavior when calling the given call site.
|
2009-02-06 00:36:27 +01:00
|
|
|
virtual ModRefBehavior getModRefBehavior(CallSite CS,
|
2007-12-01 08:51:45 +01:00
|
|
|
std::vector<PointerAccessInfo> *Info = 0);
|
|
|
|
|
|
|
|
/// getModRefBehavior - Return the behavior when calling the given function.
|
|
|
|
/// For use when the call site is not known.
|
2009-02-06 00:36:27 +01:00
|
|
|
virtual ModRefBehavior getModRefBehavior(Function *F,
|
2007-12-01 08:51:45 +01:00
|
|
|
std::vector<PointerAccessInfo> *Info = 0);
|
|
|
|
|
2010-01-06 09:45:52 +01:00
|
|
|
/// getModRefBehavior - Return the modref behavior of the intrinsic with the
|
|
|
|
/// given id.
|
|
|
|
static ModRefBehavior getModRefBehavior(unsigned iid);
|
|
|
|
|
2007-12-01 08:51:45 +01:00
|
|
|
/// doesNotAccessMemory - If the specified call is known to never read or
|
|
|
|
/// write memory, return true. If the call only reads from known-constant
|
|
|
|
/// memory, it is also legal to return true. Calls that unwind the stack
|
|
|
|
/// are legal for this predicate.
|
2004-03-15 02:58:54 +01:00
|
|
|
///
|
2007-12-01 08:51:45 +01:00
|
|
|
/// Many optimizations (such as CSE and LICM) can be performed on such calls
|
|
|
|
/// without worrying about aliasing properties, and many calls have this
|
|
|
|
/// property (e.g. calls to 'sin' and 'cos').
|
2004-03-15 02:58:54 +01:00
|
|
|
///
|
|
|
|
/// This property corresponds to the GCC 'const' attribute.
|
|
|
|
///
|
2008-05-31 00:47:19 +02:00
|
|
|
bool doesNotAccessMemory(CallSite CS) {
|
|
|
|
return getModRefBehavior(CS) == DoesNotAccessMemory;
|
2007-12-01 08:51:45 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/// doesNotAccessMemory - If the specified function is known to never read or
|
|
|
|
/// write memory, return true. For use when the call site is not known.
|
|
|
|
///
|
2004-12-15 08:21:39 +01:00
|
|
|
bool doesNotAccessMemory(Function *F) {
|
2007-12-01 08:51:45 +01:00
|
|
|
return getModRefBehavior(F) == DoesNotAccessMemory;
|
2004-12-15 08:21:39 +01:00
|
|
|
}
|
2004-03-15 02:58:54 +01:00
|
|
|
|
2007-12-01 08:51:45 +01:00
|
|
|
/// onlyReadsMemory - If the specified call is known to only read from
|
|
|
|
/// non-volatile memory (or not access memory at all), return true. Calls
|
|
|
|
/// that unwind the stack are legal for this predicate.
|
2004-03-15 02:58:54 +01:00
|
|
|
///
|
|
|
|
/// This property allows many common optimizations to be performed in the
|
|
|
|
/// absence of interfering store instructions, such as CSE of strlen calls.
|
|
|
|
///
|
|
|
|
/// This property corresponds to the GCC 'pure' attribute.
|
|
|
|
///
|
2008-05-31 00:47:19 +02:00
|
|
|
bool onlyReadsMemory(CallSite CS) {
|
|
|
|
ModRefBehavior MRB = getModRefBehavior(CS);
|
2007-12-01 08:51:45 +01:00
|
|
|
return MRB == DoesNotAccessMemory || MRB == OnlyReadsMemory;
|
|
|
|
}
|
|
|
|
|
|
|
|
/// onlyReadsMemory - If the specified function is known to only read from
|
|
|
|
/// non-volatile memory (or not access memory at all), return true. For use
|
|
|
|
/// when the call site is not known.
|
|
|
|
///
|
2004-12-15 08:21:39 +01:00
|
|
|
bool onlyReadsMemory(Function *F) {
|
2007-12-01 08:51:45 +01:00
|
|
|
ModRefBehavior MRB = getModRefBehavior(F);
|
2005-03-24 00:27:34 +01:00
|
|
|
return MRB == DoesNotAccessMemory || MRB == OnlyReadsMemory;
|
2004-12-15 08:21:39 +01:00
|
|
|
}
|
2002-08-22 20:25:20 +02:00
|
|
|
|
2003-02-26 20:24:47 +01:00
|
|
|
|
|
|
|
/// getModRefInfo - Return information about whether or not an instruction may
|
|
|
|
/// read or write memory specified by the pointer operand. An instruction
|
|
|
|
/// that doesn't read or write memory may be trivially LICM'd for example.
|
|
|
|
|
|
|
|
/// getModRefInfo (for call sites) - Return whether information about whether
|
|
|
|
/// a particular call site modifies or reads the memory specified by the
|
|
|
|
/// pointer.
|
|
|
|
///
|
2008-05-31 00:47:19 +02:00
|
|
|
virtual ModRefResult getModRefInfo(CallSite CS, Value *P, unsigned Size);
|
2003-02-26 20:24:47 +01:00
|
|
|
|
|
|
|
/// getModRefInfo - Return information about whether two call sites may refer
|
|
|
|
/// to the same set of memory locations. This function returns NoModRef if
|
2004-04-11 18:42:50 +02:00
|
|
|
/// the two calls refer to disjoint memory locations, Ref if CS1 reads memory
|
|
|
|
/// written by CS2, Mod if CS1 writes to memory read or written by CS2, or
|
|
|
|
/// ModRef if CS1 might read or write memory accessed by CS2.
|
2003-02-26 20:24:47 +01:00
|
|
|
///
|
2008-05-31 00:47:19 +02:00
|
|
|
virtual ModRefResult getModRefInfo(CallSite CS1, CallSite CS2);
|
2003-02-26 20:24:47 +01:00
|
|
|
|
2007-12-01 08:51:45 +01:00
|
|
|
public:
|
2003-02-26 20:24:47 +01:00
|
|
|
/// Convenience functions...
|
|
|
|
ModRefResult getModRefInfo(LoadInst *L, Value *P, unsigned Size);
|
2004-03-15 05:07:59 +01:00
|
|
|
ModRefResult getModRefInfo(StoreInst *S, Value *P, unsigned Size);
|
|
|
|
ModRefResult getModRefInfo(CallInst *C, Value *P, unsigned Size) {
|
2003-02-26 20:24:47 +01:00
|
|
|
return getModRefInfo(CallSite(C), P, Size);
|
|
|
|
}
|
2004-03-15 05:07:59 +01:00
|
|
|
ModRefResult getModRefInfo(InvokeInst *I, Value *P, unsigned Size) {
|
2003-02-26 20:24:47 +01:00
|
|
|
return getModRefInfo(CallSite(I), P, Size);
|
|
|
|
}
|
2005-06-20 17:24:23 +02:00
|
|
|
ModRefResult getModRefInfo(VAArgInst* I, Value* P, unsigned Size) {
|
2007-11-02 05:01:21 +01:00
|
|
|
return AliasAnalysis::ModRef;
|
2005-06-20 17:24:23 +02:00
|
|
|
}
|
2003-02-26 20:24:47 +01:00
|
|
|
ModRefResult getModRefInfo(Instruction *I, Value *P, unsigned Size) {
|
|
|
|
switch (I->getOpcode()) {
|
2005-06-20 17:24:23 +02:00
|
|
|
case Instruction::VAArg: return getModRefInfo((VAArgInst*)I, P, Size);
|
2003-02-26 20:24:47 +01:00
|
|
|
case Instruction::Load: return getModRefInfo((LoadInst*)I, P, Size);
|
|
|
|
case Instruction::Store: return getModRefInfo((StoreInst*)I, P, Size);
|
|
|
|
case Instruction::Call: return getModRefInfo((CallInst*)I, P, Size);
|
|
|
|
case Instruction::Invoke: return getModRefInfo((InvokeInst*)I, P, Size);
|
|
|
|
default: return NoModRef;
|
|
|
|
}
|
|
|
|
}
|
2002-08-22 20:25:20 +02:00
|
|
|
|
2004-05-23 23:12:38 +02:00
|
|
|
//===--------------------------------------------------------------------===//
|
|
|
|
/// Higher level methods for querying mod/ref information.
|
|
|
|
///
|
|
|
|
|
2002-08-22 23:22:25 +02:00
|
|
|
/// canBasicBlockModify - Return true if it is possible for execution of the
|
|
|
|
/// specified basic block to modify the value pointed to by Ptr.
|
|
|
|
///
|
2003-02-26 20:24:47 +01:00
|
|
|
bool canBasicBlockModify(const BasicBlock &BB, const Value *P, unsigned Size);
|
2002-08-22 20:25:20 +02:00
|
|
|
|
2002-08-22 23:22:25 +02:00
|
|
|
/// canInstructionRangeModify - Return true if it is possible for the
|
|
|
|
/// execution of the specified instructions to modify the value pointed to by
|
|
|
|
/// Ptr. The instructions to consider are all of the instructions in the
|
|
|
|
/// range of [I1,I2] INCLUSIVE. I1 and I2 must be in the same basic block.
|
|
|
|
///
|
2002-08-22 20:25:20 +02:00
|
|
|
bool canInstructionRangeModify(const Instruction &I1, const Instruction &I2,
|
2003-02-26 20:24:47 +01:00
|
|
|
const Value *Ptr, unsigned Size);
|
2004-05-23 23:12:38 +02:00
|
|
|
|
|
|
|
//===--------------------------------------------------------------------===//
|
|
|
|
/// Methods that clients should call when they transform the program to allow
|
|
|
|
/// alias analyses to update their internal data structures. Note that these
|
|
|
|
/// methods may be called on any instruction, regardless of whether or not
|
|
|
|
/// they have pointer-analysis implications.
|
|
|
|
///
|
|
|
|
|
|
|
|
/// deleteValue - This method should be called whenever an LLVM Value is
|
|
|
|
/// deleted from the program, for example when an instruction is found to be
|
|
|
|
/// redundant and is eliminated.
|
|
|
|
///
|
|
|
|
virtual void deleteValue(Value *V);
|
|
|
|
|
|
|
|
/// copyValue - This method should be used whenever a preexisting value in the
|
|
|
|
/// program is copied or cloned, introducing a new value. Note that analysis
|
|
|
|
/// implementations should tolerate clients that use this method to introduce
|
|
|
|
/// the same value multiple times: if the analysis already knows about a
|
|
|
|
/// value, it should ignore the request.
|
|
|
|
///
|
|
|
|
virtual void copyValue(Value *From, Value *To);
|
|
|
|
|
|
|
|
/// replaceWithNewValue - This method is the obvious combination of the two
|
|
|
|
/// above, and it provided as a helper to simplify client code.
|
|
|
|
///
|
|
|
|
void replaceWithNewValue(Value *Old, Value *New) {
|
|
|
|
copyValue(Old, New);
|
|
|
|
deleteValue(Old);
|
|
|
|
}
|
2002-08-22 20:25:20 +02:00
|
|
|
};
|
|
|
|
|
2009-02-03 02:28:32 +01:00
|
|
|
/// isNoAliasCall - Return true if this pointer is returned by a noalias
|
|
|
|
/// function.
|
|
|
|
bool isNoAliasCall(const Value *V);
|
|
|
|
|
2009-01-30 03:49:14 +01:00
|
|
|
/// isIdentifiedObject - Return true if this pointer refers to a distinct and
|
2009-02-03 02:28:32 +01:00
|
|
|
/// identifiable object. This returns true for:
|
2009-08-27 19:52:56 +02:00
|
|
|
/// Global Variables and Functions (but not Global Aliases)
|
2009-02-03 02:28:32 +01:00
|
|
|
/// Allocas and Mallocs
|
|
|
|
/// ByVal and NoAlias Arguments
|
|
|
|
/// NoAlias returns
|
2009-01-30 03:49:14 +01:00
|
|
|
///
|
|
|
|
bool isIdentifiedObject(const Value *V);
|
|
|
|
|
2006-06-08 00:00:26 +02:00
|
|
|
} // End llvm namespace
|
|
|
|
|
2003-12-11 06:05:02 +01:00
|
|
|
// Because of the way .a files work, we must force the BasicAA implementation to
|
|
|
|
// be pulled in if the AliasAnalysis header is included. Otherwise we run
|
|
|
|
// the risk of AliasAnalysis being used, but the default implementation not
|
|
|
|
// being linked into the tool that uses it.
|
2006-06-08 00:00:26 +02:00
|
|
|
FORCE_DEFINING_FILE_TO_BE_LINKED(AliasAnalysis)
|
|
|
|
FORCE_DEFINING_FILE_TO_BE_LINKED(BasicAliasAnalysis)
|
2003-11-11 23:41:34 +01:00
|
|
|
|
2002-08-22 20:25:20 +02:00
|
|
|
#endif
|