[llvm] [InferAddressSpaces] Handle unconverted ptrmask (PR #140802)
Robert Imschweiler via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 21 06:42:12 PDT 2025
================
@@ -151,6 +152,34 @@ class TargetTransformInfoImplBase {
}
virtual bool isNoopAddrSpaceCast(unsigned, unsigned) const { return false; }
+
+ // Assuming that the cast between the two given addrspaces is not a noop,
+ // calculate the width of the given mask value so that it can be applied to
+ // the destination addrspace. In case it cannot be applied since the cast
+ // between the two addrspaces is invalid or the mask value is larger than the
+ // resulting addrspace bit-width, return an empty optional.
+ //
+ // Note that this currently expects the addrspaces to be integral. In case one
+ // of them isn't, an empty optional is returned.
+ virtual std::optional<uint64_t>
----------------
ro-i wrote:
done
https://github.com/llvm/llvm-project/pull/140802
More information about the llvm-commits
mailing list