LLVM backend for 6502
Go to file
Chris Lattner c4ce73f666 Add a really quick hack at a machine code sinking pass, enabled with --enable-sinking.
It is missing validity checks, so it is known broken.  However, it is powerful enough
to compile this contrived code:

void test1(int C, double A, double B, double *P) {
  double Tmp = A*A+B*B;
  *P = C ? Tmp : A;
}

into:

_test1:
	movsd	8(%esp), %xmm0
	cmpl	$0, 4(%esp)
	je	LBB1_2	# entry
LBB1_1:	# entry
	movsd	16(%esp), %xmm1
	mulsd	%xmm1, %xmm1
	mulsd	%xmm0, %xmm0
	addsd	%xmm1, %xmm0
LBB1_2:	# entry
	movl	24(%esp), %eax
	movsd	%xmm0, (%eax)
	ret

instead of:

_test1:
	movsd	16(%esp), %xmm0
	mulsd	%xmm0, %xmm0
	movsd	8(%esp), %xmm1
	movapd	%xmm1, %xmm2
	mulsd	%xmm2, %xmm2
	addsd	%xmm0, %xmm2
	cmpl	$0, 4(%esp)
	je	LBB1_2	# entry
LBB1_1:	# entry
	movapd	%xmm2, %xmm1
LBB1_2:	# entry
	movl	24(%esp), %eax
	movsd	%xmm1, (%eax)
	ret

woo.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45570 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-04 07:36:53 +00:00
autoconf remove attribution from a variety of miscellaneous files. 2007-12-29 22:59:10 +00:00
bindings Trying r45451 again, but this time warning-free on 3.10.x. 2007-12-30 18:12:41 +00:00
docs fix nesting issues. 2008-01-04 04:34:14 +00:00
examples remove attributions from examples. 2007-12-29 20:37:57 +00:00
include Add a really quick hack at a machine code sinking pass, enabled with --enable-sinking. 2008-01-04 07:36:53 +00:00
lib Add a really quick hack at a machine code sinking pass, enabled with --enable-sinking. 2008-01-04 07:36:53 +00:00
projects remove attributions from the rest of the llvm makefiles. 2007-12-29 20:11:13 +00:00
runtime remove attribution from a variety of miscellaneous files. 2007-12-29 22:59:10 +00:00
test Fix PR1896 2008-01-04 05:04:53 +00:00
tools remove attribution from a variety of miscellaneous files. 2007-12-29 22:59:10 +00:00
utils Change the builtin matcher to emit a decision tree, which should help out 2008-01-04 04:38:35 +00:00
website
win32 Adding new files to win32 build 2008-01-03 19:53:03 +00:00
Xcode Removing obsolete files from the Xcode project. 2007-12-31 01:45:55 +00:00
build-for-llvm-top.sh
configure
CREDITS.TXT
LICENSE.TXT
llvm.spec.in
Makefile remove attributions from the rest of the llvm makefiles. 2007-12-29 20:11:13 +00:00
Makefile.common remove attributions from the rest of the llvm makefiles. 2007-12-29 20:11:13 +00:00
Makefile.config.in remove attributions from the rest of the llvm makefiles. 2007-12-29 20:11:13 +00:00
Makefile.rules Factor out makefile dependency generation better. 2007-12-31 23:58:31 +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.