diff options
author | Andrew Trick <atrick@apple.com> | 2013-10-14 22:19:03 +0000 |
---|---|---|
committer | Andrew Trick <atrick@apple.com> | 2013-10-14 22:19:03 +0000 |
commit | a6a9ac5aa1092067e6e1546226d8bdd6a4bfcf99 (patch) | |
tree | d28e7ac2e1333f9dc7af9c1f71719d94cba35483 /lib/Target/X86/X86InstrInfo.h | |
parent | 966772931eea7cdc3cdd7199e304d667aa344bd7 (diff) | |
download | external_llvm-a6a9ac5aa1092067e6e1546226d8bdd6a4bfcf99.zip external_llvm-a6a9ac5aa1092067e6e1546226d8bdd6a4bfcf99.tar.gz external_llvm-a6a9ac5aa1092067e6e1546226d8bdd6a4bfcf99.tar.bz2 |
Fix the ExecutionDepsFix pass to handle AVX instructions.
This pass is needed to break false dependencies. Without it, unlucky
register assignment can result in wild (5x) swings in
performance. This pass was trying to handle AVX but not getting it
right. AVX doesn't have partial register defs, it has unused register
reads in which the high bits of a source operand are copied into the
unused bits of the dest.
Fixing this requires conservative liveness analysis. This is awkard
because the pass already has its own pseudo-liveness. However, proper
liveness is expensive, and we would like to use a generic utility to
compute it. The fix only invokes liveness on-demand. It is rare to
detect a case that needs undef-read dependence breaking, but when it
happens, it can be needed many times within a very large block.
I think the existing heuristic which uses a register window of 16 is
too conservative for loop-carried false dependencies. If the loop is a
reduction. The out-of-order engine may be able to execute several loop
iterations in parallel. However, I'll leave this tuning exercise for
next time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192635 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86InstrInfo.h')
-rw-r--r-- | lib/Target/X86/X86InstrInfo.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Target/X86/X86InstrInfo.h b/lib/Target/X86/X86InstrInfo.h index a0d1ba7..532e780 100644 --- a/lib/Target/X86/X86InstrInfo.h +++ b/lib/Target/X86/X86InstrInfo.h @@ -369,6 +369,8 @@ public: unsigned getPartialRegUpdateClearance(const MachineInstr *MI, unsigned OpNum, const TargetRegisterInfo *TRI) const; + unsigned getUndefRegClearance(const MachineInstr *MI, unsigned &OpNum, + const TargetRegisterInfo *TRI) const; void breakPartialRegDependency(MachineBasicBlock::iterator MI, unsigned OpNum, const TargetRegisterInfo *TRI) const; |