[llvm] r253661 - [FunctionAttrs] Remove redundant assignment.

Tilmann Scheller via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 20 11:27:59 PST 2015


Looks like the lambda support in the Clang static analyzer has been added only very recently. I guess that explains why we still see false positives like that.

 

Regards,

 

Tilmann

 

From: Tilmann Scheller [mailto:t.scheller at samsung.com] 
Sent: Friday, November 20, 2015 8:14 PM
To: 'David Blaikie'
Cc: 'llvm-commits'
Subject: RE: [llvm] r253661 - [FunctionAttrs] Remove redundant assignment.

 

Hi David,

 

it’s actually worse, I had another look at the sources and it turns out that the Clang static analyzer was wrong about this one (looks like it gets confused by lambda functions, seems like a genuine bug in the analyzer).

 

There is actually another use of “Captured” since it is captured by the lambda AddUsersToWorklistIfCapturing() and that one is called after the assignment.

 

Going to revert.

 

Sorry for the noise!

 

Regards,

 

Tilmann

 

From: David Blaikie [mailto:dblaikie at gmail.com] 
Sent: Friday, November 20, 2015 7:17 PM
To: Tilmann Scheller
Cc: llvm-commits
Subject: Re: [llvm] r253661 - [FunctionAttrs] Remove redundant assignment.

 

Might want to follow up with wherever this was committed (or wherever the store became dead) to check that there wasn't an intended use of this value that just went missing/was never finished... 

 

On Fri, Nov 20, 2015 at 4:51 AM, Tilmann Scheller via llvm-commits <llvm-commits at lists.llvm.org> wrote:

Author: tilmann
Date: Fri Nov 20 06:51:58 2015
New Revision: 253661

URL: http://llvm.org/viewvc/llvm-project?rev=253661 <http://llvm.org/viewvc/llvm-project?rev=253661&view=rev> &view=rev
Log:
[FunctionAttrs] Remove redundant assignment.

Identified by the Clang static analyzer.

Modified:
    llvm/trunk/lib/Transforms/IPO/FunctionAttrs.cpp

Modified: llvm/trunk/lib/Transforms/IPO/FunctionAttrs.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/FunctionAttrs.cpp?rev=253661 <http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/FunctionAttrs.cpp?rev=253661&r1=253660&r2=253661&view=diff> &r1=253660&r2=253661&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/FunctionAttrs.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/FunctionAttrs.cpp Fri Nov 20 06:51:58 2015
@@ -486,8 +486,6 @@ 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


_______________________________________________
llvm-commits mailing list
llvm-commits at lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151120/4a9cb593/attachment.html>


More information about the llvm-commits mailing list