[llvm] r349438 - [CaptureTracking] Pass MaxUsesToExplore from wrappers to the actual implementation

Artur Pilipenko via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 3 12:23:29 PST 2019


Good idea. Added in r350351 (https://reviews.llvm.org/rL350351)

Artur

On 17 Dec 2018, at 20:55, Philip Reames <listmail at philipreames.com<mailto:listmail at philipreames.com>> wrote:

Since the patch somewhat begs the question... test case?

On 12/17/18 7:32 PM, Artur Pilipenko via llvm-commits wrote:
Author: apilipenko
Date: Mon Dec 17 19:32:33 2018
New Revision: 349438

URL: http://llvm.org/viewvc/llvm-project?rev=349438&view=rev
Log:
[CaptureTracking] Pass MaxUsesToExplore from wrappers to the actual implementation
    This is a follow up for rL347910. In the original patch I somehow forgot to pass
the limit from wrappers to the function which actually does the job.

Modified:
    llvm/trunk/lib/Analysis/CaptureTracking.cpp

Modified: llvm/trunk/lib/Analysis/CaptureTracking.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/CaptureTracking.cpp?rev=349438&r1=349437&r2=349438&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/CaptureTracking.cpp (original)
+++ llvm/trunk/lib/Analysis/CaptureTracking.cpp Mon Dec 17 19:32:33 2018
@@ -170,7 +170,7 @@ bool llvm::PointerMayBeCaptured(const Va
   (void)StoreCaptures;
     SimpleCaptureTracker SCT(ReturnCaptures);
-  PointerMayBeCaptured(V, &SCT);
+  PointerMayBeCaptured(V, &SCT, MaxUsesToExplore);
   return SCT.Captured;
 }
 @@ -194,7 +194,8 @@ bool llvm::PointerMayBeCapturedBefore(co
   bool UseNewOBB = OBB == nullptr;
     if (!DT)
-    return PointerMayBeCaptured(V, ReturnCaptures, StoreCaptures);
+    return PointerMayBeCaptured(V, ReturnCaptures, StoreCaptures,
+                                MaxUsesToExplore);
   if (UseNewOBB)
     OBB = new OrderedBasicBlock(I->getParent());
 @@ -202,7 +203,7 @@ bool llvm::PointerMayBeCapturedBefore(co
   // with StoreCaptures.
     CapturesBefore CB(ReturnCaptures, I, DT, IncludeI, OBB);
-  PointerMayBeCaptured(V, &CB);
+  PointerMayBeCaptured(V, &CB, MaxUsesToExplore);
     if (UseNewOBB)
     delete OBB;


_______________________________________________
llvm-commits mailing list
llvm-commits at lists.llvm.org<mailto: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/20190103/40a24d88/attachment.html>


More information about the llvm-commits mailing list