[llvm] [Inliner] Don't propagate access attr to byval params (PR #112256)
Andreas Jonson via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 14 13:33:09 PDT 2024
================
@@ -1398,7 +1398,7 @@ static void AddParamAndFnBasicAttributes(const CallBase &CB,
if (!Arg)
continue;
- if (AL.hasParamAttr(I, Attribute::ByVal))
+ if (NewInnerCB->getParamAttr(I, Attribute::ByVal).isValid())
----------------
andjo403 wrote:
why not use the paramHasAttr funktion instead of creating a Attribute and then check if it is valid?
```suggestion
if (NewInnerCB->paramHasAttr(I, Attribute::ByVal))
```
https://github.com/llvm/llvm-project/pull/112256
More information about the llvm-commits
mailing list