1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-23 13:02:52 +02:00
llvm-mirror/include/llvm/Analysis/BasicAliasAnalysis.h
Chris Lattner 5545ec0631 Fix comments
llvm-svn: 3523
2002-08-29 20:08:39 +00:00

45 lines
1.4 KiB
C++

//===- llvm/Analysis/BasicAliasAnalysis.h - Alias Analysis Impl -*- C++ -*-===//
//
// 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.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_ANALYSIS_BASIC_ALIAS_ANALYSIS_H
#define LLVM_ANALYSIS_BASIC_ALIAS_ANALYSIS_H
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Pass.h"
struct BasicAliasAnalysis : public FunctionPass, public AliasAnalysis {
// Pass Implementation stuff. This isn't much of a pass.
//
bool runOnFunction(Function &) { return false; }
// getAnalysisUsage - Does not modify anything.
//
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.setPreservesAll();
}
// alias - This is the only method here that does anything interesting...
//
Result alias(const Value *V1, const Value *V2) const;
/// canCallModify - We are not interprocedural, so we do nothing exciting.
///
Result canCallModify(const CallInst &CI, const Value *Ptr) const {
return MayAlias;
}
/// canInvokeModify - We are not interprocedural, so we do nothing exciting.
///
Result canInvokeModify(const InvokeInst &I, const Value *Ptr) const {
return MayAlias; // We are not interprocedural
}
};
#endif