llvm-6502/lib
Bob Wilson 9d928c223f Fix pr4100. Do not remove no-op copies when they are dead. The register
scavenger gets confused about register liveness if it doesn't see them.
I'm not thrilled with this solution, but it only comes up when there are dead
copies in the code, which is something that hopefully doesn't happen much.

Here is what happens in pr4100: As shown in the following excerpt from the
debug output of llc, the source of a move gets reloaded from the stack,
inserting a new load instruction before the move.  Since that source operand
is a kill, the physical register is free to be reused for the destination
of the move.  The move ends up being a no-op, copying R3 to R3, so it is
deleted.  But, it leaves behind the load to reload %reg1028 into R3, and
that load is not updated to show that it's destination operand (R3) is dead.
The scavenger gets confused by that load because it thinks that R3 is live.

Starting RegAlloc of: %reg1025<def,dead> = MOVr %reg1028<kill>, 14, %reg0, %reg0
  Regs have values: 
  Reloading %reg1028 into R3
  Last use of R3[%reg1028], removing it from live set
  Assigning R3 to %reg1025
  Register R3 [%reg1025] is never used, removing it from live set

Alternative solutions might be either marking the load as dead, or zapping
the load along with the no-op copy.  I couldn't see an easy way to do
either of those, though.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71196 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-07 23:47:03 +00:00
..
Analysis Revert 71165. It did more than just revert 71158 and it introduced 2009-05-07 19:46:24 +00:00
Archive Add the private linkage. 2009-01-15 20:18:42 +00:00
AsmParser testcase and asmparser fix for PR4066 2009-04-25 21:26:00 +00:00
Bitcode Make a major API change to BitstreamReader: split all the reading 2009-04-26 20:59:02 +00:00
CodeGen Fix pr4100. Do not remove no-op copies when they are dead. The register 2009-05-07 23:47:03 +00:00
CompilerDriver -write-graph now can be used with -o. 2009-03-27 12:57:14 +00:00
Debugger Oops...I committed too much. 2009-03-13 04:39:26 +00:00
ExecutionEngine Set FnEnd in JITEmitter::finishFunction to point strictly to the end of function's machine code. 2009-04-30 23:01:58 +00:00
Linker Add a new "available_externally" linkage type. This is intended 2009-04-13 05:44:34 +00:00
Support Move helper functions for optimizing division by constant into the APInt 2009-04-30 10:15:35 +00:00
System Fix choice of version of Windows callback to use to consider not only the Visual Studio version, but also the Windows SDK version. 2009-04-28 16:37:58 +00:00
Target Eliminate compiler warnings. 2009-05-07 05:31:56 +00:00
Transforms Perform constant folding on operands of instructions with non-void 2009-05-07 19:43:39 +00:00
VMCore OCaml parameter attribute bindings from PR2752. 2009-05-06 12:21:17 +00:00
Makefile Reorganize llvmc code. 2009-03-02 09:01:14 +00:00