From: Benjamin Kramer Date: Tue, 14 Apr 2020 14:52:26 +0000 (+0200) Subject: [FunctionAttrs] Don't copy all the nodes where a reference is fine. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7bf166665e6893c4db37801b539e46a5661410cb;p=platform%2Fupstream%2Fllvm.git [FunctionAttrs] Don't copy all the nodes where a reference is fine. --- 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) {