]> granicus.if.org Git - llvm/commit
[MCA] Correctly update register definitions in the PRF after move elimination.
authorAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Mon, 18 Feb 2019 14:15:25 +0000 (14:15 +0000)
committerAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Mon, 18 Feb 2019 14:15:25 +0000 (14:15 +0000)
commit628018073d775a1309c50c5ce9bd7bc7b490a50b
tree05e7ed4782d114464131b85f541ea930054a001b
parent3d4666cd74d3aaab54ce4076ae92b119cfe101ba
[MCA] Correctly update register definitions in the PRF after move elimination.

This patch fixes a bug where register writes performed by optimizable register
moves were sometimes wrongly treated like partial register updates.  Before this
patch, llvm-mca wrongly predicted a 1.50 IPC for test reg-move-elimination-6.s
(added by this patch).  With this patch, llvm-mca correctly updates the register
defintions in the PRF, and the IPC for that test is now correctly reported as 2.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@354271 91177308-0d34-0410-b5e6-96231b3b80d8
lib/MCA/HardwareUnits/RegisterFile.cpp
test/tools/llvm-mca/X86/BtVer2/reg-move-elimination-6.s [new file with mode: 0644]