[PATCH] D129508: [NVPTX] Add missing pass names

Igor Kudrin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 11 12:01:43 PDT 2022


ikudrin created this revision.
ikudrin added reviewers: tra, jholewinski.
ikudrin added a project: LLVM.
Herald added subscribers: mattd, gchakrabarti, hiraditya.
Herald added a project: All.
ikudrin requested review of this revision.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D129508

Files:
  llvm/lib/Target/NVPTX/NVPTXImageOptimizer.cpp
  llvm/lib/Target/NVPTX/NVPTXPrologEpilogPass.cpp
  llvm/test/CodeGen/NVPTX/pass-name.ll


Index: llvm/test/CodeGen/NVPTX/pass-name.ll
===================================================================
--- /dev/null
+++ 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
Index: llvm/lib/Target/NVPTX/NVPTXPrologEpilogPass.cpp
===================================================================
--- llvm/lib/Target/NVPTX/NVPTXPrologEpilogPass.cpp
+++ llvm/lib/Target/NVPTX/NVPTXPrologEpilogPass.cpp
@@ -36,6 +36,8 @@
 
   bool runOnMachineFunction(MachineFunction &MF) override;
 
+  StringRef getPassName() const override { return "NVPTX Prolog Epilog Pass"; }
+
 private:
   void calculateFrameObjectOffsets(MachineFunction &Fn);
 };
Index: llvm/lib/Target/NVPTX/NVPTXImageOptimizer.cpp
===================================================================
--- llvm/lib/Target/NVPTX/NVPTXImageOptimizer.cpp
+++ llvm/lib/Target/NVPTX/NVPTXImageOptimizer.cpp
@@ -35,6 +35,8 @@
 
   bool runOnFunction(Function &F) override;
 
+  StringRef getPassName() const override { return "NVPTX Image Optimizer"; }
+
 private:
   bool replaceIsTypePSampler(Instruction &I);
   bool replaceIsTypePSurface(Instruction &I);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129508.443706.patch
Type: text/x-patch
Size: 1272 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220711/6034b008/attachment.bin>


More information about the llvm-commits mailing list