[llvm] f2b5d81 - [SampleFDO] Add pass name strings for the passes (NFC)

Rong Xu via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 18 16:23:47 PST 2021


Author: Rong Xu
Date: 2021-11-18T16:10:04-08:00
New Revision: f2b5d81f62c71212cc16f7eb8f02fad4f1956908

URL: https://github.com/llvm/llvm-project/commit/f2b5d81f62c71212cc16f7eb8f02fad4f1956908
DIFF: https://github.com/llvm/llvm-project/commit/f2b5d81f62c71212cc16f7eb8f02fad4f1956908.diff

LOG: [SampleFDO] Add pass name strings for the passes (NFC)

Added: 
    

Modified: 
    llvm/include/llvm/CodeGen/MIRFSDiscriminator.h
    llvm/include/llvm/CodeGen/MIRSampleProfile.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/CodeGen/MIRFSDiscriminator.h b/llvm/include/llvm/CodeGen/MIRFSDiscriminator.h
index 6137411b6dbae..deb6b37a9bcfe 100644
--- a/llvm/include/llvm/CodeGen/MIRFSDiscriminator.h
+++ b/llvm/include/llvm/CodeGen/MIRFSDiscriminator.h
@@ -57,6 +57,10 @@ class MIRAddFSDiscriminators : public MachineFunctionPass {
     assert(LowBit < HighBit && "HighBit needs to be greater than Lowbit");
   }
 
+  StringRef getPassName() const override {
+    return "Add FS discriminators in MIR";
+  }
+
   /// getNumFSBBs() - Return the number of machine BBs that have FS samples.
   unsigned getNumFSBBs();
 

diff  --git a/llvm/include/llvm/CodeGen/MIRSampleProfile.h b/llvm/include/llvm/CodeGen/MIRSampleProfile.h
index 9a360032c5296..2503524ccfdf6 100644
--- a/llvm/include/llvm/CodeGen/MIRSampleProfile.h
+++ b/llvm/include/llvm/CodeGen/MIRSampleProfile.h
@@ -58,6 +58,8 @@ class MIRProfileLoaderPass : public MachineFunctionPass {
   /// getMachineFunction - Return the last machine function computed.
   const MachineFunction *getMachineFunction() const { return MF; }
 
+  StringRef getPassName() const override { return "SampleFDO loader in MIR"; }
+
 private:
   void init(MachineFunction &MF);
   bool runOnMachineFunction(MachineFunction &) override;


        


More information about the llvm-commits mailing list