[clang] [Inliner] Add argument/function attribute propagation before inlining. (PR #68164)

via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 3 15:37:50 PDT 2023


github-actions[bot] wrote:


<!--LLVM CODE FORMAT COMMENT: {clang-format}-->

:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff 1cfaa863bc36d25625114b432e2ddf35d2302452 f8c9f5bce65756598da22e8aec5d91fb66b16d5c -- clang/test/CodeGen/SystemZ/builtins-systemz-zvector.c clang/test/CodeGen/SystemZ/builtins-systemz-zvector2.c llvm/include/llvm/Support/ModRef.h llvm/lib/Transforms/Utils/InlineFunction.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/Transforms/Utils/InlineFunction.cpp b/llvm/lib/Transforms/Utils/InlineFunction.cpp
index 02b80bfc8e17..091bbe02c520 100644
--- a/llvm/lib/Transforms/Utils/InlineFunction.cpp
+++ b/llvm/lib/Transforms/Utils/InlineFunction.cpp
@@ -30,8 +30,8 @@
 #include "llvm/Analysis/ProfileSummaryInfo.h"
 #include "llvm/Analysis/ValueTracking.h"
 #include "llvm/Analysis/VectorUtils.h"
-#include "llvm/IR/AttributeMask.h"
 #include "llvm/IR/Argument.h"
+#include "llvm/IR/AttributeMask.h"
 #include "llvm/IR/Attributes.h"
 #include "llvm/IR/BasicBlock.h"
 #include "llvm/IR/CFG.h"
@@ -1418,8 +1418,7 @@ static void AddParamAndFnBasicAttributes(const CallBase &CB,
             if (const Argument *Arg = dyn_cast<Argument>(UnderlyingV)) {
               unsigned ArgNo = Arg->getArgNo();
               // If so, propagate its access attributes.
-              AL = AL.addParamAttributes(Context, I,
-                                         ValidParamAttrs[ArgNo]);
+              AL = AL.addParamAttributes(Context, I, ValidParamAttrs[ArgNo]);
             }
           }
           NewInnerCB->setAttributes(AL);

``````````

</details>


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


More information about the cfe-commits mailing list