[llvm] [NFC][Attributor] Drop the comment on the indirect-call address space cast (PR #222139)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 8 13:50:23 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-transforms
Author: Larry Meadows (lfmeadow)
<details>
<summary>Changes</summary>
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.
---
Full diff: https://github.com/llvm/llvm-project/pull/222139.diff
1 Files Affected:
- (modified) llvm/lib/Transforms/IPO/AttributorAttributes.cpp (-4)
``````````diff
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)
``````````
</details>
https://github.com/llvm/llvm-project/pull/222139
More information about the llvm-commits
mailing list