[llvm] [InferAddressSpaces] Add a TTI hook for address space joins (PR #225161)
Alex MacLean via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 21 11:55:46 PDT 2026
================
@@ -146,6 +146,10 @@ class LLVM_ABI TargetTransformInfoImplBase {
virtual unsigned getFlatAddressSpace() const { return -1; }
+ virtual unsigned getAddressSpaceJoin(unsigned AS1, unsigned AS2) const {
+ return AS1 == AS2 ? AS1 : getFlatAddressSpace();
----------------
AlexMaclean wrote:
Agreed, I've moved this case to InferAS and added an assert here.
https://github.com/llvm/llvm-project/pull/225161
More information about the llvm-commits
mailing list