Go to file
Quentin Colombet cf71c6320b [Peephole] Rewrite copies to avoid cross register banks copies.
By definition copies across register banks are not coalescable. Still, it may be
possible to get rid of such a copy when the value is available in another
register of the same register file.
Consider the following example, where capital and lower letters denote different
register file:
b = copy A <-- cross-bank copy
...
C = copy b <-- cross-bank copy

This could have been optimized this way:
b = copy A  <-- cross-bank copy
...
C = copy A <-- same-bank copy

Note: b and C's definitions may be in different basic blocks.

This patch adds a peephole optimization that looks through a chain of copies
leading to a cross-bank copy and reuses a source that is on the same register
file if available.

This solution could also be used to get rid of some copies (e.g., A could have
been used instead of C). However, we do not do so because:
- It may over constrain the coloring of the source register for coalescing.
- The register allocator may not be able to find a nice split point for the
  longer live-range, leading to more spill.

<rdar://problem/14742333>

llvm-svn: 190713
2013-09-13 18:26:31 +00:00
clang Fix indentation of closing }; 2013-09-13 17:56:13 +00:00
clang-tools-extra Transform files in a compilation database if no sources are provided. 2013-09-12 20:10:59 +00:00
compiler-rt [msan] Add source file:line to stack origin reports. 2013-09-13 12:55:07 +00:00
debuginfo-tests Auto-detect the architecture of the executable instead of using the arch of 2013-09-07 20:04:29 +00:00
libclc Parenthesize arguments for mad_hi 2013-09-09 14:36:21 +00:00
libcxx Fix link to dynarray issue 2013-09-13 17:32:32 +00:00
libcxxabi Adding bad_array_length to libc++abi 2013-09-11 01:42:02 +00:00
lld [lld][ELF] Handle multiple weak symbols 2013-09-13 04:25:44 +00:00
lldb Skip tests that segfault or are inconsistent on FreeBSD 2013-09-13 17:35:13 +00:00
llvm [Peephole] Rewrite copies to avoid cross register banks copies. 2013-09-13 18:26:31 +00:00
polly Fix build after SCEV change 2013-09-10 20:22:17 +00:00