LLVM backend for 6502
Go to file
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
autoconf Dummy MSP430 backend 2009-05-03 12:57:15 +00:00
bindings OCaml parameter attribute bindings from PR2752. 2009-05-06 12:21:17 +00:00
cmake CMake: Use pthread library when requested and available. 2009-05-06 20:42:04 +00:00
docs Allow readonly functions to unwind exceptions. Teach 2009-05-06 06:49:50 +00:00
examples silence a warning. 2009-04-15 00:16:05 +00:00
include Revert 71165. It did more than just revert 71158 and it introduced 2009-05-07 19:46:24 +00:00
lib Fix pr4100. Do not remove no-op copies when they are dead. The register 2009-05-07 23:47:03 +00:00
projects Revert r67655 and r67656, as they are breaking the build. I'm 2009-03-25 00:52:11 +00:00
runtime Drop toy GC runtime. 2009-03-02 03:46:48 +00:00
test Fix pr4100. Do not remove no-op copies when they are dead. The register 2009-05-07 23:47:03 +00:00
tools The 'forward_as' property did not use its second argument. 2009-05-06 01:41:19 +00:00
unittests Apply Jeffrey Yasskin's CallbackVH patch, with minor tweaks from me 2009-05-02 21:10:48 +00:00
utils Move the tablegen-produced DebugLoc handling into a AsmWriter::processDebugLoc function. 2009-05-07 13:55:51 +00:00
website Prepare for "core" website. 2007-08-03 05:43:35 +00:00
win32 Update hand-crafted VC++ build. 2009-02-02 19:22:02 +00:00
Xcode Remove Stacker.html from Xcode project. 2008-10-14 23:23:59 +00:00
build-for-llvm-top.sh Patch to build llvm with srcdir != objdir from 2009-01-23 08:42:38 +00:00
CMakeLists.txt CMake: Added notes pointing to the LLVM CMake documentation. 2009-04-04 22:52:02 +00:00
configure Regenerate 2009-05-03 13:42:23 +00:00
CREDITS.TXT Initial test commit 2009-04-28 06:15:00 +00:00
LICENSE.TXT Another great year for LLVM! 2009-02-26 15:17:13 +00:00
llvm.spec.in * llvm.spec.in: update blurb 2007-07-13 09:48:29 +00:00
Makefile Lets install the manual page with install-clang! Radar 6838692 2009-05-01 01:47:55 +00:00
Makefile.common Removed trailing whitespace from Makefiles. 2009-01-09 16:44:42 +00:00
Makefile.config.in Add a --enable-profiling option to configure to build Debug+Profile and 2009-04-17 14:49:22 +00:00
Makefile.rules Restore minor deletion. 2009-05-04 18:40:41 +00:00
ModuleInfo.txt Patch to build llvm with srcdir != objdir from 2009-01-23 08:42:38 +00:00
README.txt README.txt: test commit w/blank line appended 2009-03-23 21:00:45 +00:00

Low Level Virtual Machine (LLVM)
================================

This directory and its subdirectories contain source code for the Low Level 
Virtual Machine, a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments. 

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the HTML documentation provided in docs/index.html for further
assistance with LLVM.