[llvm-commits] CVS: llvm/lib/Analysis/BasicAliasAnalysis.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sat Jun 19 03:13:03 PDT 2004
Changes in directory llvm/lib/Analysis:
BasicAliasAnalysis.cpp updated: 1.43 -> 1.44
---
Log message:
Fix a tiny bug in the -no-aa pass, in which it did not ever get a target data.
This is a regression from 1.2, though noone uses -no-aa anyway
---
Diffs of the changes: (+8 -9)
Index: llvm/lib/Analysis/BasicAliasAnalysis.cpp
diff -u llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.43 llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.44
--- llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.43 Tue Jun 15 16:51:38 2004
+++ llvm/lib/Analysis/BasicAliasAnalysis.cpp Sat Jun 19 03:05:58 2004
@@ -42,6 +42,14 @@
/// such it doesn't follow many of the rules that other alias analyses must.
///
struct NoAA : public ImmutablePass, public AliasAnalysis {
+ virtual void getAnalysisUsage(AnalysisUsage &AU) const {
+ AU.addRequired<TargetData>();
+ }
+
+ virtual void initializePass() {
+ TD = &getAnalysis<TargetData>();
+ }
+
virtual AliasResult alias(const Value *V1, unsigned V1Size,
const Value *V2, unsigned V2Size) {
return MayAlias;
@@ -61,7 +69,6 @@
virtual void deleteValue(Value *V) {}
virtual void copyValue(Value *From, Value *To) {}
- virtual void getAnalysisUsage(AnalysisUsage &AU) const {}
};
// Register this pass...
@@ -78,14 +85,6 @@
/// Because it doesn't chain to a previous alias analysis (like -no-aa), it
/// derives from the NoAA class.
struct BasicAliasAnalysis : public NoAA {
- virtual void getAnalysisUsage(AnalysisUsage &AU) const {
- AU.addRequired<TargetData>();
- }
-
- virtual void initializePass() {
- TD = &getAnalysis<TargetData>();
- }
-
AliasResult alias(const Value *V1, unsigned V1Size,
const Value *V2, unsigned V2Size);
More information about the llvm-commits
mailing list