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

via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 11 09:53:49 PDT 2026


Author: Larry Meadows
Date: 2026-09-11T09:53:44-07:00
New Revision: 177eb76979760d4c3920dc7fa7b2976db545040b

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

LOG: [NFC][Attributor] Drop the comment on the indirect-call address space cast (#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.

Added: 
    

Modified: 
    llvm/lib/Transforms/IPO/AttributorAttributes.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/IPO/AttributorAttributes.cpp b/llvm/lib/Transforms/IPO/AttributorAttributes.cpp
index c9178e38d431a..ba7e346916c65 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