diff options
author | Andrew Trick <atrick@apple.com> | 2013-10-15 03:39:43 +0000 |
---|---|---|
committer | Andrew Trick <atrick@apple.com> | 2013-10-15 03:39:43 +0000 |
commit | 3a99693c5a9866f9e0ae3b7253e1952176e11df1 (patch) | |
tree | b5ed01988f95844aa85805e7c6edd4493f00cdc3 /llvm/lib/CodeGen/ExecutionDepsFix.cpp | |
parent | 9bf87b484c09a5fb865f6815c9ab3772e0f743b9 (diff) | |
download | bcm5719-llvm-3a99693c5a9866f9e0ae3b7253e1952176e11df1.tar.gz bcm5719-llvm-3a99693c5a9866f9e0ae3b7253e1952176e11df1.zip |
Improve on r192635, ExeDepsFix for avx, and add a test case.
rdar:15221834 False AVX register dependencies cause 5x slowdown on
flops-5/6 and significant slowdown on several others.
This was blocking the switch to MI-Sched.
llvm-svn: 192669
Diffstat (limited to 'llvm/lib/CodeGen/ExecutionDepsFix.cpp')
-rw-r--r-- | llvm/lib/CodeGen/ExecutionDepsFix.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/ExecutionDepsFix.cpp b/llvm/lib/CodeGen/ExecutionDepsFix.cpp index 0d26f9d4cba..031f19c135a 100644 --- a/llvm/lib/CodeGen/ExecutionDepsFix.cpp +++ b/llvm/lib/CodeGen/ExecutionDepsFix.cpp @@ -557,6 +557,9 @@ void ExeDepsFix::processUndefReads(MachineBasicBlock *MBB) { for (MachineBasicBlock::reverse_iterator I = MBB->rbegin(), E = MBB->rend(); I != E; ++I) { + // Update liveness, including the current instrucion's defs. + LiveUnits.stepBackward(*I, *TRI); + if (UndefMI == &*I) { if (!LiveUnits.contains(UndefMI->getOperand(OpIdx).getReg(), *TRI)) TII->breakPartialRegDependency(UndefMI, OpIdx, TRI); @@ -568,7 +571,6 @@ void ExeDepsFix::processUndefReads(MachineBasicBlock *MBB) { UndefMI = UndefReads.back().first; OpIdx = UndefReads.back().second; } - LiveUnits.stepBackward(*I, *TRI); } } |