[CaptureTracking] Avoid duplicate shouldExplode() check (NFCI)
authorNikita Popov <nikita.ppv@gmail.com>
Sat, 7 Nov 2020 09:13:49 +0000 (10:13 +0100)
committerNikita Popov <nikita.ppv@gmail.com>
Sat, 7 Nov 2020 09:16:58 +0000 (10:16 +0100)
We check shouldExplore() before adding uses to the worklist, so
uses that should not be explored will not reach captured() in the
first place.

llvm/lib/Analysis/CaptureTracking.cpp

index 06a3b81..0cb9069 100644 (file)
@@ -159,9 +159,6 @@ namespace {
       if (isa<ReturnInst>(U->getUser()) && !ReturnCaptures)
         return false;
 
-      if (!shouldExplore(U))
-        return false;
-
       Captured = true;
       return true;
     }