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:
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...
/// isIdentifiedObject - Return true if this pointer refers to a distinct and
/// identifiable object. This returns true for:
-/// Global Variables and Functions
+/// Global Variables and Functions (but not Global Aliases)
/// Allocas and Mallocs
/// ByVal and NoAlias Arguments
/// NoAlias returns