[llvm] bac9799 - [CaptureTracking] Avoid duplicate shouldExplode() check (NFCI)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 7 01:17:13 PST 2020


Author: Nikita Popov
Date: 2020-11-07T10:16:58+01:00
New Revision: bac97993ca9351b71efbaac07632ef62e0fdb02a

URL: https://github.com/llvm/llvm-project/commit/bac97993ca9351b71efbaac07632ef62e0fdb02a
DIFF: https://github.com/llvm/llvm-project/commit/bac97993ca9351b71efbaac07632ef62e0fdb02a.diff

LOG: [CaptureTracking] Avoid duplicate shouldExplode() check (NFCI)

We check shouldExplore() before adding uses to the worklist, so
uses that should not be explored will not reach captured() in the
first place.

Added: 
    

Modified: 
    llvm/lib/Analysis/CaptureTracking.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Analysis/CaptureTracking.cpp b/llvm/lib/Analysis/CaptureTracking.cpp
index 06a3b81e0362..0cb90695a053 100644
--- a/llvm/lib/Analysis/CaptureTracking.cpp
+++ b/llvm/lib/Analysis/CaptureTracking.cpp
@@ -159,9 +159,6 @@ namespace {
       if (isa<ReturnInst>(U->getUser()) && !ReturnCaptures)
         return false;
 
-      if (!shouldExplore(U))
-        return false;
-
       Captured = true;
       return true;
     }


        


More information about the llvm-commits mailing list