[llvm] [CostModel] Add -cost-kind=all costmodel output (PR #130490)

via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 9 07:36:11 PDT 2025


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 107aa6a3d3ab96b7eec55e1ec5c3eabfa6ab2f9f 498236372b6e83b67b8689f537ba91cab49e4837 --extensions cpp -- llvm/lib/Analysis/CostModel.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Analysis/CostModel.cpp b/llvm/lib/Analysis/CostModel.cpp
index f41ede3a35..3104142f0a 100644
--- a/llvm/lib/Analysis/CostModel.cpp
+++ b/llvm/lib/Analysis/CostModel.cpp
@@ -97,10 +97,12 @@ PreservedAnalyses CostModelPrinterPass::run(Function &F,
       OS << "Cost Model: ";
       if (CostKind == OutputCostKind::All) {
         OS << "Found costs of ";
-        InstructionCost RThru = getCost(Inst, TTI::TCK_RecipThroughput, TTI, TLI);
+        InstructionCost RThru =
+            getCost(Inst, TTI::TCK_RecipThroughput, TTI, TLI);
         InstructionCost CodeSize = getCost(Inst, TTI::TCK_CodeSize, TTI, TLI);
         InstructionCost Lat = getCost(Inst, TTI::TCK_Latency, TTI, TLI);
-        InstructionCost SizeLat = getCost(Inst, TTI::TCK_SizeAndLatency, TTI, TLI);
+        InstructionCost SizeLat =
+            getCost(Inst, TTI::TCK_SizeAndLatency, TTI, TLI);
         if (RThru == CodeSize && RThru == Lat && RThru == SizeLat)
           OS << RThru;
         else

``````````

</details>


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


More information about the llvm-commits mailing list