aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Analysis/AliasAnalysis.h
diff options
context:
space:
mode:
authorStephen Hines <srhines@google.com>2012-09-10 16:47:31 -0700
committerStephen Hines <srhines@google.com>2012-09-10 16:47:31 -0700
commit1c4ad5ef4fab105f0c8af7edd026e00502fb6279 (patch)
treecb5bdfd58f776d00be450d0a5585f8f0186585da /include/llvm/Analysis/AliasAnalysis.h
parentd62cdbe700ab288e9ad447824066edb7d17167d9 (diff)
parent1dc2591e9ef0730612902f94976ce85bed6859de (diff)
downloadexternal_llvm-1c4ad5ef4fab105f0c8af7edd026e00502fb6279.zip
external_llvm-1c4ad5ef4fab105f0c8af7edd026e00502fb6279.tar.gz
external_llvm-1c4ad5ef4fab105f0c8af7edd026e00502fb6279.tar.bz2
Merge branch 'upstream' into merge-2012_09_10
Conflicts: lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp lib/Support/DynamicLibrary.cpp lib/Support/LockFileManager.cpp Change-Id: I91e94c3a7a76e19c688307c5a480a640a3bd2b7e
Diffstat (limited to 'include/llvm/Analysis/AliasAnalysis.h')
-rw-r--r--include/llvm/Analysis/AliasAnalysis.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/include/llvm/Analysis/AliasAnalysis.h b/include/llvm/Analysis/AliasAnalysis.h
index 674868a..f587220 100644
--- a/include/llvm/Analysis/AliasAnalysis.h
+++ b/include/llvm/Analysis/AliasAnalysis.h
@@ -46,6 +46,7 @@ class LoadInst;
class StoreInst;
class VAArgInst;
class TargetData;
+class TargetLibraryInfo;
class Pass;
class AnalysisUsage;
class MemTransferInst;
@@ -55,6 +56,7 @@ class DominatorTree;
class AliasAnalysis {
protected:
const TargetData *TD;
+ const TargetLibraryInfo *TLI;
private:
AliasAnalysis *AA; // Previous Alias Analysis to chain to.
@@ -73,7 +75,7 @@ protected:
public:
static char ID; // Class identification, replacement for typeinfo
- AliasAnalysis() : TD(0), AA(0) {}
+ AliasAnalysis() : TD(0), TLI(0), AA(0) {}
virtual ~AliasAnalysis(); // We want to be subclassed
/// UnknownSize - This is a special value which can be used with the
@@ -86,6 +88,11 @@ public:
///
const TargetData *getTargetData() const { return TD; }
+ /// getTargetLibraryInfo - Return a pointer to the current TargetLibraryInfo
+ /// object, or null if no TargetLibraryInfo object is available.
+ ///
+ const TargetLibraryInfo *getTargetLibraryInfo() const { return TLI; }
+
/// getTypeStoreSize - Return the TargetData store size for the given type,
/// if known, or a conservative value otherwise.
///
@@ -187,6 +194,11 @@ public:
return isNoAlias(Location(V1, V1Size), Location(V2, V2Size));
}
+ /// isNoAlias - A convenience wrapper.
+ bool isNoAlias(const Value *V1, const Value *V2) {
+ return isNoAlias(Location(V1), Location(V2));
+ }
+
/// isMustAlias - A convenience wrapper.
bool isMustAlias(const Location &LocA, const Location &LocB) {
return alias(LocA, LocB) == MustAlias;