[llvm] 9ff10a0 - [NVPTX] Add missing pass names
Igor Kudrin via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 12 07:58:47 PDT 2022
Author: Igor Kudrin
Date: 2022-07-12T07:58:13-07:00
New Revision: 9ff10a0d6278c1298ff6a966bb0481ad688eaf06
URL: https://github.com/llvm/llvm-project/commit/9ff10a0d6278c1298ff6a966bb0481ad688eaf06
DIFF: https://github.com/llvm/llvm-project/commit/9ff10a0d6278c1298ff6a966bb0481ad688eaf06.diff
LOG: [NVPTX] Add missing pass names
Differential Revision:
Added:
llvm/test/CodeGen/NVPTX/pass-name.ll
Modified:
llvm/lib/Target/NVPTX/NVPTXImageOptimizer.cpp
llvm/lib/Target/NVPTX/NVPTXPrologEpilogPass.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/NVPTX/NVPTXImageOptimizer.cpp b/llvm/lib/Target/NVPTX/NVPTXImageOptimizer.cpp
index eeedce2d99cb0..202134ed7035a 100644
--- a/llvm/lib/Target/NVPTX/NVPTXImageOptimizer.cpp
+++ b/llvm/lib/Target/NVPTX/NVPTXImageOptimizer.cpp
@@ -35,6 +35,8 @@ class NVPTXImageOptimizer : public FunctionPass {
bool runOnFunction(Function &F) override;
+ StringRef getPassName() const override { return "NVPTX Image Optimizer"; }
+
private:
bool replaceIsTypePSampler(Instruction &I);
bool replaceIsTypePSurface(Instruction &I);
diff --git a/llvm/lib/Target/NVPTX/NVPTXPrologEpilogPass.cpp b/llvm/lib/Target/NVPTX/NVPTXPrologEpilogPass.cpp
index 16fbe1a65562b..7929bd2e0df08 100644
--- a/llvm/lib/Target/NVPTX/NVPTXPrologEpilogPass.cpp
+++ b/llvm/lib/Target/NVPTX/NVPTXPrologEpilogPass.cpp
@@ -36,6 +36,8 @@ class NVPTXPrologEpilogPass : public MachineFunctionPass {
bool runOnMachineFunction(MachineFunction &MF) override;
+ StringRef getPassName() const override { return "NVPTX Prolog Epilog Pass"; }
+
private:
void calculateFrameObjectOffsets(MachineFunction &Fn);
};
diff --git a/llvm/test/CodeGen/NVPTX/pass-name.ll b/llvm/test/CodeGen/NVPTX/pass-name.ll
new file mode 100644
index 0000000000000..77fc97902772c
--- /dev/null
+++ b/llvm/test/CodeGen/NVPTX/pass-name.ll
@@ -0,0 +1,3 @@
+; Check that all passes have names
+; RUN: llc %s -march=nvptx64 -O3 --debug-pass=Structure -o /dev/null 2>&1 | FileCheck %s
+; CHECK-NOT: Unnamed pass
More information about the llvm-commits
mailing list