[llvm] [SystemZ] Remove high inlining threshold multiplier. (PR #106058)

via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 26 04:25:01 PDT 2024


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 00def06c6e9a0582e85bef5f3a186839c48d1ae2 52682fef381d3c29f9d74efddd0523905ca4bffb --extensions h,cpp -- llvm/lib/Target/SystemZ/SystemZTargetTransformInfo.cpp llvm/lib/Target/SystemZ/SystemZTargetTransformInfo.h
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Target/SystemZ/SystemZTargetTransformInfo.cpp b/llvm/lib/Target/SystemZ/SystemZTargetTransformInfo.cpp
index 44dd61c0fe..accd63c1f7 100644
--- a/llvm/lib/Target/SystemZ/SystemZTargetTransformInfo.cpp
+++ b/llvm/lib/Target/SystemZ/SystemZTargetTransformInfo.cpp
@@ -63,12 +63,10 @@ static void countNumMemAccesses(const Value *Ptr, unsigned &NumStores,
         if (const auto *SI = dyn_cast<StoreInst>(User)) {
           if (SI->getPointerOperand() == Ptr && !SI->isVolatile())
             NumStores++;
-        }
-        else if (const auto *LI = dyn_cast<LoadInst>(User)) {
+        } else if (const auto *LI = dyn_cast<LoadInst>(User)) {
           if (LI->getPointerOperand() == Ptr && !LI->isVolatile())
             NumLoads++;
-        }
-        else if (const auto *GEP = dyn_cast<GetElementPtrInst>(User)) {
+        } else if (const auto *GEP = dyn_cast<GetElementPtrInst>(User)) {
           if (GEP->getPointerOperand() == Ptr)
             countNumMemAccesses(GEP, NumStores, NumLoads, F);
         }
@@ -122,7 +120,7 @@ unsigned SystemZTTIImpl::adjustInliningThreshold(const CallBase *CB) const {
   unsigned NumStores = 0;
   unsigned NumLoads = 0;
   for (unsigned OpIdx = 0; OpIdx != Callee->arg_size(); ++OpIdx) {
-    Value    *CallerArg = CB->getArgOperand(OpIdx);
+    Value *CallerArg = CB->getArgOperand(OpIdx);
     Argument *CalleeArg = Callee->getArg(OpIdx);
     if (isa<AllocaInst>(CallerArg))
       countNumMemAccesses(CalleeArg, NumStores, NumLoads, Callee);

``````````

</details>


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


More information about the llvm-commits mailing list