[llvm] 1e586bc - Move function definition out-of-line to fix the modularized build (NFC)
Adrian Prantl via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 19 12:26:30 PDT 2021
Author: Adrian Prantl
Date: 2021-08-19T12:26:23-07:00
New Revision: 1e586bcc3e9b4ad83178a46c3591abe85c0c4f46
URL: https://github.com/llvm/llvm-project/commit/1e586bcc3e9b4ad83178a46c3591abe85c0c4f46
DIFF: https://github.com/llvm/llvm-project/commit/1e586bcc3e9b4ad83178a46c3591abe85c0c4f46.diff
LOG: Move function definition out-of-line to fix the modularized build (NFC)
Added:
Modified:
llvm/include/llvm/CodeGen/MIRSampleProfile.h
llvm/lib/CodeGen/MIRSampleProfile.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/CodeGen/MIRSampleProfile.h b/llvm/include/llvm/CodeGen/MIRSampleProfile.h
index 7872daf3a54c6..9a360032c5296 100644
--- a/llvm/include/llvm/CodeGen/MIRSampleProfile.h
+++ b/llvm/include/llvm/CodeGen/MIRSampleProfile.h
@@ -53,14 +53,7 @@ class MIRProfileLoaderPass : public MachineFunctionPass {
/// 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; }
diff --git a/llvm/lib/CodeGen/MIRSampleProfile.cpp b/llvm/lib/CodeGen/MIRSampleProfile.cpp
index f4f8d138515ee..d4abc4af6a2e1 100644
--- a/llvm/lib/CodeGen/MIRSampleProfile.cpp
+++ b/llvm/lib/CodeGen/MIRSampleProfile.cpp
@@ -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;
More information about the llvm-commits
mailing list