Fix indentation. NFC.

This commit is contained in:
Jay Foad 2020-05-01 11:37:59 +01:00
parent 68e89c5b96
commit 7ce389e8ac
1 changed files with 35 additions and 35 deletions

View File

@ -219,42 +219,42 @@ bool llvm::runPassPipeline(StringRef Arg0, Module &M, TargetMachine *TM,
Optional<PGOOptions> P;
switch (PGOKindFlag) {
case InstrGen:
P = PGOOptions(ProfileFile, "", "", PGOOptions::IRInstr);
break;
case InstrUse:
P = PGOOptions(ProfileFile, "", ProfileRemappingFile, PGOOptions::IRUse);
break;
case SampleUse:
P = PGOOptions(ProfileFile, "", ProfileRemappingFile,
PGOOptions::SampleUse);
break;
case NoPGO:
if (DebugInfoForProfiling)
P = PGOOptions("", "", "", PGOOptions::NoAction, PGOOptions::NoCSAction,
true);
else
P = None;
}
if (CSPGOKindFlag != NoCSPGO) {
if (P && (P->Action == PGOOptions::IRInstr ||
P->Action == PGOOptions::SampleUse))
errs() << "CSPGOKind cannot be used with IRInstr or SampleUse";
if (CSPGOKindFlag == CSInstrGen) {
if (CSProfileGenFile.empty())
errs() << "CSInstrGen needs to specify CSProfileGenFile";
if (P) {
P->CSAction = PGOOptions::CSIRInstr;
P->CSProfileGenFile = CSProfileGenFile;
} else
P = PGOOptions("", CSProfileGenFile, ProfileRemappingFile,
PGOOptions::NoAction, PGOOptions::CSIRInstr);
} else /* CSPGOKindFlag == CSInstrUse */ {
if (!P)
errs() << "CSInstrUse needs to be together with InstrUse";
P->CSAction = PGOOptions::CSIRUse;
}
case InstrGen:
P = PGOOptions(ProfileFile, "", "", PGOOptions::IRInstr);
break;
case InstrUse:
P = PGOOptions(ProfileFile, "", ProfileRemappingFile, PGOOptions::IRUse);
break;
case SampleUse:
P = PGOOptions(ProfileFile, "", ProfileRemappingFile,
PGOOptions::SampleUse);
break;
case NoPGO:
if (DebugInfoForProfiling)
P = PGOOptions("", "", "", PGOOptions::NoAction, PGOOptions::NoCSAction,
true);
else
P = None;
}
if (CSPGOKindFlag != NoCSPGO) {
if (P && (P->Action == PGOOptions::IRInstr ||
P->Action == PGOOptions::SampleUse))
errs() << "CSPGOKind cannot be used with IRInstr or SampleUse";
if (CSPGOKindFlag == CSInstrGen) {
if (CSProfileGenFile.empty())
errs() << "CSInstrGen needs to specify CSProfileGenFile";
if (P) {
P->CSAction = PGOOptions::CSIRInstr;
P->CSProfileGenFile = CSProfileGenFile;
} else
P = PGOOptions("", CSProfileGenFile, ProfileRemappingFile,
PGOOptions::NoAction, PGOOptions::CSIRInstr);
} else /* CSPGOKindFlag == CSInstrUse */ {
if (!P)
errs() << "CSInstrUse needs to be together with InstrUse";
P->CSAction = PGOOptions::CSIRUse;
}
}
PassInstrumentationCallbacks PIC;
StandardInstrumentations SI;
SI.registerCallbacks(PIC);