Skip to content

Commit 597340b

Browse files
authored
Revert "Add IR Profile-Guided Optimization (IR PGO) support to the Flang compiler" (#142159)
Reverts #136098
1 parent e00366d commit 597340b

File tree

21 files changed

+58
-236
lines changed

21 files changed

+58
-236
lines changed

clang/include/clang/Basic/CodeGenOptions.def

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,11 +223,9 @@ AFFECTING_VALUE_CODEGENOPT(OptimizeSize, 2, 0) ///< If -Os (==1) or -Oz (==2) is
223223
CODEGENOPT(AtomicProfileUpdate , 1, 0) ///< Set -fprofile-update=atomic
224224
CODEGENOPT(ContinuousProfileSync, 1, 0) ///< Enable continuous instrumentation profiling
225225
/// Choose profile instrumenation kind or no instrumentation.
226-
227-
ENUM_CODEGENOPT(ProfileInstr, llvm::driver::ProfileInstrKind, 4, llvm::driver::ProfileInstrKind::ProfileNone)
228-
226+
ENUM_CODEGENOPT(ProfileInstr, ProfileInstrKind, 4, ProfileNone)
229227
/// Choose profile kind for PGO use compilation.
230-
ENUM_CODEGENOPT(ProfileUse, llvm::driver::ProfileInstrKind, 2, llvm::driver::ProfileInstrKind::ProfileNone)
228+
ENUM_CODEGENOPT(ProfileUse, ProfileInstrKind, 2, ProfileNone)
231229
/// Partition functions into N groups and select only functions in group i to be
232230
/// instrumented. Selected group numbers can be 0 to N-1 inclusive.
233231
VALUE_CODEGENOPT(ProfileTotalFunctionGroups, 32, 1)

clang/include/clang/Basic/CodeGenOptions.h

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -518,41 +518,35 @@ class CodeGenOptions : public CodeGenOptionsBase {
518518

519519
/// Check if Clang profile instrumenation is on.
520520
bool hasProfileClangInstr() const {
521-
return getProfileInstr() ==
522-
llvm::driver::ProfileInstrKind::ProfileClangInstr;
521+
return getProfileInstr() == ProfileClangInstr;
523522
}
524523

525524
/// Check if IR level profile instrumentation is on.
526525
bool hasProfileIRInstr() const {
527-
return getProfileInstr() == llvm::driver::ProfileInstrKind::ProfileIRInstr;
526+
return getProfileInstr() == ProfileIRInstr;
528527
}
529528

530529
/// Check if CS IR level profile instrumentation is on.
531530
bool hasProfileCSIRInstr() const {
532-
return getProfileInstr() ==
533-
llvm::driver::ProfileInstrKind::ProfileCSIRInstr;
531+
return getProfileInstr() == ProfileCSIRInstr;
534532
}
535533

536534
/// Check if any form of instrumentation is on.
537-
bool hasProfileInstr() const {
538-
return getProfileInstr() != llvm::driver::ProfileInstrKind::ProfileNone;
539-
}
535+
bool hasProfileInstr() const { return getProfileInstr() != ProfileNone; }
540536

541537
/// Check if Clang profile use is on.
542538
bool hasProfileClangUse() const {
543-
return getProfileUse() == llvm::driver::ProfileInstrKind::ProfileClangInstr;
539+
return getProfileUse() == ProfileClangInstr;
544540
}
545541

546542
/// Check if IR level profile use is on.
547543
bool hasProfileIRUse() const {
548-
return getProfileUse() == llvm::driver::ProfileInstrKind::ProfileIRInstr ||
549-
getProfileUse() == llvm::driver::ProfileInstrKind::ProfileCSIRInstr;
544+
return getProfileUse() == ProfileIRInstr ||
545+
getProfileUse() == ProfileCSIRInstr;
550546
}
551547

552548
/// Check if CSIR profile use is on.
553-
bool hasProfileCSIRUse() const {
554-
return getProfileUse() == llvm::driver::ProfileInstrKind::ProfileCSIRInstr;
555-
}
549+
bool hasProfileCSIRUse() const { return getProfileUse() == ProfileCSIRInstr; }
556550

557551
/// Check if type and variable info should be emitted.
558552
bool hasReducedDebugInfo() const {

clang/include/clang/Basic/ProfileList.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,17 @@ class ProfileList {
4949
~ProfileList();
5050

5151
bool isEmpty() const { return Empty; }
52-
ExclusionType getDefault(llvm::driver::ProfileInstrKind Kind) const;
52+
ExclusionType getDefault(CodeGenOptions::ProfileInstrKind Kind) const;
5353

5454
std::optional<ExclusionType>
5555
isFunctionExcluded(StringRef FunctionName,
56-
llvm::driver::ProfileInstrKind Kind) const;
56+
CodeGenOptions::ProfileInstrKind Kind) const;
5757
std::optional<ExclusionType>
5858
isLocationExcluded(SourceLocation Loc,
59-
llvm::driver::ProfileInstrKind Kind) const;
59+
CodeGenOptions::ProfileInstrKind Kind) const;
6060
std::optional<ExclusionType>
61-
isFileExcluded(StringRef FileName, llvm::driver::ProfileInstrKind Kind) const;
61+
isFileExcluded(StringRef FileName,
62+
CodeGenOptions::ProfileInstrKind Kind) const;
6263
};
6364

6465
} // namespace clang

clang/include/clang/Driver/Options.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1772,7 +1772,7 @@ def fmcdc_max_test_vectors_EQ : Joined<["-"], "fmcdc-max-test-vectors=">,
17721772
HelpText<"Maximum number of test vectors in MC/DC coverage">,
17731773
MarshallingInfoInt<CodeGenOpts<"MCDCMaxTVs">, "0x7FFFFFFE">;
17741774
def fprofile_generate : Flag<["-"], "fprofile-generate">,
1775-
Group<f_Group>, Visibility<[ClangOption, CLOption, FlangOption, FC1Option]>,
1775+
Group<f_Group>, Visibility<[ClangOption, CLOption]>,
17761776
HelpText<"Generate instrumented code to collect execution counts into default.profraw (overridden by LLVM_PROFILE_FILE env var)">;
17771777
def fprofile_generate_EQ : Joined<["-"], "fprofile-generate=">,
17781778
Group<f_Group>, Visibility<[ClangOption, CLOption]>,
@@ -1789,7 +1789,7 @@ def fprofile_use : Flag<["-"], "fprofile-use">, Group<f_Group>,
17891789
Visibility<[ClangOption, CLOption]>, Alias<fprofile_instr_use>;
17901790
def fprofile_use_EQ : Joined<["-"], "fprofile-use=">,
17911791
Group<f_Group>,
1792-
Visibility<[ClangOption, CLOption, FlangOption, FC1Option]>,
1792+
Visibility<[ClangOption, CLOption]>,
17931793
MetaVarName<"<pathname>">,
17941794
HelpText<"Use instrumentation data for profile-guided optimization. If pathname is a directory, it reads from <pathname>/default.profdata. Otherwise, it reads from file <pathname>.">;
17951795
def fno_profile_instr_generate : Flag<["-"], "fno-profile-instr-generate">,

clang/lib/Basic/ProfileList.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -70,24 +70,24 @@ ProfileList::ProfileList(ArrayRef<std::string> Paths, SourceManager &SM)
7070

7171
ProfileList::~ProfileList() = default;
7272

73-
static StringRef getSectionName(llvm::driver::ProfileInstrKind Kind) {
73+
static StringRef getSectionName(CodeGenOptions::ProfileInstrKind Kind) {
7474
switch (Kind) {
75-
case llvm::driver::ProfileInstrKind::ProfileNone:
75+
case CodeGenOptions::ProfileNone:
7676
return "";
77-
case llvm::driver::ProfileInstrKind::ProfileClangInstr:
77+
case CodeGenOptions::ProfileClangInstr:
7878
return "clang";
79-
case llvm::driver::ProfileInstrKind::ProfileIRInstr:
79+
case CodeGenOptions::ProfileIRInstr:
8080
return "llvm";
81-
case llvm::driver::ProfileInstrKind::ProfileCSIRInstr:
81+
case CodeGenOptions::ProfileCSIRInstr:
8282
return "csllvm";
8383
case CodeGenOptions::ProfileIRSampleColdCov:
8484
return "sample-coldcov";
8585
}
86-
llvm_unreachable("Unhandled llvm::driver::ProfileInstrKind enum");
86+
llvm_unreachable("Unhandled CodeGenOptions::ProfileInstrKind enum");
8787
}
8888

8989
ProfileList::ExclusionType
90-
ProfileList::getDefault(llvm::driver::ProfileInstrKind Kind) const {
90+
ProfileList::getDefault(CodeGenOptions::ProfileInstrKind Kind) const {
9191
StringRef Section = getSectionName(Kind);
9292
// Check for "default:<type>"
9393
if (SCL->inSection(Section, "default", "allow"))
@@ -118,7 +118,7 @@ ProfileList::inSection(StringRef Section, StringRef Prefix,
118118

119119
std::optional<ProfileList::ExclusionType>
120120
ProfileList::isFunctionExcluded(StringRef FunctionName,
121-
llvm::driver::ProfileInstrKind Kind) const {
121+
CodeGenOptions::ProfileInstrKind Kind) const {
122122
StringRef Section = getSectionName(Kind);
123123
// Check for "function:<regex>=<case>"
124124
if (auto V = inSection(Section, "function", FunctionName))
@@ -132,13 +132,13 @@ ProfileList::isFunctionExcluded(StringRef FunctionName,
132132

133133
std::optional<ProfileList::ExclusionType>
134134
ProfileList::isLocationExcluded(SourceLocation Loc,
135-
llvm::driver::ProfileInstrKind Kind) const {
135+
CodeGenOptions::ProfileInstrKind Kind) const {
136136
return isFileExcluded(SM.getFilename(SM.getFileLoc(Loc)), Kind);
137137
}
138138

139139
std::optional<ProfileList::ExclusionType>
140140
ProfileList::isFileExcluded(StringRef FileName,
141-
llvm::driver::ProfileInstrKind Kind) const {
141+
CodeGenOptions::ProfileInstrKind Kind) const {
142142
StringRef Section = getSectionName(Kind);
143143
// Check for "source:<regex>=<case>"
144144
if (auto V = inSection(Section, "source", FileName))

clang/lib/CodeGen/BackendUtil.cpp

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,17 @@ namespace clang {
123123
extern llvm::cl::opt<bool> ClSanitizeGuardChecks;
124124
}
125125

126+
// Default filename used for profile generation.
127+
static std::string getDefaultProfileGenName() {
128+
return DebugInfoCorrelate || ProfileCorrelate != InstrProfCorrelator::NONE
129+
? "default_%m.proflite"
130+
: "default_%m.profraw";
131+
}
132+
126133
// Path and name of file used for profile generation
127134
static std::string getProfileGenName(const CodeGenOptions &CodeGenOpts) {
128135
std::string FileName = CodeGenOpts.InstrProfileOutput.empty()
129-
? llvm::driver::getDefaultProfileGenName()
136+
? getDefaultProfileGenName()
130137
: CodeGenOpts.InstrProfileOutput;
131138
if (CodeGenOpts.ContinuousProfileSync)
132139
FileName = "%c" + FileName;
@@ -828,45 +835,44 @@ void EmitAssemblyHelper::RunOptimizationPipeline(
828835

829836
if (CodeGenOpts.hasProfileIRInstr())
830837
// -fprofile-generate.
831-
PGOOpt = PGOOptions(
832-
getProfileGenName(CodeGenOpts), "", "",
833-
CodeGenOpts.MemoryProfileUsePath, nullptr, PGOOptions::IRInstr,
834-
PGOOptions::NoCSAction, llvm::ClPGOColdFuncAttr,
835-
CodeGenOpts.DebugInfoForProfiling,
836-
/*PseudoProbeForProfiling=*/false, CodeGenOpts.AtomicProfileUpdate);
838+
PGOOpt = PGOOptions(getProfileGenName(CodeGenOpts), "", "",
839+
CodeGenOpts.MemoryProfileUsePath, nullptr,
840+
PGOOptions::IRInstr, PGOOptions::NoCSAction,
841+
ClPGOColdFuncAttr, CodeGenOpts.DebugInfoForProfiling,
842+
/*PseudoProbeForProfiling=*/false,
843+
CodeGenOpts.AtomicProfileUpdate);
837844
else if (CodeGenOpts.hasProfileIRUse()) {
838845
// -fprofile-use.
839846
auto CSAction = CodeGenOpts.hasProfileCSIRUse() ? PGOOptions::CSIRUse
840847
: PGOOptions::NoCSAction;
841848
PGOOpt = PGOOptions(CodeGenOpts.ProfileInstrumentUsePath, "",
842849
CodeGenOpts.ProfileRemappingFile,
843850
CodeGenOpts.MemoryProfileUsePath, VFS,
844-
PGOOptions::IRUse, CSAction, llvm::ClPGOColdFuncAttr,
851+
PGOOptions::IRUse, CSAction, ClPGOColdFuncAttr,
845852
CodeGenOpts.DebugInfoForProfiling);
846853
} else if (!CodeGenOpts.SampleProfileFile.empty())
847854
// -fprofile-sample-use
848855
PGOOpt = PGOOptions(
849856
CodeGenOpts.SampleProfileFile, "", CodeGenOpts.ProfileRemappingFile,
850857
CodeGenOpts.MemoryProfileUsePath, VFS, PGOOptions::SampleUse,
851-
PGOOptions::NoCSAction, llvm::ClPGOColdFuncAttr,
858+
PGOOptions::NoCSAction, ClPGOColdFuncAttr,
852859
CodeGenOpts.DebugInfoForProfiling, CodeGenOpts.PseudoProbeForProfiling);
853860
else if (!CodeGenOpts.MemoryProfileUsePath.empty())
854861
// -fmemory-profile-use (without any of the above options)
855-
PGOOpt =
856-
PGOOptions("", "", "", CodeGenOpts.MemoryProfileUsePath, VFS,
857-
PGOOptions::NoAction, PGOOptions::NoCSAction,
858-
llvm::ClPGOColdFuncAttr, CodeGenOpts.DebugInfoForProfiling);
862+
PGOOpt = PGOOptions("", "", "", CodeGenOpts.MemoryProfileUsePath, VFS,
863+
PGOOptions::NoAction, PGOOptions::NoCSAction,
864+
ClPGOColdFuncAttr, CodeGenOpts.DebugInfoForProfiling);
859865
else if (CodeGenOpts.PseudoProbeForProfiling)
860866
// -fpseudo-probe-for-profiling
861-
PGOOpt = PGOOptions("", "", "", /*MemoryProfile=*/"", nullptr,
862-
PGOOptions::NoAction, PGOOptions::NoCSAction,
863-
llvm::ClPGOColdFuncAttr,
864-
CodeGenOpts.DebugInfoForProfiling, true);
867+
PGOOpt =
868+
PGOOptions("", "", "", /*MemoryProfile=*/"", nullptr,
869+
PGOOptions::NoAction, PGOOptions::NoCSAction,
870+
ClPGOColdFuncAttr, CodeGenOpts.DebugInfoForProfiling, true);
865871
else if (CodeGenOpts.DebugInfoForProfiling)
866872
// -fdebug-info-for-profiling
867873
PGOOpt = PGOOptions("", "", "", /*MemoryProfile=*/"", nullptr,
868874
PGOOptions::NoAction, PGOOptions::NoCSAction,
869-
llvm::ClPGOColdFuncAttr, true);
875+
ClPGOColdFuncAttr, true);
870876

871877
// Check to see if we want to generate a CS profile.
872878
if (CodeGenOpts.hasProfileCSIRInstr()) {

clang/lib/CodeGen/CodeGenAction.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,8 @@ void BackendConsumer::HandleTranslationUnit(ASTContext &C) {
273273
std::unique_ptr<llvm::ToolOutputFile> OptRecordFile =
274274
std::move(*OptRecordFileOrErr);
275275

276-
if (OptRecordFile && CodeGenOpts.getProfileUse() !=
277-
llvm::driver::ProfileInstrKind::ProfileNone)
276+
if (OptRecordFile &&
277+
CodeGenOpts.getProfileUse() != CodeGenOptions::ProfileNone)
278278
Ctx.setDiagnosticsHotnessRequested(true);
279279

280280
if (CodeGenOpts.MisExpect) {

clang/lib/CodeGen/CodeGenFunction.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -940,8 +940,7 @@ void CodeGenFunction::StartFunction(GlobalDecl GD, QualType RetTy,
940940
}
941941
}
942942

943-
if (CGM.getCodeGenOpts().getProfileInstr() !=
944-
llvm::driver::ProfileInstrKind::ProfileNone) {
943+
if (CGM.getCodeGenOpts().getProfileInstr() != CodeGenOptions::ProfileNone) {
945944
switch (CGM.isFunctionBlockedFromProfileInstr(Fn, Loc)) {
946945
case ProfileList::Skip:
947946
Fn->addFnAttr(llvm::Attribute::SkipProfile);

clang/lib/CodeGen/CodeGenModule.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3601,7 +3601,7 @@ CodeGenModule::isFunctionBlockedByProfileList(llvm::Function *Fn,
36013601
// If the profile list is empty, then instrument everything.
36023602
if (ProfileList.isEmpty())
36033603
return ProfileList::Allow;
3604-
llvm::driver::ProfileInstrKind Kind = getCodeGenOpts().getProfileInstr();
3604+
CodeGenOptions::ProfileInstrKind Kind = getCodeGenOpts().getProfileInstr();
36053605
// First, check the function name.
36063606
if (auto V = ProfileList.isFunctionExcluded(Fn->getName(), Kind))
36073607
return *V;

clang/lib/Driver/ToolChains/Flang.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -883,10 +883,6 @@ void Flang::ConstructJob(Compilation &C, const JobAction &JA,
883883
// TODO: Handle interactions between -w, -pedantic, -Wall, -WOption
884884
Args.AddLastArg(CmdArgs, options::OPT_w);
885885

886-
// recognise options: fprofile-generate -fprofile-use=
887-
Args.addAllArgs(
888-
CmdArgs, {options::OPT_fprofile_generate, options::OPT_fprofile_use_EQ});
889-
890886
// Forward flags for OpenMP. We don't do this if the current action is an
891887
// device offloading action other than OpenMP.
892888
if (Args.hasFlag(options::OPT_fopenmp, options::OPT_fopenmp_EQ,

clang/lib/Frontend/CompilerInvocation.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1499,11 +1499,11 @@ static void setPGOUseInstrumentor(CodeGenOptions &Opts,
14991499
// which is available (might be one or both).
15001500
if (PGOReader->isIRLevelProfile() || PGOReader->hasMemoryProfile()) {
15011501
if (PGOReader->hasCSIRLevelProfile())
1502-
Opts.setProfileUse(llvm::driver::ProfileInstrKind::ProfileCSIRInstr);
1502+
Opts.setProfileUse(CodeGenOptions::ProfileCSIRInstr);
15031503
else
1504-
Opts.setProfileUse(llvm::driver::ProfileInstrKind::ProfileIRInstr);
1504+
Opts.setProfileUse(CodeGenOptions::ProfileIRInstr);
15051505
} else
1506-
Opts.setProfileUse(llvm::driver::ProfileInstrKind::ProfileClangInstr);
1506+
Opts.setProfileUse(CodeGenOptions::ProfileClangInstr);
15071507
}
15081508

15091509
void CompilerInvocation::setDefaultPointerAuthOptions(

flang/include/flang/Frontend/CodeGenOptions.def

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,8 @@ CODEGENOPT(OptimizationLevel, 2, 0) ///< The -O[0-3] option specified.
2424
CODEGENOPT(DebugPassManager, 1, 0) ///< Prints debug information for the new
2525
///< pass manager.
2626

27-
28-
/// Choose profile instrumenation kind or no instrumentation.
29-
ENUM_CODEGENOPT(ProfileInstr, llvm::driver::ProfileInstrKind, 2, llvm::driver::ProfileInstrKind::ProfileNone)
30-
/// Choose profile kind for PGO use compilation.
31-
ENUM_CODEGENOPT(ProfileUse, llvm::driver::ProfileInstrKind, 2, llvm::driver::ProfileInstrKind::ProfileNone)
32-
3327
CODEGENOPT(InstrumentFunctions, 1, 0) ///< Set when -finstrument_functions is
3428
///< enabled on the compile step.
35-
3629
CODEGENOPT(IsPIE, 1, 0) ///< PIE level is the same as PIC Level.
3730
CODEGENOPT(PICLevel, 2, 0) ///< PIC level of the LLVM module.
3831
CODEGENOPT(PrepareForFullLTO , 1, 0) ///< Set when -flto is enabled on the

flang/include/flang/Frontend/CodeGenOptions.h

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -151,44 +151,6 @@ class CodeGenOptions : public CodeGenOptionsBase {
151151
/// OpenMP is enabled.
152152
using DoConcurrentMappingKind = flangomp::DoConcurrentMappingKind;
153153

154-
/// Name of the profile file to use as output for -fprofile-instr-generate,
155-
/// -fprofile-generate, and -fcs-profile-generate.
156-
std::string InstrProfileOutput;
157-
158-
/// Name of the profile file to use as input for -fmemory-profile-use.
159-
std::string MemoryProfileUsePath;
160-
161-
/// Name of the profile file to use as input for -fprofile-instr-use
162-
std::string ProfileInstrumentUsePath;
163-
164-
/// Name of the profile remapping file to apply to the profile data supplied
165-
/// by -fprofile-sample-use or -fprofile-instr-use.
166-
std::string ProfileRemappingFile;
167-
168-
/// Check if Clang profile instrumenation is on.
169-
bool hasProfileClangInstr() const {
170-
return getProfileInstr() == llvm::driver::ProfileClangInstr;
171-
}
172-
173-
/// Check if IR level profile instrumentation is on.
174-
bool hasProfileIRInstr() const {
175-
return getProfileInstr() == llvm::driver::ProfileIRInstr;
176-
}
177-
178-
/// Check if CS IR level profile instrumentation is on.
179-
bool hasProfileCSIRInstr() const {
180-
return getProfileInstr() == llvm::driver::ProfileCSIRInstr;
181-
}
182-
/// Check if IR level profile use is on.
183-
bool hasProfileIRUse() const {
184-
return getProfileUse() == llvm::driver::ProfileIRInstr ||
185-
getProfileUse() == llvm::driver::ProfileCSIRInstr;
186-
}
187-
/// Check if CSIR profile use is on.
188-
bool hasProfileCSIRUse() const {
189-
return getProfileUse() == llvm::driver::ProfileCSIRInstr;
190-
}
191-
192154
// Define accessors/mutators for code generation options of enumeration type.
193155
#define CODEGENOPT(Name, Bits, Default)
194156
#define ENUM_CODEGENOPT(Name, Type, Bits, Default) \

flang/lib/Frontend/CompilerInvocation.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
#include "llvm/ADT/StringRef.h"
3131
#include "llvm/ADT/StringSwitch.h"
3232
#include "llvm/Frontend/Debug/Options.h"
33-
#include "llvm/Frontend/Driver/CodeGenOptions.h"
3433
#include "llvm/Option/Arg.h"
3534
#include "llvm/Option/ArgList.h"
3635
#include "llvm/Option/OptTable.h"
@@ -453,15 +452,6 @@ static void parseCodeGenArgs(Fortran::frontend::CodeGenOptions &opts,
453452
opts.IsPIE = 1;
454453
}
455454

456-
if (args.hasArg(clang::driver::options::OPT_fprofile_generate)) {
457-
opts.setProfileInstr(llvm::driver::ProfileInstrKind::ProfileIRInstr);
458-
}
459-
460-
if (auto A = args.getLastArg(clang::driver::options::OPT_fprofile_use_EQ)) {
461-
opts.setProfileUse(llvm::driver::ProfileInstrKind::ProfileIRInstr);
462-
opts.ProfileInstrumentUsePath = A->getValue();
463-
}
464-
465455
// -mcmodel option.
466456
if (const llvm::opt::Arg *a =
467457
args.getLastArg(clang::driver::options::OPT_mcmodel_EQ)) {

0 commit comments

Comments
 (0)