1 //===- llvm/Analysis/BasicAliasAnalysis.h - Alias Analysis Impl -*- C++ -*-===//
3 // This file defines the default implementation of the Alias Analysis interface
4 // that simply implements a few identities (two different globals cannot alias,
5 // etc), but otherwise does no analysis.
7 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_ANALYSIS_BASIC_ALIAS_ANALYSIS_H
10 #define LLVM_ANALYSIS_BASIC_ALIAS_ANALYSIS_H
12 #include "llvm/Analysis/AliasAnalysis.h"
13 #include "llvm/Pass.h"
15 struct BasicAliasAnalysis : public ImmutablePass, public AliasAnalysis {
17 // alias - This is the only method here that does anything interesting...
19 Result alias(const Value *V1, const Value *V2) const;
21 /// canCallModify - We are not interprocedural, so we do nothing exciting.
23 Result canCallModify(const CallInst &CI, const Value *Ptr) const {
27 /// canInvokeModify - We are not interprocedural, so we do nothing exciting.
29 Result canInvokeModify(const InvokeInst &I, const Value *Ptr) const {
30 return MayAlias; // We are not interprocedural