From f6650786b0d32ccf7d2ca85c9cfbb74bf6a55271 Mon Sep 17 00:00:00 2001 From: Luofan Chen Date: Sat, 15 Aug 2020 23:53:11 +0800 Subject: [PATCH] [Attributor][NFC] Format code --- lib/Transforms/IPO/Attributor.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/Transforms/IPO/Attributor.cpp b/lib/Transforms/IPO/Attributor.cpp index 88e06558d65..fb217cb5f14 100644 --- a/lib/Transforms/IPO/Attributor.cpp +++ b/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())