Move function definition out-of-line to fix the modularized build (NFC)
authorAdrian Prantl <aprantl@apple.com>
Thu, 19 Aug 2021 19:24:36 +0000 (12:24 -0700)
committerAdrian Prantl <aprantl@apple.com>
Thu, 19 Aug 2021 19:26:23 +0000 (12:26 -0700)
llvm/include/llvm/CodeGen/MIRSampleProfile.h
llvm/lib/CodeGen/MIRSampleProfile.cpp

index 7872daf..9a36003 100644 (file)
@@ -53,14 +53,7 @@ public:
   /// FS bits will only use the '1' bits in the Mask.
   MIRProfileLoaderPass(std::string FileName = "",
                        std::string RemappingFileName = "",
-                       FSDiscriminatorPass P = FSDiscriminatorPass::Pass1)
-      : MachineFunctionPass(ID), ProfileFileName(FileName), P(P),
-        MIRSampleLoader(
-            std::make_unique<MIRProfileLoader>(FileName, RemappingFileName)) {
-    LowBit = getFSPassBitBegin(P);
-    HighBit = getFSPassBitEnd(P);
-    assert(LowBit < HighBit && "HighBit needs to be greater than Lowbit");
-  }
+                       FSDiscriminatorPass P = FSDiscriminatorPass::Pass1);
 
   /// getMachineFunction - Return the last machine function computed.
   const MachineFunction *getMachineFunction() const { return MF; }
index f4f8d13..d4abc4a 100644 (file)
@@ -286,6 +286,17 @@ bool MIRProfileLoader::runOnFunction(MachineFunction &MF) {
 
 } // namespace llvm
 
+MIRProfileLoaderPass::MIRProfileLoaderPass(std::string FileName,
+                                           std::string RemappingFileName,
+                                           FSDiscriminatorPass P)
+    : MachineFunctionPass(ID), ProfileFileName(FileName), P(P),
+      MIRSampleLoader(
+          std::make_unique<MIRProfileLoader>(FileName, RemappingFileName)) {
+  LowBit = getFSPassBitBegin(P);
+  HighBit = getFSPassBitEnd(P);
+  assert(LowBit < HighBit && "HighBit needs to be greater than Lowbit");
+}
+
 bool MIRProfileLoaderPass::runOnMachineFunction(MachineFunction &MF) {
   if (!MIRSampleLoader->isValid())
     return false;