From 234f7380ec8301d14e53af6b1befe831037ffddc Mon Sep 17 00:00:00 2001 From: Artur Pilipenko Date: Tue, 18 Dec 2018 03:32:33 +0000 Subject: [PATCH] [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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349438 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/CaptureTracking.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/Analysis/CaptureTracking.cpp b/lib/Analysis/CaptureTracking.cpp index 7c74c65b3b0..5cac5e5ca61 100644 --- a/lib/Analysis/CaptureTracking.cpp +++ b/lib/Analysis/CaptureTracking.cpp @@ -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; -- 2.50.1