aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-07-25 00:48:42 +0000
committerDan Gohman <gohman@apple.com>2009-07-25 00:48:42 +0000
commit624f961f7f3ccfe311da31d51271ca7cfa4dc9ba (patch)
tree9fe2f2a8710310b2c62877dd3dec1b60ae471bf8 /include
parent7c8e5731d1a6a1a1f8313b7d3a02163b485f19e0 (diff)
downloadexternal_llvm-624f961f7f3ccfe311da31d51271ca7cfa4dc9ba.zip
external_llvm-624f961f7f3ccfe311da31d51271ca7cfa4dc9ba.tar.gz
external_llvm-624f961f7f3ccfe311da31d51271ca7cfa4dc9ba.tar.bz2
Make AliasAnalysis and related classes use
getAnalysisIfAvailable<TargetData>(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77028 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Analysis/AliasAnalysis.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/include/llvm/Analysis/AliasAnalysis.h b/include/llvm/Analysis/AliasAnalysis.h
index ba040e1..54006ae 100644
--- a/include/llvm/Analysis/AliasAnalysis.h
+++ b/include/llvm/Analysis/AliasAnalysis.h
@@ -56,8 +56,7 @@ protected:
void InitializeAliasAnalysis(Pass *P);
/// getAnalysisUsage - All alias analysis implementations should invoke this
- /// directly (using AliasAnalysis::getAnalysisUsage(AU)) to make sure that
- /// TargetData is required by the pass.
+ /// directly (using AliasAnalysis::getAnalysisUsage(AU)).
virtual void getAnalysisUsage(AnalysisUsage &AU) const;
public:
@@ -65,11 +64,15 @@ public:
AliasAnalysis() : TD(0), AA(0) {}
virtual ~AliasAnalysis(); // We want to be subclassed
- /// getTargetData - Every alias analysis implementation depends on the size of
- /// data items in the current Target. This provides a uniform way to handle
- /// it.
+ /// getTargetData - Return a pointer to the current TargetData object, or
+ /// null if no TargetData object is available.
///
- const TargetData &getTargetData() const { return *TD; }
+ 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);
//===--------------------------------------------------------------------===//
/// Alias Queries...