[X86] New and improved VZeroUpperInserter optimization.
authorLang Hames <lhames@gmail.com>
Mon, 17 Mar 2014 01:22:54 +0000 (01:22 +0000)
committerLang Hames <lhames@gmail.com>
Mon, 17 Mar 2014 01:22:54 +0000 (01:22 +0000)
commit3dd951e842c90476d22f071cae2a6848790ad4cc
tree667d0f3e5939593ac16f3af277041b21f874cfba
parent7f0871c97fd3dc110cdb8546f46f61b33cf32d78
[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
lib/CodeGen/MachineInstr.cpp
lib/Target/X86/X86VZeroUpper.cpp
test/CodeGen/X86/avx-vzeroupper.ll