]> granicus.if.org Git - llvm/commitdiff
[CaptureTracking] Pass MaxUsesToExplore from wrappers to the actual implementation
authorArtur Pilipenko <apilipenko@azulsystems.com>
Tue, 18 Dec 2018 03:32:33 +0000 (03:32 +0000)
committerArtur Pilipenko <apilipenko@azulsystems.com>
Tue, 18 Dec 2018 03:32:33 +0000 (03:32 +0000)
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349438 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/CaptureTracking.cpp

index 7c74c65b3b0eb9c3b160e087f0f19424b5ea75cc..5cac5e5ca616a4f9a4706f1ea398d08bda8afbce 100644 (file)
@@ -170,7 +170,7 @@ bool llvm::PointerMayBeCaptured(const Value *V,
   (void)StoreCaptures;
 
   SimpleCaptureTracker SCT(ReturnCaptures);
-  PointerMayBeCaptured(V, &SCT);
+  PointerMayBeCaptured(V, &SCT, MaxUsesToExplore);
   return SCT.Captured;
 }
 
@@ -194,7 +194,8 @@ bool llvm::PointerMayBeCapturedBefore(const Value *V, bool ReturnCaptures,
   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(const Value *V, bool ReturnCaptures,
   // with StoreCaptures.
 
   CapturesBefore CB(ReturnCaptures, I, DT, IncludeI, OBB);
-  PointerMayBeCaptured(V, &CB);
+  PointerMayBeCaptured(V, &CB, MaxUsesToExplore);
 
   if (UseNewOBB)
     delete OBB;