Skip to content

Commit 1e586bc

Browse files
committed
Move function definition out-of-line to fix the modularized build (NFC)
1 parent b69374c commit 1e586bc

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

llvm/include/llvm/CodeGen/MIRSampleProfile.h

+1-8
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,7 @@ class MIRProfileLoaderPass : public MachineFunctionPass {
5353
/// FS bits will only use the '1' bits in the Mask.
5454
MIRProfileLoaderPass(std::string FileName = "",
5555
std::string RemappingFileName = "",
56-
FSDiscriminatorPass P = FSDiscriminatorPass::Pass1)
57-
: MachineFunctionPass(ID), ProfileFileName(FileName), P(P),
58-
MIRSampleLoader(
59-
std::make_unique<MIRProfileLoader>(FileName, RemappingFileName)) {
60-
LowBit = getFSPassBitBegin(P);
61-
HighBit = getFSPassBitEnd(P);
62-
assert(LowBit < HighBit && "HighBit needs to be greater than Lowbit");
63-
}
56+
FSDiscriminatorPass P = FSDiscriminatorPass::Pass1);
6457

6558
/// getMachineFunction - Return the last machine function computed.
6659
const MachineFunction *getMachineFunction() const { return MF; }

llvm/lib/CodeGen/MIRSampleProfile.cpp

+11
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,17 @@ bool MIRProfileLoader::runOnFunction(MachineFunction &MF) {
286286

287287
} // namespace llvm
288288

289+
MIRProfileLoaderPass::MIRProfileLoaderPass(std::string FileName,
290+
std::string RemappingFileName,
291+
FSDiscriminatorPass P)
292+
: MachineFunctionPass(ID), ProfileFileName(FileName), P(P),
293+
MIRSampleLoader(
294+
std::make_unique<MIRProfileLoader>(FileName, RemappingFileName)) {
295+
LowBit = getFSPassBitBegin(P);
296+
HighBit = getFSPassBitEnd(P);
297+
assert(LowBit < HighBit && "HighBit needs to be greater than Lowbit");
298+
}
299+
289300
bool MIRProfileLoaderPass::runOnMachineFunction(MachineFunction &MF) {
290301
if (!MIRSampleLoader->isValid())
291302
return false;

0 commit comments

Comments
 (0)