llvm-project/llvm/lib
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
..
Analysis In AliasSetTracker, do not change the alias set to "mod/ref" when adding 2013-09-12 20:15:50 +00:00
AsmParser Revert "Give internal classes hidden visibility." 2013-09-11 18:05:11 +00:00
Bitcode Patch provide by Tom Roeder! 2013-09-12 22:02:31 +00:00
CodeGen [Peephole] Rewrite copies to avoid cross register banks copies. 2013-09-13 18:26:31 +00:00
DebugInfo Add support for DebugFission to DWARF parser 2013-08-27 09:20:22 +00:00
ExecutionEngine LLVM Interpreter: implementation of "insertvalue" and "extractvalue"; 2013-09-12 10:48:23 +00:00
IR Debug Info: move class definition of DIRef. 2013-09-11 18:55:55 +00:00
IRReader Add 'const' qualifiers to static const char* variables. 2013-07-16 01:17:10 +00:00
Linker Error on linking appending globals with different unnamed_addr. 2013-09-04 15:33:34 +00:00
MC Remove unused functions. 2013-09-10 22:42:31 +00:00
Object Move everything depending on Object/MachOFormat.h over to Support/MachO.h. 2013-09-01 04:28:48 +00:00
Option Fix another mistake in r190442. 2013-09-10 23:22:56 +00:00
Support This switches CrashRecoveryContext to using ManagedStatic for its global Mutex and 2013-09-12 17:46:57 +00:00
TableGen Add an error check for a typo I accidentally made in a td file that caused an assert to fire. 2013-08-20 04:22:09 +00:00
Target [ARMv8] Change hasV8Fp to hasFPARMv8, and other command line options 2013-09-13 13:46:57 +00:00
Transforms [msan] Add source file:line to stack origin reports. 2013-09-13 12:54:49 +00:00
CMakeLists.txt Move lib/Archive to tools/llvm-ar. 2013-06-17 15:47:20 +00:00
LLVMBuild.txt Move lib/Archive to tools/llvm-ar. 2013-06-17 15:47:20 +00:00
Makefile Move lib/Archive to tools/llvm-ar. 2013-06-17 15:47:20 +00:00