llvm-6502/lib
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
..
Analysis Don't be rude, emit debugging info where asked to. 2008-01-02 02:49:20 +00:00
Archive Remove attribution from file headers, per discussion on llvmdev. 2007-12-29 20:36:04 +00:00
AsmParser Remove attribution from file headers, per discussion on llvmdev. 2007-12-29 20:36:04 +00:00
Bitcode Remove attribution from file headers, per discussion on llvmdev. 2007-12-29 20:36:04 +00:00
CodeGen Add a really quick hack at a machine code sinking pass, enabled with --enable-sinking. 2008-01-04 07:36:53 +00:00
Debugger Remove attribution from file headers, per discussion on llvmdev. 2007-12-29 20:36:04 +00:00
ExecutionEngine Remove symbols that don't exist, remove tabs, fix comment typo 2008-01-03 22:15:32 +00:00
Linker Remove attribution from file headers, per discussion on llvmdev. 2007-12-29 20:36:04 +00:00
Support Remove attribution from file headers, per discussion on llvmdev. 2007-12-29 20:36:04 +00:00
System Remove attribution from file headers, per discussion on llvmdev. 2007-12-29 20:36:04 +00:00
Target Correct order of parameters. 2008-01-04 02:22:21 +00:00
Transforms Fix PR1896 2008-01-04 05:04:53 +00:00
VMCore Trying that again. 2008-01-03 03:32:33 +00:00
Makefile remove attribution from lib Makefiles. 2007-12-29 20:09:26 +00:00