[llvm] 458ae53 - [AST] Remove legacy AliasSetPrinter pass
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 14 06:50:46 PST 2022
Author: Nikita Popov
Date: 2022-11-14T15:50:38+01:00
New Revision: 458ae539dffd0ec2c02d3f4121b65b54bfd655ab
URL: https://github.com/llvm/llvm-project/commit/458ae539dffd0ec2c02d3f4121b65b54bfd655ab
DIFF: https://github.com/llvm/llvm-project/commit/458ae539dffd0ec2c02d3f4121b65b54bfd655ab.diff
LOG: [AST] Remove legacy AliasSetPrinter pass
A NewPM version of this pass exists, drop the legacy version of
this testing-only pass.
Added:
Modified:
llvm/include/llvm/InitializePasses.h
llvm/lib/Analysis/AliasSetTracker.cpp
llvm/lib/Analysis/Analysis.cpp
llvm/test/Analysis/AliasSet/argmemonly.ll
llvm/test/Analysis/AliasSet/guards.ll
llvm/test/Analysis/AliasSet/intrinsics.ll
llvm/test/Analysis/AliasSet/memset.ll
llvm/test/Analysis/AliasSet/memtransfer.ll
llvm/test/Analysis/AliasSet/saturation.ll
llvm/test/Transforms/LoopVectorize/pr25281.ll
Removed:
################################################################################
diff --git a/llvm/include/llvm/InitializePasses.h b/llvm/include/llvm/InitializePasses.h
index ff8aa807dfaa..fc796f89a28e 100644
--- a/llvm/include/llvm/InitializePasses.h
+++ b/llvm/include/llvm/InitializePasses.h
@@ -57,7 +57,6 @@ void initializeADCELegacyPassPass(PassRegistry&);
void initializeAddDiscriminatorsLegacyPassPass(PassRegistry&);
void initializeAddFSDiscriminatorsPass(PassRegistry &);
void initializeAggressiveInstCombinerLegacyPassPass(PassRegistry&);
-void initializeAliasSetPrinterPass(PassRegistry&);
void initializeAlignmentFromAssumptionsPass(PassRegistry&);
void initializeAlwaysInlinerLegacyPassPass(PassRegistry&);
void initializeAssumeSimplifyPassLegacyPassPass(PassRegistry &);
diff --git a/llvm/lib/Analysis/AliasSetTracker.cpp b/llvm/lib/Analysis/AliasSetTracker.cpp
index f092713a9b3c..24bcb8a2ba02 100644
--- a/llvm/lib/Analysis/AliasSetTracker.cpp
+++ b/llvm/lib/Analysis/AliasSetTracker.cpp
@@ -698,42 +698,6 @@ AliasSetTracker::ASTCallbackVH::operator=(Value *V) {
// AliasSetPrinter Pass
//===----------------------------------------------------------------------===//
-namespace {
-
- class AliasSetPrinter : public FunctionPass {
- public:
- static char ID; // Pass identification, replacement for typeid
-
- AliasSetPrinter() : FunctionPass(ID) {
- initializeAliasSetPrinterPass(*PassRegistry::getPassRegistry());
- }
-
- void getAnalysisUsage(AnalysisUsage &AU) const override {
- AU.setPreservesAll();
- AU.addRequired<AAResultsWrapperPass>();
- }
-
- bool runOnFunction(Function &F) override {
- auto &AAWP = getAnalysis<AAResultsWrapperPass>();
- AliasSetTracker Tracker(AAWP.getAAResults());
- errs() << "Alias sets for function '" << F.getName() << "':\n";
- for (Instruction &I : instructions(F))
- Tracker.add(&I);
- Tracker.print(errs());
- return false;
- }
- };
-
-} // end anonymous namespace
-
-char AliasSetPrinter::ID = 0;
-
-INITIALIZE_PASS_BEGIN(AliasSetPrinter, "print-alias-sets",
- "Alias Set Printer", false, true)
-INITIALIZE_PASS_DEPENDENCY(AAResultsWrapperPass)
-INITIALIZE_PASS_END(AliasSetPrinter, "print-alias-sets",
- "Alias Set Printer", false, true)
-
AliasSetsPrinterPass::AliasSetsPrinterPass(raw_ostream &OS) : OS(OS) {}
PreservedAnalyses AliasSetsPrinterPass::run(Function &F,
diff --git a/llvm/lib/Analysis/Analysis.cpp b/llvm/lib/Analysis/Analysis.cpp
index e7257052f6ba..500fa09ce298 100644
--- a/llvm/lib/Analysis/Analysis.cpp
+++ b/llvm/lib/Analysis/Analysis.cpp
@@ -20,7 +20,6 @@ using namespace llvm;
/// initializeAnalysis - Initialize all passes linked into the Analysis library.
void llvm::initializeAnalysis(PassRegistry &Registry) {
initializeAAEvalLegacyPassPass(Registry);
- initializeAliasSetPrinterPass(Registry);
initializeBasicAAWrapperPassPass(Registry);
initializeBlockFrequencyInfoWrapperPassPass(Registry);
initializeBranchProbabilityInfoWrapperPassPass(Registry);
diff --git a/llvm/test/Analysis/AliasSet/argmemonly.ll b/llvm/test/Analysis/AliasSet/argmemonly.ll
index 81d2dd89ab0c..eea153cb271b 100644
--- a/llvm/test/Analysis/AliasSet/argmemonly.ll
+++ b/llvm/test/Analysis/AliasSet/argmemonly.ll
@@ -1,4 +1,4 @@
-; RUN: opt -print-alias-sets -S -o - < %s 2>&1 | FileCheck %s
+; RUN: opt -passes=print-alias-sets -S -o - < %s 2>&1 | FileCheck %s
@s = global i8 1, align 1
@d = global i8 2, align 1
diff --git a/llvm/test/Analysis/AliasSet/guards.ll b/llvm/test/Analysis/AliasSet/guards.ll
index d8440db50b89..edff37e2fdff 100644
--- a/llvm/test/Analysis/AliasSet/guards.ll
+++ b/llvm/test/Analysis/AliasSet/guards.ll
@@ -1,4 +1,3 @@
-; RUN: opt -print-alias-sets -S -o - < %s 2>&1 | FileCheck %s
; RUN: opt -aa-pipeline=basic-aa -passes=print-alias-sets -S -o - < %s 2>&1 | FileCheck %s
declare void @llvm.experimental.guard(i1, ...)
diff --git a/llvm/test/Analysis/AliasSet/intrinsics.ll b/llvm/test/Analysis/AliasSet/intrinsics.ll
index 590c67170a3b..a74d9fa5f7e7 100644
--- a/llvm/test/Analysis/AliasSet/intrinsics.ll
+++ b/llvm/test/Analysis/AliasSet/intrinsics.ll
@@ -1,4 +1,4 @@
-; RUN: opt -print-alias-sets -S -o - < %s 2>&1 | FileCheck %s
+; RUN: opt -passes=print-alias-sets -S -o - < %s 2>&1 | FileCheck %s
; CHECK: Alias sets for function 'test1':
; CHECK: Alias Set Tracker: 2 alias sets for 2 pointer values.
diff --git a/llvm/test/Analysis/AliasSet/memset.ll b/llvm/test/Analysis/AliasSet/memset.ll
index 672610fbae1a..579ac8eb3731 100644
--- a/llvm/test/Analysis/AliasSet/memset.ll
+++ b/llvm/test/Analysis/AliasSet/memset.ll
@@ -1,4 +1,4 @@
-; RUN: opt -print-alias-sets -S -o - < %s 2>&1 | FileCheck %s
+; RUN: opt -passes=print-alias-sets -S -o - < %s 2>&1 | FileCheck %s
@s = global i8 1, align 1
@d = global i8 2, align 1
diff --git a/llvm/test/Analysis/AliasSet/memtransfer.ll b/llvm/test/Analysis/AliasSet/memtransfer.ll
index 0088736c7055..4bece2f95917 100644
--- a/llvm/test/Analysis/AliasSet/memtransfer.ll
+++ b/llvm/test/Analysis/AliasSet/memtransfer.ll
@@ -1,4 +1,4 @@
-; RUN: opt -print-alias-sets -S -o - < %s 2>&1 | FileCheck %s
+; RUN: opt -passes=print-alias-sets -S -o - < %s 2>&1 | FileCheck %s
@s = global i8 1, align 1
@d = global i8 2, align 1
diff --git a/llvm/test/Analysis/AliasSet/saturation.ll b/llvm/test/Analysis/AliasSet/saturation.ll
index a70e57f2d81a..f7cb651712bf 100644
--- a/llvm/test/Analysis/AliasSet/saturation.ll
+++ b/llvm/test/Analysis/AliasSet/saturation.ll
@@ -1,5 +1,5 @@
-; RUN: opt -print-alias-sets -alias-set-saturation-threshold=2 -S -o - < %s 2>&1 | FileCheck %s --check-prefix=CHECK --check-prefix=NOSAT
-; RUN: opt -print-alias-sets -alias-set-saturation-threshold=1 -S -o - < %s 2>&1 | FileCheck %s --check-prefix=CHECK --check-prefix=SAT
+; RUN: opt -passes=print-alias-sets -alias-set-saturation-threshold=2 -S -o - < %s 2>&1 | FileCheck %s --check-prefix=CHECK --check-prefix=NOSAT
+; RUN: opt -passes=print-alias-sets -alias-set-saturation-threshold=1 -S -o - < %s 2>&1 | FileCheck %s --check-prefix=CHECK --check-prefix=SAT
; CHECK-LABEL: 'allmust'
; CHECK: AliasSet[{{.*}}, 1] must alias, Mod Pointers: (i32* %a, LocationSize::precise(4))
diff --git a/llvm/test/Transforms/LoopVectorize/pr25281.ll b/llvm/test/Transforms/LoopVectorize/pr25281.ll
index db30eae833fd..d062b4689d59 100644
--- a/llvm/test/Transforms/LoopVectorize/pr25281.ll
+++ b/llvm/test/Transforms/LoopVectorize/pr25281.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -aa-pipeline=scev-aa -loop-vectorize -print-alias-sets -S -o - 2>&1 | FileCheck %s
+; RUN: opt < %s -aa-pipeline=scev-aa -passes=loop-vectorize,print-alias-sets -S -o - 2>&1 | FileCheck %s
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
; PR25281
More information about the llvm-commits
mailing list