summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MCA/HardwareUnits/RegisterFile.cpp
diff options
context:
space:
mode:
authorAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>2019-02-18 11:27:11 +0000
committerAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>2019-02-18 11:27:11 +0000
commit7a950ed587ba8d4850d9c755501540b897185724 (patch)
treebaec0a4d5220d86a99b530ee9f58f2d1f1275daf /llvm/lib/MCA/HardwareUnits/RegisterFile.cpp
parentfc03fc6e69195a65d7d82668165df03e27d0940a (diff)
downloadbcm5719-llvm-7a950ed587ba8d4850d9c755501540b897185724.tar.gz
bcm5719-llvm-7a950ed587ba8d4850d9c755501540b897185724.zip
[MCA] Slightly refactor method writeStartEvent in WriteState and ReadState. NFCI
This is another change in preparation for PR37494. No functional change intended. llvm-svn: 354261
Diffstat (limited to 'llvm/lib/MCA/HardwareUnits/RegisterFile.cpp')
-rw-r--r--llvm/lib/MCA/HardwareUnits/RegisterFile.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/MCA/HardwareUnits/RegisterFile.cpp b/llvm/lib/MCA/HardwareUnits/RegisterFile.cpp
index 3621d182b3e..995c50fc6a8 100644
--- a/llvm/lib/MCA/HardwareUnits/RegisterFile.cpp
+++ b/llvm/lib/MCA/HardwareUnits/RegisterFile.cpp
@@ -188,7 +188,7 @@ void RegisterFile::addRegisterWrite(WriteRef Write,
if (OtherWS && (OtherWrite.getSourceIndex() != Write.getSourceIndex())) {
// This partial write has a false dependency on RenameAs.
assert(!IsEliminated && "Unexpected partial update!");
- OtherWS->addUser(&WS);
+ OtherWS->addUser(OtherWrite.getSourceIndex(), &WS);
}
}
}
@@ -425,7 +425,7 @@ void RegisterFile::addRegisterRead(ReadState &RS,
WriteState &WS = *WR.getWriteState();
unsigned WriteResID = WS.getWriteResourceID();
int ReadAdvance = STI.getReadAdvanceCycles(SC, RD.UseIndex, WriteResID);
- WS.addUser(&RS, ReadAdvance);
+ WS.addUser(WR.getSourceIndex(), &RS, ReadAdvance);
}
}
OpenPOWER on IntegriCloud