From 73a482f4ccc138785e138d4aa299f45478157e6a Mon Sep 17 00:00:00 2001 From: Tilmann Scheller Date: Fri, 20 Nov 2015 19:17:10 +0000 Subject: [PATCH] Revert "[FunctionAttrs] Remove redundant assignment." This reverts r253661. Turns out that the assignment is not redundant (despite the Clang static analyzer claiming the opposite). The variable is being used by the lambda function AddUsersToWorklistIfCapturing(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253696 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/IPO/FunctionAttrs.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/Transforms/IPO/FunctionAttrs.cpp b/lib/Transforms/IPO/FunctionAttrs.cpp index 9c33f995789..e699c5e0df5 100644 --- a/lib/Transforms/IPO/FunctionAttrs.cpp +++ b/lib/Transforms/IPO/FunctionAttrs.cpp @@ -486,6 +486,8 @@ determinePointerReadAttrs(Argument *A, return Attribute::None; } + Captures &= !CS.doesNotCapture(UseIndex); + // Since the optimizer (by design) cannot see the data flow corresponding // to a operand bundle use, these cannot participate in the optimistic SCC // analysis. Instead, we model the operand bundle uses as arguments in -- 2.34.1