Go to file
Bruno Cardoso Lopes 27fd06922b [PeepholeOptimizer] Look through PHIs to find additional register sources
Reintroduce r245442. Remove an overly conservative assertion introduced
in r245442. We could replace the assertion to use `shareSameRegisterFile`
instead, but in that point in `insertPHI` we already lost the original
Def subreg to check against. So drop the assertion completely.

Original commit message:

- Teaches the ValueTracker in the PeepholeOptimizer to look through PHI
instructions.
- Add findNextSourceAndRewritePHI method to lookup into multiple sources
returnted by the ValueTracker and rewrite PHIs with new sources.

With these changes we can find more register sources and rewrite more
copies to allow coaslescing of bitcast instructions. Hence, we eliminate
unnecessary VR64 <-> GR64 copies in x86, but it could be extended to
other archs by marking "isBitcast" on target specific instructions. The
x86 example follows:

A:
  psllq %mm1, %mm0
  movd  %mm0, %r9
  jmp C

B:
  por %mm1, %mm0
  movd  %mm0, %r9
  jmp C

C:
  movd  %r9, %mm0
  pshufw  $238, %mm0, %mm0

Becomes:

A:
  psllq %mm1, %mm0
  jmp C

B:
  por %mm1, %mm0
  jmp C

C:
  pshufw  $238, %mm0, %mm0

Differential Revision: http://reviews.llvm.org/D11197
rdar://problem/20404526

llvm-svn: 245479
2015-08-19 18:53:36 +00:00
clang Add REQUIRES: x86-registered-target to test since it's required. 2015-08-19 17:18:32 +00:00
clang-tools-extra [clang-tidy] Fix a bug in UseNullptrCheck. 2015-08-19 17:50:22 +00:00
compiler-rt [cmake darwin] Use a STATUS message type. Explain where the arches came from. 2015-08-19 16:23:19 +00:00
debuginfo-tests New round of fixes for "Always compile debuginfo-tests for the host triple" 2014-10-18 23:47:59 +00:00
libclc Remove files accidentally not removed in r244310 2015-08-13 23:43:12 +00:00
libcxx [libcxx] Add "install-libcxx" target. 2015-08-19 17:41:53 +00:00
libcxxabi [libcxxabi] Add "install-libcxxabi" target. 2015-08-19 17:17:21 +00:00
libunwind Enable zero-cost exceptions on non-Apple arm64 platforms 2015-08-13 14:21:03 +00:00
lld COFF: Use ErrorOr::operator* instead of ErrorOr::get. 2015-08-18 09:18:15 +00:00
lldb XTIMEOUT TestChangeProcessGroup for Linux. 2015-08-19 18:39:25 +00:00
llgo Update to new lists.llvm.org 2015-08-05 04:03:05 +00:00
llvm [PeepholeOptimizer] Look through PHIs to find additional register sources 2015-08-19 18:53:36 +00:00
openmp D11990: Lock-free start of serialized parallel regions 2015-08-18 10:08:27 +00:00
polly Generate alias metadata even in OpenMP mode 2015-08-19 16:04:35 +00:00