[llvm] [NFC][Attributor] Drop the comment on the indirect-call address space cast (PR #222139)

Larry Meadows via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 8 13:49:37 PDT 2026


https://github.com/lfmeadow created https://github.com/llvm/llvm-project/pull/222139

Follow-up to #222097, which merged before this was addressed.

@efriedma-quic pointed out that the comment described the change rather than the
code, and that address space zero is not relevant to the fixed code. Removing
it; `getProgramAddressSpace()` and the cast say what is happening.


>From 540ec4c697df3f2e1806d8c8bf32cedd7fe24660 Mon Sep 17 00:00:00 2001
From: Larry Meadows <Lawrence.Meadows at amd.com>
Date: Tue, 8 Sep 2026 15:48:22 -0500
Subject: [PATCH] [NFC][Attributor] Drop the comment on the indirect-call
 address space cast

The comment described the change rather than the code, and referred to address
space zero, which the code no longer mentions. Post-commit review on #222097
asked for it to go.
---
 llvm/lib/Transforms/IPO/AttributorAttributes.cpp | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/llvm/lib/Transforms/IPO/AttributorAttributes.cpp b/llvm/lib/Transforms/IPO/AttributorAttributes.cpp
index 22af6f7741544..86c38680ecc55 100644
--- a/llvm/lib/Transforms/IPO/AttributorAttributes.cpp
+++ b/llvm/lib/Transforms/IPO/AttributorAttributes.cpp
@@ -12495,10 +12495,6 @@ struct AAIndirectCallInfoCallSite : public AAIndirectCallInfo {
       return ChangeStatus::UNCHANGED;
 
     ChangeStatus Changed = ChangeStatus::UNCHANGED;
-    // The callees this is compared against below are functions, which live in
-    // the program address space. Normalize to that rather than to zero: they
-    // are only the same address space on a target that leaves it at the
-    // default.
     unsigned ProgramAS = CB->getDataLayout().getProgramAddressSpace();
     Value *FP = CB->getCalledOperand();
     if (FP->getType()->getPointerAddressSpace() != ProgramAS)



More information about the llvm-commits mailing list