2002-08-22 18:25:20 +00:00
|
|
|
//===- llvm/Analysis/BasicAliasAnalysis.h - Alias Analysis Impl -*- C++ -*-===//
|
|
|
|
//
|
2002-08-29 20:08:39 +00:00
|
|
|
// This file defines the default implementation of the Alias Analysis interface
|
|
|
|
// that simply implements a few identities (two different globals cannot alias,
|
|
|
|
// etc), but otherwise does no analysis.
|
2002-08-22 18:25:20 +00:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef LLVM_ANALYSIS_BASIC_ALIAS_ANALYSIS_H
|
|
|
|
#define LLVM_ANALYSIS_BASIC_ALIAS_ANALYSIS_H
|
|
|
|
|
|
|
|
#include "llvm/Analysis/AliasAnalysis.h"
|
|
|
|
#include "llvm/Pass.h"
|
|
|
|
|
2002-09-25 22:00:18 +00:00
|
|
|
struct BasicAliasAnalysis : public ImmutablePass, public AliasAnalysis {
|
2002-09-25 22:27:54 +00:00
|
|
|
|
2002-08-22 18:25:20 +00:00
|
|
|
// alias - This is the only method here that does anything interesting...
|
|
|
|
//
|
2002-11-06 17:17:55 +00:00
|
|
|
Result alias(const Value *V1, const Value *V2);
|
2002-08-22 18:25:20 +00:00
|
|
|
|
2002-08-22 22:46:20 +00:00
|
|
|
/// canCallModify - We are not interprocedural, so we do nothing exciting.
|
|
|
|
///
|
2002-11-06 17:17:55 +00:00
|
|
|
Result canCallModify(const CallInst &CI, const Value *Ptr) {
|
2002-08-22 18:25:20 +00:00
|
|
|
return MayAlias;
|
|
|
|
}
|
|
|
|
|
2002-08-22 22:46:20 +00:00
|
|
|
/// canInvokeModify - We are not interprocedural, so we do nothing exciting.
|
|
|
|
///
|
2002-11-06 17:17:55 +00:00
|
|
|
Result canInvokeModify(const InvokeInst &I, const Value *Ptr) {
|
2002-08-22 18:25:20 +00:00
|
|
|
return MayAlias; // We are not interprocedural
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|