llvm-mirror/lib
Matthias Braun f3c791538e MachineCopyPropagation: Remove the copies instead of using KILL instructions.
For some history here see the commit messages of r199797 and r169060.

The original intent was to fix cases like:

%EAX<def> = COPY %ECX<kill>, %RAX<imp-def>
%RCX<def> = COPY %RAX<kill>

where simply removing the copies would have RCX undefined as in terms of
machine operands only the ECX part of it is defined. The machine
verifier would complain about this so 169060 changed such COPY
instructions into KILL instructions so some super-register imp-defs
would be preserved. In r199797 it was finally decided to always do this
regardless of super-register defs.

But this is wrong, consider:
R1 = COPY R0
...
R0 = COPY R1
getting changed to:
R1 = KILL R0
...
R0 = KILL R1

It now looks like R0 dies at the first KILL and won't be alive until the
second KILL, while in reality R0 is alive and must not change in this
part of the program.

As this only happens after register allocation there is not much code
still performing liveness queries so the issue was not noticed.  In fact
I didn't manage to create a testcase for this, without unrelated changes
I am working on at the moment.

The fix is simple: As of r223896 the MachineVerifier allows reads from
partially defined registers, so the whole transforming COPY->KILL thing
is not necessary anymore. This patch also changes a similar (but more
benign case as the def and src are the same register) case in the
VirtRegRewriter.

Differential Revision: http://reviews.llvm.org/D10117

llvm-svn: 238588
2015-05-29 18:19:25 +00:00
..
Analysis [DependenceAnalysis] Extend unifySubscriptType for handling coupled subscript groups. 2015-05-29 16:58:08 +00:00
AsmParser Fix typos in variable/grammar names. 2015-05-28 23:07:39 +00:00
Bitcode [BitcodeReader] Change assert to report_fatal_error 2015-05-27 01:05:40 +00:00
CodeGen MachineCopyPropagation: Remove the copies instead of using KILL instructions. 2015-05-29 18:19:25 +00:00
DebugInfo DebugInfo: .debug_line DWARF64 support 2015-05-28 15:38:17 +00:00
ExecutionEngine [Mips64] Add support for MCJIT for MIPS64r2 and MIPS64r6 2015-05-28 13:48:41 +00:00
Fuzzer [lib/Fuzzer] make the fuzzing timeout 1200 seconds by default (was: infinity) 2015-05-26 20:57:47 +00:00
IR [IR] fptrunc-of-fptrunc isn't an EliminableCastPair. 2015-05-29 00:04:30 +00:00
IRReader
LineEditor
Linker While in GlobalValue fix the function(s) that don't follow the 2015-05-15 18:20:14 +00:00
LTO
MC Move common symbol related information from MCSectionData to MCSymbol. 2015-05-29 17:48:04 +00:00
Object Object: Add Archive::getNumberOfSymbols(). 2015-05-26 16:20:40 +00:00
Option Option parsing: properly handle flag aliases for joined options (PR23394) 2015-05-04 18:00:13 +00:00
Passes
ProfileData InstrProf: Treat functions with a coverage map but no profile as unreached 2015-05-13 22:03:04 +00:00
Support [YAMLIO] Make line-wrapping configurable and test it. 2015-05-29 17:56:28 +00:00
TableGen [TableGen] Remove convertValue functions for UnOpInit, BinOpInit, and TernOpInit as they weren't able to be called. 2015-05-29 05:51:32 +00:00
Target Add support for VSX FMA single-precision instructions to the PPC back end 2015-05-29 17:13:25 +00:00
Transforms Enable exitValue rewrite only when the cost of expansion is low. 2015-05-28 21:49:07 +00:00
CMakeLists.txt
LLVMBuild.txt Reflow long lines of some LLVMBuild files 2015-05-14 15:38:27 +00:00
Makefile