Skip to content

Commit

Permalink
Fix indentation. NFC.
Browse files Browse the repository at this point in the history
  • Loading branch information
jayfoad committed May 1, 2020
1 parent 68e89c5 commit 7ce389e
Showing 1 changed file with 35 additions and 35 deletions.
70 changes: 35 additions & 35 deletions llvm/tools/opt/NewPMDriver.cpp
Expand Up @@ -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);
Expand Down

0 comments on commit 7ce389e

Please sign in to comment.