[llvm] 97a00b7 - [MCA] Fix for uninitialised member in constructor. NFC
Andrea Di Biagio via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 24 04:22:58 PDT 2021
Author: Andrea Di Biagio
Date: 2021-03-24T11:21:59Z
New Revision: 97a00b7b20832cdf9d426f1911c8ac5bd67f040d
URL: https://github.com/llvm/llvm-project/commit/97a00b7b20832cdf9d426f1911c8ac5bd67f040d
DIFF: https://github.com/llvm/llvm-project/commit/97a00b7b20832cdf9d426f1911c8ac5bd67f040d.diff
LOG: [MCA] Fix for uninitialised member in constructor. NFC
Added:
Modified:
llvm/include/llvm/MCA/HardwareUnits/RegisterFile.h
llvm/lib/MCA/HardwareUnits/RegisterFile.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/MCA/HardwareUnits/RegisterFile.h b/llvm/include/llvm/MCA/HardwareUnits/RegisterFile.h
index 735ed7470280..510cff4b5934 100644
--- a/llvm/include/llvm/MCA/HardwareUnits/RegisterFile.h
+++ b/llvm/include/llvm/MCA/HardwareUnits/RegisterFile.h
@@ -45,7 +45,9 @@ class WriteRef {
static const unsigned INVALID_IID;
public:
- WriteRef() : IID(INVALID_IID), WriteBackCycle(), WriteResID(), Write() {}
+ WriteRef()
+ : IID(INVALID_IID), WriteBackCycle(), WriteResID(), RegisterID(),
+ Write() {}
WriteRef(unsigned SourceIndex, WriteState *WS);
unsigned getSourceIndex() const { return IID; }
diff --git a/llvm/lib/MCA/HardwareUnits/RegisterFile.cpp b/llvm/lib/MCA/HardwareUnits/RegisterFile.cpp
index eface5b37118..a48915dbed73 100644
--- a/llvm/lib/MCA/HardwareUnits/RegisterFile.cpp
+++ b/llvm/lib/MCA/HardwareUnits/RegisterFile.cpp
@@ -25,7 +25,8 @@ namespace mca {
const unsigned WriteRef::INVALID_IID = std::numeric_limits<unsigned>::max();
WriteRef::WriteRef(unsigned SourceIndex, WriteState *WS)
- : IID(SourceIndex), WriteBackCycle(), WriteResID(), Write(WS) {}
+ : IID(SourceIndex), WriteBackCycle(), WriteResID(), RegisterID(),
+ Write(WS) {}
void WriteRef::commit() {
assert(Write && Write->isExecuted() && "Cannot commit before write back!");
More information about the llvm-commits
mailing list