[llvm] 266949b - [Attributor][NFC] Format code
Luofan Chen via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 15 09:03:14 PDT 2020
Author: Luofan Chen
Date: 2020-08-16T00:00:45+08:00
New Revision: 266949b2bc0c4c4f6958664aae6d4bdd14e819b5
URL: https://github.com/llvm/llvm-project/commit/266949b2bc0c4c4f6958664aae6d4bdd14e819b5
DIFF: https://github.com/llvm/llvm-project/commit/266949b2bc0c4c4f6958664aae6d4bdd14e819b5.diff
LOG: [Attributor][NFC] Format code
Added:
Modified:
llvm/lib/Transforms/IPO/Attributor.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/IPO/Attributor.cpp b/llvm/lib/Transforms/IPO/Attributor.cpp
index 88e06558d652..fb217cb5f14e 100644
--- a/llvm/lib/Transforms/IPO/Attributor.cpp
+++ b/llvm/lib/Transforms/IPO/Attributor.cpp
@@ -2204,8 +2204,9 @@ static bool runAttributorOnFunctions(InformationCache &InfoCache,
// TODO: for now we eagerly internalize functions without calculating the
// cost, we need a cost interface to determine whether internalizing
// a function is "benefitial"
- if (AllowDeepWrapper)
- for (unsigned u = 0; u < Functions.size(); u ++) {
+ if (AllowDeepWrapper) {
+ unsigned FunSize = Functions.size();
+ for (unsigned u = 0; u < FunSize; u++) {
Function *F = Functions[u];
if (!F->isDeclaration() && !F->isDefinitionExact() && F->getNumUses() &&
!GlobalValue::isInterposableLinkage(F->getLinkage())) {
@@ -2221,6 +2222,7 @@ static bool runAttributorOnFunctions(InformationCache &InfoCache,
}
}
}
+ }
for (Function *F : Functions) {
if (F->hasExactDefinition())
More information about the llvm-commits
mailing list