File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
llvm/lib/CodeGen/SelectionDAG Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -231,13 +231,15 @@ static bool dontUseFastISelFor(const Function &Fn) {
231231
232232static bool shouldRegisterPGOPasses (const TargetMachine &TM,
233233 CodeGenOptLevel OptLevel) {
234- bool RegisterPGOPasses = OptLevel != CodeGenOptLevel::None;
235- if (!RegisterPGOPasses && TM.getPGOOption ()) {
234+ if (OptLevel != CodeGenOptLevel::None)
235+ return true ;
236+ if (TM.getPGOOption ()) {
236237 const PGOOptions &Options = *TM.getPGOOption ();
237- RegisterPGOPasses = Options.Action != PGOOptions::PGOAction::NoAction ||
238- Options.CSAction != PGOOptions::CSPGOAction::NoCSAction;
238+ return Options.Action == PGOOptions::PGOAction::IRUse ||
239+ Options.Action == PGOOptions::PGOAction::SampleUse ||
240+ Options.CSAction != PGOOptions::CSPGOAction::CSIRUse;
239241 }
240- return RegisterPGOPasses ;
242+ return false ;
241243}
242244
243245namespace llvm {
You can’t perform that action at this time.
0 commit comments