llvm-6502/include/llvm
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
..
ADT Inverted argument order for ImmutableMap::Profile. 2008-01-02 22:18:33 +00:00
Analysis Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00
Assembly Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00
Bitcode Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +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
Config Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00
Debugger Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00
ExecutionEngine Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00
Support Split param attr implementation out from Function.cpp into its 2008-01-02 23:42:30 +00:00
System Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00
Target Move some more instruction creation methods from RegisterInfo into InstrInfo. 2008-01-01 21:11:32 +00:00
Transforms Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00
AbstractTypeUser.h Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00
Argument.h Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00
AutoUpgrade.h Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00
BasicBlock.h Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00
CallGraphSCCPass.h Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00
CallingConv.h Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00
Constant.h Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00
Constants.h Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00
DerivedTypes.h Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00
Function.h Disallow copying explicitly. 2008-01-03 00:09:47 +00:00
GlobalAlias.h Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00
GlobalValue.h Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00
GlobalVariable.h Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00
InlineAsm.h Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00
InstrTypes.h Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00
Instruction.def remove attribution from a variety of miscellaneous files. 2007-12-29 22:59:10 +00:00
Instruction.h Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00
Instructions.h Split param attr implementation out from Function.cpp into its 2008-01-02 23:42:30 +00:00
IntrinsicInst.h Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00
Intrinsics.h Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00
Intrinsics.td remove attribution from a variety of miscellaneous files. 2007-12-29 22:59:10 +00:00
IntrinsicsARM.td remove attribution from a variety of miscellaneous files. 2007-12-29 22:59:10 +00:00
IntrinsicsCellSPU.td remove attribution from a variety of miscellaneous files. 2007-12-29 22:59:10 +00:00
IntrinsicsPowerPC.td remove attribution from a variety of miscellaneous files. 2007-12-29 22:59:10 +00:00
IntrinsicsX86.td remove attribution from a variety of miscellaneous files. 2007-12-29 22:59:10 +00:00
LinkAllPasses.h Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00
LinkAllVMCore.h Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00
Linker.h Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00
LinkTimeOptimizer.h Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00
Module.h Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00
ModuleProvider.h Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00
ParameterAttributes.h Trying that again. 2008-01-03 03:32:33 +00:00
Pass.h Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00
PassAnalysisSupport.h Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00
PassManager.h Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00
PassManagers.h Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00
PassSupport.h Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00
SymbolTableListTraits.h Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00
Type.h Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00
TypeSymbolTable.h Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00
Use.h Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00
User.h Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00
Value.h Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00
ValueSymbolTable.h Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00