From 925b193eed58459894e9f443fe1ba0b225c276ca Mon Sep 17 00:00:00 2001 From: Tilmann Scheller Date: Fri, 20 Nov 2015 19:17:10 +0000 Subject: 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(). llvm-svn: 253696 --- llvm/lib/Transforms/IPO/FunctionAttrs.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'llvm/lib/Transforms') diff --git a/llvm/lib/Transforms/IPO/FunctionAttrs.cpp b/llvm/lib/Transforms/IPO/FunctionAttrs.cpp index 9c33f995789..e699c5e0df5 100644 --- a/llvm/lib/Transforms/IPO/FunctionAttrs.cpp +++ b/llvm/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 -- cgit v1.2.3