[llvm] [AMDGPU] Fix variable name in PhiIncomingAnalysis. NFC. (PR #217899)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 21 05:27:02 PDT 2026


https://github.com/jayfoad created https://github.com/llvm/llvm-project/pull/217899

All BBs in ReachableMap are "reachable". The bool map value tells you
whether a reachable BB is a "source", as in isSource().


>From a51f18a069d152bafcb242822250c729b87dee26 Mon Sep 17 00:00:00 2001
From: Jay Foad <jay.foad at amd.com>
Date: Fri, 21 Aug 2026 13:24:40 +0100
Subject: [PATCH] [AMDGPU] Fix variable name in PhiIncomingAnalysis. NFC.

All BBs in ReachableMap are "reachable". The bool map value tells you
whether a reachable BB is a "source", as in isSource().
---
 llvm/lib/Target/AMDGPU/SILowerI1Copies.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/llvm/lib/Target/AMDGPU/SILowerI1Copies.cpp b/llvm/lib/Target/AMDGPU/SILowerI1Copies.cpp
index 77438bb35606d..62b3638812ab9 100644
--- a/llvm/lib/Target/AMDGPU/SILowerI1Copies.cpp
+++ b/llvm/lib/Target/AMDGPU/SILowerI1Copies.cpp
@@ -161,7 +161,7 @@ class PhiIncomingAnalysis {
         append_range(Stack, MBB->successors());
     }
 
-    for (auto &[MBB, Reachable] : ReachableMap) {
+    for (auto &[MBB, IsSource] : ReachableMap) {
       bool HaveReachablePred = false;
       for (MachineBasicBlock *Pred : MBB->predecessors()) {
         if (ReachableMap.count(Pred)) {
@@ -171,7 +171,7 @@ class PhiIncomingAnalysis {
         }
       }
       if (!HaveReachablePred)
-        Reachable = true;
+        IsSource = true;
       if (HaveReachablePred) {
         for (MachineBasicBlock *UnreachablePred : Stack) {
           if (!llvm::is_contained(Predecessors, UnreachablePred))



More information about the llvm-commits mailing list