diff options
author | Lang Hames <lhames@gmail.com> | 2014-03-17 01:22:54 +0000 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2014-03-17 01:22:54 +0000 |
commit | 3dd951e842c90476d22f071cae2a6848790ad4cc (patch) | |
tree | 667d0f3e5939593ac16f3af277041b21f874cfba /lib/CodeGen/MachineInstr.cpp | |
parent | 7f0871c97fd3dc110cdb8546f46f61b33cf32d78 (diff) | |
download | llvm-3dd951e842c90476d22f071cae2a6848790ad4cc.tar.gz llvm-3dd951e842c90476d22f071cae2a6848790ad4cc.tar.bz2 llvm-3dd951e842c90476d22f071cae2a6848790ad4cc.tar.xz |
[X86] New and improved VZeroUpperInserter optimization.
- Adds support for inserting vzerouppers before tail-calls.
This is enabled implicitly by having MachineInstr::copyImplicitOps preserve
regmask operands, which allows VZeroUpperInserter to see where tail-calls use
vector registers.
- Fixes a bug that caused the previous version of this optimization to miss some
vzeroupper insertion points in loops. (Loops-with-vector-code that followed
loops-without-vector-code were mistakenly overlooked by the previous version).
- New algorithm never revisits instructions.
Fixes <rdar://problem/16228798>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204021 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineInstr.cpp')
-rw-r--r-- | lib/CodeGen/MachineInstr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp index bbb5cd203b..9b9b7f089c 100644 --- a/lib/CodeGen/MachineInstr.cpp +++ b/lib/CodeGen/MachineInstr.cpp @@ -1434,7 +1434,7 @@ void MachineInstr::copyImplicitOps(MachineFunction &MF, for (unsigned i = MI->getDesc().getNumOperands(), e = MI->getNumOperands(); i != e; ++i) { const MachineOperand &MO = MI->getOperand(i); - if (MO.isReg() && MO.isImplicit()) + if ((MO.isReg() && MO.isImplicit()) || MO.isRegMask()) addOperand(MF, MO); } } |