[llvm] [AMDGPU] Propagate alias information in AMDGPULowerKernelArguments. (PR #144714)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 25 04:52:12 PDT 2025


================
@@ -363,6 +363,17 @@ LLVM_ABI void updateProfileCallee(
     Function *Callee, int64_t EntryDelta,
     const ValueMap<const Value *, WeakTrackingVH> *VMap = nullptr);
 
+/// Adds `!noalias` and `!alias.scope` metadata for `CB`'s called function's
+/// `noalias` argument based memory accesses.
+void addAliasScopeMetadata(CallBase &CB, ValueToValueMapTy &VMap,
+                           const DataLayout &DL, AAResults *CalleeAAR,
+                           ClonedCodeInfo &InlinedFunctionInfo,
+                           bool UseNoAliasIntrinsic);
+
+/// Adds `!noalias` and `!alias.scope` metadata for `F`'s `noalias` argument
+/// based memory accesses.
+void addAliasScopeMetadata(Function &F);
----------------
arsenm wrote:

This seems a bit too broad, especially given the name. The two overlands of addAliasScopeMetadata do very different things. Probably should always have more specific context, or at least name this to clearly state what it's doing something with all of the arguments. Or better yet take a list of the specific arguments 

https://github.com/llvm/llvm-project/pull/144714


More information about the llvm-commits mailing list