llvm-6502/test
Bruno Cardoso Lopes b11d8102cf Look through PHIs to find additional register sources
- 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242295 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-15 15:35:23 +00:00
..
Analysis Cleanup after r241809 - remove uncessary call to std::sort 2015-07-13 14:48:24 +00:00
Assembler Extended syntax of vector version of getelementptr instruction. 2015-07-09 07:42:48 +00:00
Bindings
Bitcode Add argmemonly attribute. 2015-07-11 10:30:36 +00:00
BugPoint
CodeGen Look through PHIs to find additional register sources 2015-07-15 15:35:23 +00:00
DebugInfo [CodeView] Add support for emitting column information 2015-07-09 00:19:51 +00:00
ExecutionEngine
Feature Revert the new EH instructions 2015-07-10 07:15:17 +00:00
FileCheck
Instrumentation
Integer [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
JitListener
LibDriver
Linker
LTO
MC [PPC] Disassemble little endian ppc instructions in the right byte order 2015-07-15 12:56:19 +00:00
Object Initial support for writing thin archives. 2015-07-15 05:47:46 +00:00
Other
SymbolRewriter
TableGen [TableGen] Improve decoding options for non-orthogonal instructions 2015-07-15 08:04:27 +00:00
tools [llvm-readobj] Print MIPS PLT table 2015-07-09 18:23:10 +00:00
Transforms Tidy-up test case from r242257. 2015-07-15 01:51:51 +00:00
Unit
Verifier Revert the new EH instructions 2015-07-10 07:15:17 +00:00
YAMLParser
.clang-format
CMakeLists.txt
lit.cfg
lit.site.cfg.in
Makefile
Makefile.tests
TestRunner.sh