Skip to content

Commit 5650352

Browse files
committed
[llvm] Add vfs::FileSystem to PassBuilder (llvm#160188)
Some LLVM passes need access to the filesystem to read configuration files and similar. In some places, this is achieved by grabbing the VFS from `PGOOptions`, but some passes don't have access to these and resort to just calling `vfs::getRealFileSystem()`. This PR allows setting the VFS directly on `PassBuilder` that's able to pass it down to all passes that need it.
1 parent 5454304 commit 5650352

File tree

12 files changed

+80
-98
lines changed

12 files changed

+80
-98
lines changed

clang/lib/CodeGen/BackendUtil.cpp

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -803,7 +803,8 @@ static void addSanitizers(const Triple &TargetTriple,
803803
HWASanPass(SanitizerKind::KernelHWAddress, true);
804804

805805
if (LangOpts.Sanitize.has(SanitizerKind::DataFlow)) {
806-
MPM.addPass(DataFlowSanitizerPass(LangOpts.NoSanitizeFiles));
806+
MPM.addPass(DataFlowSanitizerPass(LangOpts.NoSanitizeFiles,
807+
PB.getVirtualFileSystemPtr()));
807808
}
808809
};
809810
if (ClSanitizeOnOptimizerEarlyEP) {
@@ -855,9 +856,9 @@ void EmitAssemblyHelper::RunOptimizationPipeline(
855856
if (CodeGenOpts.hasProfileIRInstr())
856857
// -fprofile-generate.
857858
PGOOpt = PGOOptions(getProfileGenName(CodeGenOpts), "", "",
858-
CodeGenOpts.MemoryProfileUsePath, nullptr,
859-
PGOOptions::IRInstr, PGOOptions::NoCSAction,
860-
ClPGOColdFuncAttr, CodeGenOpts.DebugInfoForProfiling,
859+
CodeGenOpts.MemoryProfileUsePath, PGOOptions::IRInstr,
860+
PGOOptions::NoCSAction, ClPGOColdFuncAttr,
861+
CodeGenOpts.DebugInfoForProfiling,
861862
/*PseudoProbeForProfiling=*/false,
862863
CodeGenOpts.AtomicProfileUpdate);
863864
else if (CodeGenOpts.hasProfileIRUse()) {
@@ -866,32 +867,30 @@ void EmitAssemblyHelper::RunOptimizationPipeline(
866867
: PGOOptions::NoCSAction;
867868
PGOOpt = PGOOptions(CodeGenOpts.ProfileInstrumentUsePath, "",
868869
CodeGenOpts.ProfileRemappingFile,
869-
CodeGenOpts.MemoryProfileUsePath, VFS,
870-
PGOOptions::IRUse, CSAction, ClPGOColdFuncAttr,
870+
CodeGenOpts.MemoryProfileUsePath, PGOOptions::IRUse,
871+
CSAction, ClPGOColdFuncAttr,
871872
CodeGenOpts.DebugInfoForProfiling);
872873
} else if (!CodeGenOpts.SampleProfileFile.empty())
873874
// -fprofile-sample-use
874875
PGOOpt = PGOOptions(
875876
CodeGenOpts.SampleProfileFile, "", CodeGenOpts.ProfileRemappingFile,
876-
CodeGenOpts.MemoryProfileUsePath, VFS, PGOOptions::SampleUse,
877+
CodeGenOpts.MemoryProfileUsePath, PGOOptions::SampleUse,
877878
PGOOptions::NoCSAction, ClPGOColdFuncAttr,
878879
CodeGenOpts.DebugInfoForProfiling, CodeGenOpts.PseudoProbeForProfiling);
879880
else if (!CodeGenOpts.MemoryProfileUsePath.empty())
880881
// -fmemory-profile-use (without any of the above options)
881-
PGOOpt = PGOOptions("", "", "", CodeGenOpts.MemoryProfileUsePath, VFS,
882+
PGOOpt = PGOOptions("", "", "", CodeGenOpts.MemoryProfileUsePath,
882883
PGOOptions::NoAction, PGOOptions::NoCSAction,
883884
ClPGOColdFuncAttr, CodeGenOpts.DebugInfoForProfiling);
884885
else if (CodeGenOpts.PseudoProbeForProfiling)
885886
// -fpseudo-probe-for-profiling
886-
PGOOpt =
887-
PGOOptions("", "", "", /*MemoryProfile=*/"", nullptr,
888-
PGOOptions::NoAction, PGOOptions::NoCSAction,
889-
ClPGOColdFuncAttr, CodeGenOpts.DebugInfoForProfiling, true);
887+
PGOOpt = PGOOptions("", "", "", /*MemoryProfile=*/"", PGOOptions::NoAction,
888+
PGOOptions::NoCSAction, ClPGOColdFuncAttr,
889+
CodeGenOpts.DebugInfoForProfiling, true);
890890
else if (CodeGenOpts.DebugInfoForProfiling)
891891
// -fdebug-info-for-profiling
892-
PGOOpt = PGOOptions("", "", "", /*MemoryProfile=*/"", nullptr,
893-
PGOOptions::NoAction, PGOOptions::NoCSAction,
894-
ClPGOColdFuncAttr, true);
892+
PGOOpt = PGOOptions("", "", "", /*MemoryProfile=*/"", PGOOptions::NoAction,
893+
PGOOptions::NoCSAction, ClPGOColdFuncAttr, true);
895894

896895
// Check to see if we want to generate a CS profile.
897896
if (CodeGenOpts.hasProfileCSIRInstr()) {
@@ -907,7 +906,7 @@ void EmitAssemblyHelper::RunOptimizationPipeline(
907906
PGOOpt->CSAction = PGOOptions::CSIRInstr;
908907
} else
909908
PGOOpt = PGOOptions("", getProfileGenName(CodeGenOpts), "",
910-
/*MemoryProfile=*/"", nullptr, PGOOptions::NoAction,
909+
/*MemoryProfile=*/"", PGOOptions::NoAction,
911910
PGOOptions::CSIRInstr, ClPGOColdFuncAttr,
912911
CodeGenOpts.DebugInfoForProfiling);
913912
}
@@ -943,7 +942,7 @@ void EmitAssemblyHelper::RunOptimizationPipeline(
943942
(CodeGenOpts.DebugPassManager || DebugPassStructure),
944943
CodeGenOpts.VerifyEach, PrintPassOpts);
945944
SI.registerCallbacks(PIC, &MAM);
946-
PassBuilder PB(TM.get(), PTO, PGOOpt, &PIC);
945+
PassBuilder PB(TM.get(), PTO, PGOOpt, &PIC, CI.getVirtualFileSystemPtr());
947946

948947
// Handle the assignment tracking feature options.
949948
switch (CodeGenOpts.getAssignmentTrackingMode()) {

flang/lib/Frontend/FrontendActions.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -926,20 +926,18 @@ void CodeGenAction::runOptimizationPipeline(llvm::raw_pwrite_stream &os) {
926926
pgoOpt = llvm::PGOOptions(opts.InstrProfileOutput.empty()
927927
? llvm::driver::getDefaultProfileGenName()
928928
: opts.InstrProfileOutput,
929-
"", "", opts.MemoryProfileUsePath, nullptr,
929+
"", "", opts.MemoryProfileUsePath,
930930
llvm::PGOOptions::IRInstr,
931931
llvm::PGOOptions::NoCSAction,
932932
llvm::PGOOptions::ColdFuncOpt::Default, false,
933933
/*PseudoProbeForProfiling=*/false, false);
934934
} else if (opts.hasProfileIRUse()) {
935-
llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> VFS =
936-
llvm::vfs::getRealFileSystem();
937935
// -fprofile-use.
938936
auto CSAction = opts.hasProfileCSIRUse() ? llvm::PGOOptions::CSIRUse
939937
: llvm::PGOOptions::NoCSAction;
940938
pgoOpt = llvm::PGOOptions(
941939
opts.ProfileInstrumentUsePath, "", opts.ProfileRemappingFile,
942-
opts.MemoryProfileUsePath, VFS, llvm::PGOOptions::IRUse, CSAction,
940+
opts.MemoryProfileUsePath, llvm::PGOOptions::IRUse, CSAction,
943941
llvm::PGOOptions::ColdFuncOpt::Default, false);
944942
}
945943

llvm/include/llvm/Passes/PassBuilder.h

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@ class StringRef;
3636
class AAManager;
3737
class TargetMachine;
3838
class ModuleSummaryIndex;
39-
template <typename T> class IntrusiveRefCntPtr;
40-
namespace vfs {
41-
class FileSystem;
42-
} // namespace vfs
4339

4440
/// Tunable parameters for passes in the default pipelines.
4541
class PipelineTuningOptions {
@@ -113,6 +109,7 @@ class PassBuilder {
113109
PipelineTuningOptions PTO;
114110
std::optional<PGOOptions> PGOOpt;
115111
PassInstrumentationCallbacks *PIC;
112+
IntrusiveRefCntPtr<vfs::FileSystem> FS;
116113

117114
public:
118115
/// A struct to capture parsed pass pipeline names.
@@ -132,7 +129,8 @@ class PassBuilder {
132129
TargetMachine *TM = nullptr,
133130
PipelineTuningOptions PTO = PipelineTuningOptions(),
134131
std::optional<PGOOptions> PGOOpt = std::nullopt,
135-
PassInstrumentationCallbacks *PIC = nullptr);
132+
PassInstrumentationCallbacks *PIC = nullptr,
133+
IntrusiveRefCntPtr<vfs::FileSystem> FS = vfs::getRealFileSystem());
136134

137135
/// Cross register the analysis managers through their proxies.
138136
///
@@ -634,15 +632,19 @@ class PassBuilder {
634632
bool RunProfileGen, bool IsCS,
635633
bool AtomicCounterUpdate,
636634
std::string ProfileFile,
637-
std::string ProfileRemappingFile,
638-
IntrusiveRefCntPtr<vfs::FileSystem> FS);
635+
std::string ProfileRemappingFile);
639636

640637
/// Returns PIC. External libraries can use this to register pass
641638
/// instrumentation callbacks.
642639
PassInstrumentationCallbacks *getPassInstrumentationCallbacks() const {
643640
return PIC;
644641
}
645642

643+
/// Returns the virtual file system.
644+
IntrusiveRefCntPtr<vfs::FileSystem> getVirtualFileSystemPtr() const {
645+
return FS;
646+
}
647+
646648
// Invoke the callbacks registered for the various extension points.
647649
// Custom pipelines should use these to invoke the callbacks registered
648650
// by TargetMachines and other clients.
@@ -774,8 +776,7 @@ class PassBuilder {
774776
void addPGOInstrPasses(ModulePassManager &MPM, OptimizationLevel Level,
775777
bool RunProfileGen, bool IsCS,
776778
bool AtomicCounterUpdate, std::string ProfileFile,
777-
std::string ProfileRemappingFile,
778-
IntrusiveRefCntPtr<vfs::FileSystem> FS);
779+
std::string ProfileRemappingFile);
779780
void addPostPGOLoopRotation(ModulePassManager &MPM, OptimizationLevel Level);
780781

781782
bool isInstrumentedPGOUse() const;

llvm/include/llvm/Support/PGOOptions.h

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,26 +14,18 @@
1414
#ifndef LLVM_SUPPORT_PGOOPTIONS_H
1515
#define LLVM_SUPPORT_PGOOPTIONS_H
1616

17-
#include "llvm/ADT/IntrusiveRefCntPtr.h"
1817
#include "llvm/Support/Compiler.h"
1918
#include "llvm/Support/Error.h"
2019

2120
namespace llvm {
22-
23-
namespace vfs {
24-
class FileSystem;
25-
} // namespace vfs
26-
2721
/// A struct capturing PGO tunables.
2822
struct PGOOptions {
2923
enum PGOAction { NoAction, IRInstr, IRUse, SampleUse };
3024
enum CSPGOAction { NoCSAction, CSIRInstr, CSIRUse };
3125
enum class ColdFuncOpt { Default, OptSize, MinSize, OptNone };
3226
LLVM_ABI PGOOptions(std::string ProfileFile, std::string CSProfileGenFile,
3327
std::string ProfileRemappingFile,
34-
std::string MemoryProfile,
35-
IntrusiveRefCntPtr<vfs::FileSystem> FS,
36-
PGOAction Action = NoAction,
28+
std::string MemoryProfile, PGOAction Action = NoAction,
3729
CSPGOAction CSAction = NoCSAction,
3830
ColdFuncOpt ColdType = ColdFuncOpt::Default,
3931
bool DebugInfoForProfiling = false,
@@ -53,7 +45,6 @@ struct PGOOptions {
5345
bool DebugInfoForProfiling;
5446
bool PseudoProbeForProfiling;
5547
bool AtomicCounterUpdate;
56-
IntrusiveRefCntPtr<vfs::FileSystem> FS;
5748
};
5849
} // namespace llvm
5950

llvm/include/llvm/Transforms/Instrumentation/DataFlowSanitizer.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
#include "llvm/IR/PassManager.h"
1212
#include "llvm/Support/Compiler.h"
13+
#include "llvm/Support/VirtualFileSystem.h"
1314
#include <string>
1415
#include <vector>
1516

@@ -19,11 +20,13 @@ class Module;
1920
class DataFlowSanitizerPass : public PassInfoMixin<DataFlowSanitizerPass> {
2021
private:
2122
std::vector<std::string> ABIListFiles;
23+
IntrusiveRefCntPtr<vfs::FileSystem> FS;
2224

2325
public:
2426
DataFlowSanitizerPass(
25-
const std::vector<std::string> &ABIListFiles = std::vector<std::string>())
26-
: ABIListFiles(ABIListFiles) {}
27+
const std::vector<std::string> &ABIListFiles = std::vector<std::string>(),
28+
IntrusiveRefCntPtr<vfs::FileSystem> FS = vfs::getRealFileSystem())
29+
: ABIListFiles(ABIListFiles), FS(std::move(FS)) {}
2730
LLVM_ABI PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM);
2831
static bool isRequired() { return true; }
2932
};

llvm/lib/LTO/LTOBackend.cpp

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -240,27 +240,26 @@ static void runNewPMPasses(const Config &Conf, Module &Mod, TargetMachine *TM,
240240
unsigned OptLevel, bool IsThinLTO,
241241
ModuleSummaryIndex *ExportSummary,
242242
const ModuleSummaryIndex *ImportSummary) {
243-
auto FS = vfs::getRealFileSystem();
244243
std::optional<PGOOptions> PGOOpt;
245244
if (!Conf.SampleProfile.empty())
246245
PGOOpt = PGOOptions(Conf.SampleProfile, "", Conf.ProfileRemapping,
247-
/*MemoryProfile=*/"", FS, PGOOptions::SampleUse,
246+
/*MemoryProfile=*/"", PGOOptions::SampleUse,
248247
PGOOptions::NoCSAction,
249248
PGOOptions::ColdFuncOpt::Default, true);
250249
else if (Conf.RunCSIRInstr) {
251250
PGOOpt = PGOOptions("", Conf.CSIRProfile, Conf.ProfileRemapping,
252-
/*MemoryProfile=*/"", FS, PGOOptions::IRUse,
251+
/*MemoryProfile=*/"", PGOOptions::IRUse,
253252
PGOOptions::CSIRInstr, PGOOptions::ColdFuncOpt::Default,
254253
Conf.AddFSDiscriminator);
255254
} else if (!Conf.CSIRProfile.empty()) {
256-
PGOOpt = PGOOptions(Conf.CSIRProfile, "", Conf.ProfileRemapping,
257-
/*MemoryProfile=*/"", FS, PGOOptions::IRUse,
258-
PGOOptions::CSIRUse, PGOOptions::ColdFuncOpt::Default,
259-
Conf.AddFSDiscriminator);
255+
PGOOpt =
256+
PGOOptions(Conf.CSIRProfile, "", Conf.ProfileRemapping,
257+
/*MemoryProfile=*/"", PGOOptions::IRUse, PGOOptions::CSIRUse,
258+
PGOOptions::ColdFuncOpt::Default, Conf.AddFSDiscriminator);
260259
NoPGOWarnMismatch = !Conf.PGOWarnMismatch;
261260
} else if (Conf.AddFSDiscriminator) {
262-
PGOOpt = PGOOptions("", "", "", /*MemoryProfile=*/"", nullptr,
263-
PGOOptions::NoAction, PGOOptions::NoCSAction,
261+
PGOOpt = PGOOptions("", "", "", /*MemoryProfile=*/"", PGOOptions::NoAction,
262+
PGOOptions::NoCSAction,
264263
PGOOptions::ColdFuncOpt::Default, true);
265264
}
266265
TM->setPGOOption(PGOOpt);

llvm/lib/Passes/PassBuilder.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -479,8 +479,9 @@ class RequireAllMachineFunctionPropertiesPass
479479

480480
PassBuilder::PassBuilder(TargetMachine *TM, PipelineTuningOptions PTO,
481481
std::optional<PGOOptions> PGOOpt,
482-
PassInstrumentationCallbacks *PIC)
483-
: TM(TM), PTO(PTO), PGOOpt(PGOOpt), PIC(PIC) {
482+
PassInstrumentationCallbacks *PIC,
483+
IntrusiveRefCntPtr<vfs::FileSystem> FS)
484+
: TM(TM), PTO(PTO), PGOOpt(PGOOpt), PIC(PIC), FS(std::move(FS)) {
484485
if (TM)
485486
TM->registerPassBuilderCallbacks(*this);
486487
if (PIC) {

llvm/lib/Passes/PassBuilderPipelines.cpp

Lines changed: 19 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -856,8 +856,7 @@ void PassBuilder::addPGOInstrPasses(ModulePassManager &MPM,
856856
OptimizationLevel Level, bool RunProfileGen,
857857
bool IsCS, bool AtomicCounterUpdate,
858858
std::string ProfileFile,
859-
std::string ProfileRemappingFile,
860-
IntrusiveRefCntPtr<vfs::FileSystem> FS) {
859+
std::string ProfileRemappingFile) {
861860
assert(Level != OptimizationLevel::O0 && "Not expecting O0 here!");
862861

863862
if (!RunProfileGen) {
@@ -892,10 +891,11 @@ void PassBuilder::addPGOInstrPasses(ModulePassManager &MPM,
892891
MPM.addPass(InstrProfilingLoweringPass(Options, IsCS));
893892
}
894893

895-
void PassBuilder::addPGOInstrPassesForO0(
896-
ModulePassManager &MPM, bool RunProfileGen, bool IsCS,
897-
bool AtomicCounterUpdate, std::string ProfileFile,
898-
std::string ProfileRemappingFile, IntrusiveRefCntPtr<vfs::FileSystem> FS) {
894+
void PassBuilder::addPGOInstrPassesForO0(ModulePassManager &MPM,
895+
bool RunProfileGen, bool IsCS,
896+
bool AtomicCounterUpdate,
897+
std::string ProfileFile,
898+
std::string ProfileRemappingFile) {
899899
if (!RunProfileGen) {
900900
assert(!ProfileFile.empty() && "Profile use expecting a profile file!");
901901
MPM.addPass(
@@ -1141,8 +1141,8 @@ PassBuilder::buildModuleSimplificationPipeline(OptimizationLevel Level,
11411141
if (LoadSampleProfile) {
11421142
// Annotate sample profile right after early FPM to ensure freshness of
11431143
// the debug info.
1144-
MPM.addPass(SampleProfileLoaderPass(PGOOpt->ProfileFile,
1145-
PGOOpt->ProfileRemappingFile, Phase));
1144+
MPM.addPass(SampleProfileLoaderPass(
1145+
PGOOpt->ProfileFile, PGOOpt->ProfileRemappingFile, Phase, FS));
11461146
// Cache ProfileSummaryAnalysis once to avoid the potential need to insert
11471147
// RequireAnalysisPass for PSI before subsequent non-module passes.
11481148
MPM.addPass(RequireAnalysisPass<ProfileSummaryAnalysis, Module>());
@@ -1238,8 +1238,7 @@ PassBuilder::buildModuleSimplificationPipeline(OptimizationLevel Level,
12381238
addPGOInstrPasses(MPM, Level,
12391239
/*RunProfileGen=*/IsPGOInstrGen,
12401240
/*IsCS=*/false, PGOOpt->AtomicCounterUpdate,
1241-
PGOOpt->ProfileFile, PGOOpt->ProfileRemappingFile,
1242-
PGOOpt->FS);
1241+
PGOOpt->ProfileFile, PGOOpt->ProfileRemappingFile);
12431242
} else if (IsCtxProfGen || IsCtxProfUse) {
12441243
MPM.addPass(PGOInstrumentationGen(PGOInstrumentationType::CTXPROF));
12451244
// In pre-link, we just want the instrumented IR. We use the contextual
@@ -1262,10 +1261,10 @@ PassBuilder::buildModuleSimplificationPipeline(OptimizationLevel Level,
12621261
addPostPGOLoopRotation(MPM, Level);
12631262
MPM.addPass(PGOCtxProfLoweringPass());
12641263
} else if (IsColdFuncOnlyInstrGen) {
1265-
addPGOInstrPasses(
1266-
MPM, Level, /* RunProfileGen */ true, /* IsCS */ false,
1267-
/* AtomicCounterUpdate */ false, InstrumentColdFuncOnlyPath,
1268-
/* ProfileRemappingFile */ "", IntrusiveRefCntPtr<vfs::FileSystem>());
1264+
addPGOInstrPasses(MPM, Level, /* RunProfileGen */ true, /* IsCS */ false,
1265+
/* AtomicCounterUpdate */ false,
1266+
InstrumentColdFuncOnlyPath,
1267+
/* ProfileRemappingFile */ "");
12691268
}
12701269

12711270
if (IsPGOInstrGen || IsPGOInstrUse || IsCtxProfGen)
@@ -1276,7 +1275,7 @@ PassBuilder::buildModuleSimplificationPipeline(OptimizationLevel Level,
12761275
EnableSampledInstr));
12771276

12781277
if (IsMemprofUse)
1279-
MPM.addPass(MemProfUsePass(PGOOpt->MemoryProfile, PGOOpt->FS));
1278+
MPM.addPass(MemProfUsePass(PGOOpt->MemoryProfile, FS));
12801279

12811280
if (PGOOpt && (PGOOpt->Action == PGOOptions::IRUse ||
12821281
PGOOpt->Action == PGOOptions::SampleUse))
@@ -1485,13 +1484,11 @@ PassBuilder::buildModuleOptimizationPipeline(OptimizationLevel Level,
14851484
if (PGOOpt->CSAction == PGOOptions::CSIRInstr)
14861485
addPGOInstrPasses(MPM, Level, /*RunProfileGen=*/true,
14871486
/*IsCS=*/true, PGOOpt->AtomicCounterUpdate,
1488-
PGOOpt->CSProfileGenFile, PGOOpt->ProfileRemappingFile,
1489-
PGOOpt->FS);
1487+
PGOOpt->CSProfileGenFile, PGOOpt->ProfileRemappingFile);
14901488
else if (PGOOpt->CSAction == PGOOptions::CSIRUse)
14911489
addPGOInstrPasses(MPM, Level, /*RunProfileGen=*/false,
14921490
/*IsCS=*/true, PGOOpt->AtomicCounterUpdate,
1493-
PGOOpt->ProfileFile, PGOOpt->ProfileRemappingFile,
1494-
PGOOpt->FS);
1491+
PGOOpt->ProfileFile, PGOOpt->ProfileRemappingFile);
14951492
}
14961493

14971494
// Re-compute GlobalsAA here prior to function passes. This is particularly
@@ -2091,13 +2088,11 @@ PassBuilder::buildLTODefaultPipeline(OptimizationLevel Level,
20912088
if (PGOOpt->CSAction == PGOOptions::CSIRInstr)
20922089
addPGOInstrPasses(MPM, Level, /*RunProfileGen=*/true,
20932090
/*IsCS=*/true, PGOOpt->AtomicCounterUpdate,
2094-
PGOOpt->CSProfileGenFile, PGOOpt->ProfileRemappingFile,
2095-
PGOOpt->FS);
2091+
PGOOpt->CSProfileGenFile, PGOOpt->ProfileRemappingFile);
20962092
else if (PGOOpt->CSAction == PGOOptions::CSIRUse)
20972093
addPGOInstrPasses(MPM, Level, /*RunProfileGen=*/false,
20982094
/*IsCS=*/true, PGOOpt->AtomicCounterUpdate,
2099-
PGOOpt->ProfileFile, PGOOpt->ProfileRemappingFile,
2100-
PGOOpt->FS);
2095+
PGOOpt->ProfileFile, PGOOpt->ProfileRemappingFile);
21012096
}
21022097

21032098
// Break up allocas
@@ -2259,7 +2254,7 @@ PassBuilder::buildO0DefaultPipeline(OptimizationLevel Level,
22592254
MPM,
22602255
/*RunProfileGen=*/(PGOOpt->Action == PGOOptions::IRInstr),
22612256
/*IsCS=*/false, PGOOpt->AtomicCounterUpdate, PGOOpt->ProfileFile,
2262-
PGOOpt->ProfileRemappingFile, PGOOpt->FS);
2257+
PGOOpt->ProfileRemappingFile);
22632258

22642259
// Instrument function entry and exit before all inlining.
22652260
MPM.addPass(createModuleToFunctionPassAdaptor(

0 commit comments

Comments
 (0)