[llvm] 83d4f68 - [MCA] Modernize RAWHazard (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 3 11:01:30 PDT 2023
Author: Kazu Hirata
Date: 2023-06-03T11:01:17-07:00
New Revision: 83d4f681c804414c861f2e0fcda980da54908065
URL: https://github.com/llvm/llvm-project/commit/83d4f681c804414c861f2e0fcda980da54908065
DIFF: https://github.com/llvm/llvm-project/commit/83d4f681c804414c861f2e0fcda980da54908065.diff
LOG: [MCA] Modernize RAWHazard (NFC)
Added:
Modified:
llvm/include/llvm/MCA/HardwareUnits/RegisterFile.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/MCA/HardwareUnits/RegisterFile.h b/llvm/include/llvm/MCA/HardwareUnits/RegisterFile.h
index 1b811978dd76e..5bd74ad5fe788 100644
--- a/llvm/include/llvm/MCA/HardwareUnits/RegisterFile.h
+++ b/llvm/include/llvm/MCA/HardwareUnits/RegisterFile.h
@@ -237,10 +237,10 @@ class RegisterFile : public HardwareUnit {
SmallVectorImpl<WriteRef> &Writes,
SmallVectorImpl<WriteRef> &CommittedWrites) const;
struct RAWHazard {
- MCPhysReg RegisterID;
- int CyclesLeft;
+ MCPhysReg RegisterID = 0;
+ int CyclesLeft = 0;
- RAWHazard() : RegisterID(), CyclesLeft() {}
+ RAWHazard() = default;
bool isValid() const { return RegisterID; }
bool hasUnknownCycles() const { return CyclesLeft < 0; }
};
More information about the llvm-commits
mailing list