From 7bf166665e6893c4db37801b539e46a5661410cb Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Tue, 14 Apr 2020 16:52:26 +0200 Subject: [PATCH] [FunctionAttrs] Don't copy all the nodes where a reference is fine. --- llvm/lib/Transforms/IPO/FunctionAttrs.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/lib/Transforms/IPO/FunctionAttrs.cpp b/llvm/lib/Transforms/IPO/FunctionAttrs.cpp index b6d0b2e..6b11075 100644 --- a/llvm/lib/Transforms/IPO/FunctionAttrs.cpp +++ b/llvm/lib/Transforms/IPO/FunctionAttrs.cpp @@ -1306,7 +1306,7 @@ static bool inferAttrsFromFunctionBodies(const SCCNodeSet &SCCNodes) { // Skip non-throwing functions. [](const Function &F) { return F.doesNotThrow(); }, // Instructions that break non-throwing assumption. - [SCCNodes](Instruction &I) { + [&SCCNodes](Instruction &I) { return InstrBreaksNonThrowing(I, SCCNodes); }, [](Function &F) { @@ -1329,7 +1329,7 @@ static bool inferAttrsFromFunctionBodies(const SCCNodeSet &SCCNodes) { // Skip functions known not to free memory. [](const Function &F) { return F.doesNotFreeMemory(); }, // Instructions that break non-deallocating assumption. - [SCCNodes](Instruction &I) { + [&SCCNodes](Instruction &I) { return InstrBreaksNoFree(I, SCCNodes); }, [](Function &F) { -- 2.7.4