[llvm] [MCA][ResourceManager] Fix a bug in the instruction issue logic. (PR #108386)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 12 06:28:09 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 bf8101e4fd1a532aed4c6b6a33d202e143ce303f c8a24d550fb8d1a3f30fc5f748435d22844a7e0e --extensions h,cpp -- llvm/include/llvm/MCA/HardwareUnits/ResourceManager.h llvm/lib/MCA/HardwareUnits/ResourceManager.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/include/llvm/MCA/HardwareUnits/ResourceManager.h b/llvm/include/llvm/MCA/HardwareUnits/ResourceManager.h
index 179a12ec9f..1742039fc3 100644
--- a/llvm/include/llvm/MCA/HardwareUnits/ResourceManager.h
+++ b/llvm/include/llvm/MCA/HardwareUnits/ResourceManager.h
@@ -232,9 +232,7 @@ public:
/// `NumUnits` available units.
bool isReady(unsigned NumUnits = 1) const;
- uint64_t getNumReadyUnits() const {
- return llvm::popcount(ReadyMask);
- }
+ uint64_t getNumReadyUnits() const { return llvm::popcount(ReadyMask); }
bool isAResourceGroup() const { return IsAGroup; }
@@ -434,19 +432,19 @@ public:
using ResourceWithCycles = std::pair<ResourceRef, ReleaseAtCycles>;
- void issueInstruction(
- const InstrDesc &Desc, SmallVectorImpl<ResourceWithCycles> &Pipes) {
+ void issueInstruction(const InstrDesc &Desc,
+ SmallVectorImpl<ResourceWithCycles> &Pipes) {
if (Desc.HasPartiallyOverlappingGroups)
return issueInstructionImpl(Desc, Pipes);
return fastIssueInstruction(Desc, Pipes);
}
- void fastIssueInstruction(
- const InstrDesc &Desc, SmallVectorImpl<ResourceWithCycles> &Pipes);
+ void fastIssueInstruction(const InstrDesc &Desc,
+ SmallVectorImpl<ResourceWithCycles> &Pipes);
- void issueInstructionImpl(
- const InstrDesc &Desc, SmallVectorImpl<ResourceWithCycles> &Pipes);
+ void issueInstructionImpl(const InstrDesc &Desc,
+ SmallVectorImpl<ResourceWithCycles> &Pipes);
void cycleEvent(SmallVectorImpl<ResourceRef> &ResourcesFreed);
``````````
</details>
https://github.com/llvm/llvm-project/pull/108386
More information about the llvm-commits
mailing list