Skip to content

Commit 293b095

Browse files
committed
Addressed comments
1 parent 67050dd commit 293b095

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ static bool shouldRegisterPGOPasses(const TargetMachine &TM,
237237
const PGOOptions &Options = *TM.getPGOOption();
238238
return Options.Action == PGOOptions::PGOAction::IRUse ||
239239
Options.Action == PGOOptions::PGOAction::SampleUse ||
240-
Options.CSAction != PGOOptions::CSPGOAction::CSIRUse;
240+
Options.CSAction != PGOOptions::CSPGOAction::NoCSAction;
241241
}
242242
return false;
243243
}

llvm/tools/llc/llc.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,13 +253,14 @@ static cl::opt<PGOKind>
253253
clEnumValN(SampleUse, "pgo-sample-use-pipeline",
254254
"Use sampled profile to guide PGO.")));
255255

256-
// Function to set PGO options on TargetMachine based on command line flags
256+
// Function to set PGO options on TargetMachine based on command line flags.
257257
static void setPGOOptions(TargetMachine &TM) {
258258
std::optional<PGOOptions> PGOOpt;
259259

260260
switch (PGOKindFlag) {
261261
case SampleUse:
262-
// Use default values for other PGOOptions parameters
262+
// Use default values for other PGOOptions parameters. This parameter
263+
// is used to test that PGO data is preserved at -O0.
263264
PGOOpt = PGOOptions("", "", "", "", PGOOptions::SampleUse,
264265
PGOOptions::NoCSAction);
265266
break;

0 commit comments

Comments
 (0)