LLVM backend for 6502
Go to file
Evan Cheng 5379f412bc Fix PR3149. If an early clobber def is a physical register and it is tied to an input operand, it effectively extends the live range of the physical register. Currently we do not have a good way to represent this.
172     %ECX<def> = MOV32rr %reg1039<kill>
180     INLINEASM <es:subl $5,$1
        sbbl $3,$0>, 10, %EAX<def>, 14, %ECX<earlyclobber,def>, 9, %EAX<kill>,
36, <fi#0>, 1, %reg0, 0, 9, %ECX<kill>, 36, <fi#1>, 1, %reg0, 0
188     %EAX<def> = MOV32rr %EAX<kill>
196     %ECX<def> = MOV32rr %ECX<kill>
204     %ECX<def> = MOV32rr %ECX<kill>
212     %EAX<def> = MOV32rr %EAX<kill>
220     %EAX<def> = MOV32rr %EAX
228     %reg1039<def> = MOV32rr %ECX<kill>

The early clobber operand ties ECX input to the ECX def.

The live interval of ECX is represented as this:
%reg20,inf = [46,47:1)[174,230:0)  0@174-(230) 1@46-(47)

The right way to represent this is something like
%reg20,inf = [46,47:2)[174,182:1)[181:230:0)  0@174-(182) 1@181-230 @2@46-(47)

Of course that won't work since that means overlapping live ranges defined by two val#.

The workaround for now is to add a bit to val# which says the val# is redefined by a early clobber def somewhere. This prevents the move at 228 from being optimized away by SimpleRegisterCoalescing::AdjustCopiesBackFrom.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61259 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-19 20:58:01 +00:00
autoconf Revert accidental last patch 2008-11-20 04:28:08 +00:00
bindings
cmake Fix a link issue I ran into trying compiling LLVM on MinGW with CMake. 2008-11-30 02:42:05 +00:00
docs Resubmit support for the 'nocapture' attribute. 2008-12-19 06:39:12 +00:00
examples reapply Sanjiv's patch to genericize memcpy/memset/memmove to take an 2008-11-21 16:42:48 +00:00
include Fix PR3149. If an early clobber def is a physical register and it is tied to an input operand, it effectively extends the live range of the physical register. Currently we do not have a good way to represent this. 2008-12-19 20:58:01 +00:00
lib Fix PR3149. If an early clobber def is a physical register and it is tied to an input operand, it effectively extends the live range of the physical register. Currently we do not have a good way to represent this. 2008-12-19 20:58:01 +00:00
projects
runtime
test Fix PR3149. If an early clobber def is a physical register and it is tied to an input operand, it effectively extends the live range of the physical register. Currently we do not have a good way to represent this. 2008-12-19 20:58:01 +00:00
tools Some enhancements for the 'case' expression. 2008-12-17 02:47:01 +00:00
utils Use dyn_cast intead of isa + cast in the generated DAGISel code. This 2008-12-19 18:13:39 +00:00
website
win32 Add files to VC++ projects. 2008-11-13 21:18:54 +00:00
Xcode
build-for-llvm-top.sh
CMakeLists.txt CMake: Option for building with -fPIC. 2008-11-20 19:13:51 +00:00
configure
CREDITS.TXT
LICENSE.TXT
llvm.spec.in
Makefile
Makefile.common
Makefile.config.in
Makefile.rules Fix PR3117: not all nodes being legalized. The 2008-12-09 21:33:20 +00:00
ModuleInfo.txt
README.txt

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.