summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-mca/lib/HardwareUnits
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/llvm-mca/lib/HardwareUnits')
-rw-r--r--llvm/tools/llvm-mca/lib/HardwareUnits/RegisterFile.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/tools/llvm-mca/lib/HardwareUnits/RegisterFile.cpp b/llvm/tools/llvm-mca/lib/HardwareUnits/RegisterFile.cpp
index 6bc63a0db50..f96e4cab4b9 100644
--- a/llvm/tools/llvm-mca/lib/HardwareUnits/RegisterFile.cpp
+++ b/llvm/tools/llvm-mca/lib/HardwareUnits/RegisterFile.cpp
@@ -185,11 +185,11 @@ void RegisterFile::addRegisterWrite(WriteRef Write,
// register is allocated.
ShouldAllocatePhysRegs = false;
- if (OtherWrite.getWriteState() &&
- (OtherWrite.getSourceIndex() != Write.getSourceIndex())) {
+ WriteState *OtherWS = OtherWrite.getWriteState();
+ if (OtherWS && (OtherWrite.getSourceIndex() != Write.getSourceIndex())) {
// This partial write has a false dependency on RenameAs.
assert(!IsEliminated && "Unexpected partial update!");
- WS.setDependentWrite(OtherWrite.getWriteState());
+ OtherWS->addUser(&WS);
}
}
}
OpenPOWER on IntegriCloud