[PATCH] D121686: [CaptureTracking][NFC] Rename PASSTHROUGH to USER_MAY_CAPTURE

Dmitry Sidorov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 15 04:12:00 PDT 2022


sidorovd created this revision.
sidorovd added reviewers: jdoerfert, nikic.
Herald added subscribers: ormris, okura, kuter, hiraditya.
Herald added a project: All.
sidorovd requested review of this revision.
Herald added a reviewer: sstefan1.
Herald added a reviewer: baziotis.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

PASSTHROUGH is also a macro defined in wingdi.h, which is included in windows.h.


https://reviews.llvm.org/D121686

Files:
  llvm/include/llvm/Analysis/CaptureTracking.h
  llvm/lib/Analysis/CaptureTracking.cpp
  llvm/lib/Transforms/IPO/AttributorAttributes.cpp


Index: llvm/lib/Transforms/IPO/AttributorAttributes.cpp
===================================================================
--- llvm/lib/Transforms/IPO/AttributorAttributes.cpp
+++ llvm/lib/Transforms/IPO/AttributorAttributes.cpp
@@ -5064,7 +5064,7 @@
       return true;
     case UseCaptureKind::MAY_CAPTURE:
       return checkUse(A, T, U, Follow);
-    case UseCaptureKind::PASSTHROUGH:
+    case UseCaptureKind::USER_MAY_CAPTURE:
       Follow = true;
       return true;
     }
Index: llvm/lib/Analysis/CaptureTracking.cpp
===================================================================
--- llvm/lib/Analysis/CaptureTracking.cpp
+++ llvm/lib/Analysis/CaptureTracking.cpp
@@ -304,7 +304,7 @@
     // getUnderlyingObject in ValueTracking or DecomposeGEPExpression
     // in BasicAA also need to know about this property.
     if (isIntrinsicReturningPointerAliasingArgumentWithoutCapturing(Call, true))
-      return UseCaptureKind::PASSTHROUGH;
+      return UseCaptureKind::USER_MAY_CAPTURE;
 
     // Volatile operations effectively capture the memory location that they
     // load and store to.
@@ -371,7 +371,7 @@
   case Instruction::Select:
   case Instruction::AddrSpaceCast:
     // The original value is not captured via this if the new value isn't.
-    return UseCaptureKind::PASSTHROUGH;
+    return UseCaptureKind::USER_MAY_CAPTURE;
   case Instruction::ICmp: {
     unsigned Idx = U.getOperandNo();
     unsigned OtherIdx = 1 - Idx;
@@ -450,7 +450,7 @@
       if (Tracker->captured(U))
         return;
       continue;
-    case UseCaptureKind::PASSTHROUGH:
+    case UseCaptureKind::USER_MAY_CAPTURE:
       if (!AddUses(U->getUser()))
         return;
       continue;
Index: llvm/include/llvm/Analysis/CaptureTracking.h
===================================================================
--- llvm/include/llvm/Analysis/CaptureTracking.h
+++ llvm/include/llvm/Analysis/CaptureTracking.h
@@ -110,7 +110,7 @@
   enum class UseCaptureKind {
     NO_CAPTURE,
     MAY_CAPTURE,
-    PASSTHROUGH,
+    USER_MAY_CAPTURE,
   };
 
   /// Determine what kind of capture behaviour \p U may exhibit.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D121686.415384.patch
Type: text/x-patch
Size: 2117 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220315/0d826b2c/attachment.bin>


More information about the llvm-commits mailing list