[llvm] [llvm-mca] Account for AcquireAtCycles in llvm-mca (PR #80742)

via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 5 13:10:59 PST 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 dea855de46bd4d3e103646a7f459856d88dd7488 c7a33f6cf29202da846a1a747e93bda9975f5a64 -- llvm/include/llvm/MCA/HWEventListener.h llvm/include/llvm/MCA/HardwareUnits/ResourceManager.h llvm/include/llvm/MCA/HardwareUnits/Scheduler.h llvm/include/llvm/MCA/Support.h llvm/lib/MCA/HardwareUnits/ResourceManager.cpp llvm/lib/MCA/HardwareUnits/Scheduler.cpp llvm/lib/MCA/InstrBuilder.cpp llvm/lib/MCA/Stages/InstructionTables.cpp llvm/lib/MCA/Support.cpp llvm/tools/llvm-mca/Views/BottleneckAnalysis.cpp llvm/tools/llvm-mca/Views/ResourcePressureView.cpp llvm/tools/llvm-mca/Views/ResourcePressureView.h
``````````

</details>

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

``````````diff
diff --git a/llvm/include/llvm/MCA/HardwareUnits/Scheduler.h b/llvm/include/llvm/MCA/HardwareUnits/Scheduler.h
index 3acf142fae..5074bf99e8 100644
--- a/llvm/include/llvm/MCA/HardwareUnits/Scheduler.h
+++ b/llvm/include/llvm/MCA/HardwareUnits/Scheduler.h
@@ -201,10 +201,8 @@ public:
   /// and a vector of instructions that transitioned to the ready state as a
   /// result of this event.
   void issueInstruction(
-      InstRef &IR,
-      SmallVectorImpl<std::pair<ResourceRef, NumCyclesUsed>> &Used,
-      SmallVectorImpl<InstRef> &Pending,
-      SmallVectorImpl<InstRef> &Ready);
+      InstRef &IR, SmallVectorImpl<std::pair<ResourceRef, NumCyclesUsed>> &Used,
+      SmallVectorImpl<InstRef> &Pending, SmallVectorImpl<InstRef> &Ready);
 
   /// Returns true if IR has to be issued immediately, or if IR is a zero
   /// latency instruction.
diff --git a/llvm/lib/MCA/Stages/InstructionTables.cpp b/llvm/lib/MCA/Stages/InstructionTables.cpp
index c4e83d00f4..5d40ace70a 100644
--- a/llvm/lib/MCA/Stages/InstructionTables.cpp
+++ b/llvm/lib/MCA/Stages/InstructionTables.cpp
@@ -53,8 +53,7 @@ Error InstructionTables::execute(InstRef &IR) {
       for (unsigned I2 = 0, E2 = SubUnit.NumUnits; I2 < E2; ++I2) {
         ResourceRef ResourceUnit = std::make_pair(SubUnitIdx, 1U << I2);
         UsedResources.emplace_back(std::make_pair(
-            ResourceUnit,
-            NumCyclesUsed(Cycles, NumUnits * SubUnit.NumUnits)));
+            ResourceUnit, NumCyclesUsed(Cycles, NumUnits * SubUnit.NumUnits)));
       }
     }
   }

``````````

</details>


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


More information about the llvm-commits mailing list