[llvm] [RFC] IR: Define noalias.addrspace metadata (PR #102461)
Rahul Joshi via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 9 07:50:41 PDT 2024
================
@@ -8021,6 +8021,43 @@ it will contain a list of ids, including the ids of the callsites in the
full inline sequence, in order from the leaf-most call's id to the outermost
inlined call.
+
+'``noalias.addrspace``' Metadata
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+The ``noalias.addrspace`` metadata is used to identify memory
+operations which cannot access a range of address spaces. It is
----------------
jurahul wrote:
I was thinking of something like this:
- A new AddressSpaceNoAliasAA pass that infers NoAlias based on address spaces of pointers.
- Its constructor will query a NoAlias map `SmallSet<int, SmallSet<int>>` from the Target, so targets can provide base info about which address spaces do not alias with which other. Default will be empty, and then this AA will conservatively infer that all address spaces overlap/interfere with all others.
- The new metadata essentially specifies, per pointer an overriding entry in the NoAlias map for that instruction.
- The new metadata can also be attached to calls and intrinsics that may memory side effects.
- `AAMDNodes` will start carrying this info as an additional field.
Please let me know if something like this might be useful.
https://github.com/llvm/llvm-project/pull/102461
More information about the llvm-commits
mailing list