[llvm] [AMDGPU] Propagate alias information in AMDGPULowerKernelArguments. (PR #144714)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 18 23:04:57 PDT 2025
================
@@ -1114,17 +1115,30 @@ void ScopedAliasMetadataDeepCloner::remap(Function::iterator FStart,
/// then add new alias scopes for each noalias argument, tag the mapped noalias
/// parameters with noalias metadata specifying the new scope, and tag all
/// non-derived loads, stores and memory intrinsics with the new alias scopes.
-static void AddAliasScopeMetadata(CallBase &CB, ValueToValueMapTy &VMap,
- const DataLayout &DL, AAResults *CalleeAAR,
- ClonedCodeInfo &InlinedFunctionInfo) {
- if (!EnableNoAliasConversion)
- return;
-
- const Function *CalledFunc = CB.getCalledFunction();
+static void addAliasScopeMetadataImpl(CallBase *CB, Function *F,
+ ValueToValueMapTy *VMap,
+ const DataLayout &DL,
+ AAResults *CalleeAAR,
+ ClonedCodeInfo *InlinedFunctionInfo,
+ bool UseNoAliasIntrinsic) {
+ assert(CB || F);
+ const Function *CalledFunc = CB ? CB->getCalledFunction() : F;
SmallVector<const Argument *, 4> NoAliasArgs;
+ std::function<bool(const Argument *, Attribute::AttrKind)> paramHasAttr;
----------------
arsenm wrote:
This doesn't need to be a std::function. I also don't see this adding anything, it would be clearer to just directly do the attribute test in context
https://github.com/llvm/llvm-project/pull/144714
More information about the llvm-commits
mailing list