[llvm] 7bf1666 - [FunctionAttrs] Don't copy all the nodes where a reference is fine.
Benjamin Kramer via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 14 08:28:10 PDT 2020
Author: Benjamin Kramer
Date: 2020-04-14T17:18:23+02:00
New Revision: 7bf166665e6893c4db37801b539e46a5661410cb
URL: https://github.com/llvm/llvm-project/commit/7bf166665e6893c4db37801b539e46a5661410cb
DIFF: https://github.com/llvm/llvm-project/commit/7bf166665e6893c4db37801b539e46a5661410cb.diff
LOG: [FunctionAttrs] Don't copy all the nodes where a reference is fine.
Added:
Modified:
llvm/lib/Transforms/IPO/FunctionAttrs.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/IPO/FunctionAttrs.cpp b/llvm/lib/Transforms/IPO/FunctionAttrs.cpp
index b6d0b2e35694..6b1107545324 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) {
More information about the llvm-commits
mailing list