aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis/AliasAnalysisCounter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Analysis/AliasAnalysisCounter.cpp')
-rw-r--r--lib/Analysis/AliasAnalysisCounter.cpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/lib/Analysis/AliasAnalysisCounter.cpp b/lib/Analysis/AliasAnalysisCounter.cpp
index 9f4a47c..2e3bc55 100644
--- a/lib/Analysis/AliasAnalysisCounter.cpp
+++ b/lib/Analysis/AliasAnalysisCounter.cpp
@@ -14,7 +14,6 @@
#include "llvm/Analysis/Passes.h"
#include "llvm/Analysis/AliasAnalysis.h"
-#include "llvm/Assembly/Writer.h"
#include "llvm/Pass.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
@@ -75,13 +74,13 @@ namespace {
}
}
- bool runOnModule(Module &M) {
+ bool runOnModule(Module &M) override {
this->M = &M;
InitializeAliasAnalysis(this);
return false;
}
- virtual void getAnalysisUsage(AnalysisUsage &AU) const {
+ void getAnalysisUsage(AnalysisUsage &AU) const override {
AliasAnalysis::getAnalysisUsage(AU);
AU.addRequired<AliasAnalysis>();
AU.setPreservesAll();
@@ -91,25 +90,25 @@ namespace {
/// an analysis interface through multiple inheritance. If needed, it
/// should override this to adjust the this pointer as needed for the
/// specified pass info.
- virtual void *getAdjustedAnalysisPointer(AnalysisID PI) {
+ void *getAdjustedAnalysisPointer(AnalysisID PI) override {
if (PI == &AliasAnalysis::ID)
return (AliasAnalysis*)this;
return this;
}
// FIXME: We could count these too...
- bool pointsToConstantMemory(const Location &Loc, bool OrLocal) {
+ bool pointsToConstantMemory(const Location &Loc, bool OrLocal) override {
return getAnalysis<AliasAnalysis>().pointsToConstantMemory(Loc, OrLocal);
}
// Forwarding functions: just delegate to a real AA implementation, counting
// the number of responses...
- AliasResult alias(const Location &LocA, const Location &LocB);
+ AliasResult alias(const Location &LocA, const Location &LocB) override;
ModRefResult getModRefInfo(ImmutableCallSite CS,
- const Location &Loc);
+ const Location &Loc) override;
ModRefResult getModRefInfo(ImmutableCallSite CS1,
- ImmutableCallSite CS2) {
+ ImmutableCallSite CS2) override {
return AliasAnalysis::getModRefInfo(CS1,CS2);
}
};
@@ -138,10 +137,10 @@ AliasAnalysisCounter::alias(const Location &LocA, const Location &LocB) {
if (PrintAll || (PrintAllFailures && R == MayAlias)) {
errs() << AliasString << ":\t";
errs() << "[" << LocA.Size << "B] ";
- WriteAsOperand(errs(), LocA.Ptr, true, M);
+ LocA.Ptr->printAsOperand(errs(), true, M);
errs() << ", ";
errs() << "[" << LocB.Size << "B] ";
- WriteAsOperand(errs(), LocB.Ptr, true, M);
+ LocB.Ptr->printAsOperand(errs(), true, M);
errs() << "\n";
}
@@ -164,7 +163,7 @@ AliasAnalysisCounter::getModRefInfo(ImmutableCallSite CS,
if (PrintAll || (PrintAllFailures && R == ModRef)) {
errs() << MRString << ": Ptr: ";
errs() << "[" << Loc.Size << "B] ";
- WriteAsOperand(errs(), Loc.Ptr, true, M);
+ Loc.Ptr->printAsOperand(errs(), true, M);
errs() << "\t<->" << *CS.getInstruction() << '\n';
}
return R;