Use llvm::size rather than an empty loop to get the number of top

level loops.
This commit is contained in:
Eric Christopher 2020-07-23 14:53:18 -07:00
parent 1d09ecf361
commit 3ac828b8f7
1 changed files with 1 additions and 3 deletions

View File

@ -53,9 +53,7 @@ FunctionPropertiesInfo::getFunctionPropertiesInfo(const Function &F,
if (FPI.MaxLoopDepth < LoopDepth)
FPI.MaxLoopDepth = LoopDepth;
}
for (Loop *L : LI) {
++FPI.TopLevelLoopCount;
}
FPI.TopLevelLoopCount += llvm::size(LI);
return FPI;
}