Skip to content

Commit c668980

Browse files
Update llvm/lib/Analysis/MLInlineAdvisor.cpp
Co-authored-by: Ellis Hoag <[email protected]>
1 parent 7355c60 commit c668980

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

llvm/lib/Analysis/MLInlineAdvisor.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,10 @@ MLInlineAdvisor::MLInlineAdvisor(
189189
}
190190

191191
unsigned MLInlineAdvisor::getInitialFunctionLevel(const Function &F) const {
192-
return FunctionLevels.find(CG.lookup(F)) != FunctionLevels.end()
193-
? FunctionLevels.at(CG.lookup(F))
194-
: 0;
192+
auto It = FunctionLevels.find(CG.lookup(F));
193+
if (It == FunctionLevels.end())
194+
return 0;
195+
return *It;
195196
}
196197

197198
void MLInlineAdvisor::onPassEntry(LazyCallGraph::SCC *CurSCC) {

0 commit comments

Comments
 (0)