llvm-6502/lib/CodeGen/SelectionDAG
Chris Lattner beac75da37 implement rdar://6653118 - fastisel should fold loads where possible.
Since mem2reg isn't run at -O0, we get a ton of reloads from the stack,
for example, before, this code:

int foo(int x, int y, int z) {
  return x+y+z;
}

used to compile into:

_foo:                                   ## @foo
	subq	$12, %rsp
	movl	%edi, 8(%rsp)
	movl	%esi, 4(%rsp)
	movl	%edx, (%rsp)
	movl	8(%rsp), %edx
	movl	4(%rsp), %esi
	addl	%edx, %esi
	movl	(%rsp), %edx
	addl	%esi, %edx
	movl	%edx, %eax
	addq	$12, %rsp
	ret

Now we produce:

_foo:                                   ## @foo
	subq	$12, %rsp
	movl	%edi, 8(%rsp)
	movl	%esi, 4(%rsp)
	movl	%edx, (%rsp)
	movl	8(%rsp), %edx
	addl	4(%rsp), %edx    ## Folded load
	addl	(%rsp), %edx     ## Folded load
	movl	%edx, %eax
	addq	$12, %rsp
	ret

Fewer instructions and less register use = faster compiles.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113102 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-05 02:18:34 +00:00
..
CMakeLists.txt Move CallingConvLower.cpp out of the SelectionDAG directory. 2010-07-07 15:15:27 +00:00
DAGCombiner.cpp Don't narrow the load and store in a load+twiddle+store sequence unless 2010-09-02 21:18:42 +00:00
FastISel.cpp Fix typo. 2010-08-17 01:30:33 +00:00
FunctionLoweringInfo.cpp Reapply r112623. Included additional check for unused byval argument. 2010-08-31 22:22:42 +00:00
InstrEmitter.cpp Revert r112461. It was failing on PPC... 2010-08-30 04:36:50 +00:00
InstrEmitter.h Don't set kill flags for instructions which the scheduler has cloned. 2010-05-14 22:01:14 +00:00
LegalizeDAG.cpp Add a missing check when legalizing a vector extending load. This doesn't 2010-09-03 19:20:37 +00:00
LegalizeFloatTypes.cpp Convert some tab stops into spaces. 2010-07-12 08:16:59 +00:00
LegalizeIntegerTypes.cpp 80-col. 2010-07-23 01:05:59 +00:00
LegalizeTypes.cpp Use A.append(...) instead of A.insert(A.end(), ...) when A is a 2010-06-21 19:47:52 +00:00
LegalizeTypes.h implement SplitVecOp_CONCAT_VECTORS, fixing the included testcase with SSE1. 2010-08-26 05:51:22 +00:00
LegalizeTypesGeneric.cpp Fix va_arg for doubles. With this patch VAARG nodes always contain the 2010-07-11 04:01:49 +00:00
LegalizeVectorOps.cpp Change UpdateNodeOperands' operand and return value from SDValue to 2010-06-18 15:30:29 +00:00
LegalizeVectorTypes.cpp implement SplitVecOp_CONCAT_VECTORS, fixing the included testcase with SSE1. 2010-08-26 05:51:22 +00:00
Makefile make -fno-rtti the default unless a directory builds with REQUIRES_RTTI. 2010-01-24 20:43:08 +00:00
ScheduleDAGFast.cpp Make fast scheduler handle asm clobbers correctly. 2010-08-17 22:17:24 +00:00
ScheduleDAGList.cpp Trim #include. 2010-05-26 00:55:59 +00:00
ScheduleDAGRRList.cpp The "excess register pressure" returned by HighRegPressure() is not accurate enough to factor into scheduling priority. Eliminate it and add early exits to speed up scheduling. 2010-07-26 21:49:07 +00:00
ScheduleDAGSDNodes.cpp Add missing null check reported by Amaury Pouly. 2010-08-10 02:39:45 +00:00
ScheduleDAGSDNodes.h Code refactoring, no functionality changes. 2010-06-10 02:09:31 +00:00
SDNodeDbgValue.h Add const qualifiers to CodeGen's use of LLVM IR constructs. 2010-04-15 01:51:59 +00:00
SDNodeOrdering.h Allow 0 as an order number. Don't assign an order to formal arguments. 2009-12-22 21:35:02 +00:00
SelectionDAG.cpp zap unused method. x86 is the only user and already has a more powerfull version 2010-08-31 02:36:20 +00:00
SelectionDAGBuilder.cpp Detect undef value early and save unnecessary NodeMap query. 2010-09-02 21:29:42 +00:00
SelectionDAGBuilder.h Offset is not always unsigned number. 2010-08-31 06:12:08 +00:00
SelectionDAGISel.cpp implement rdar://6653118 - fastisel should fold loads where possible. 2010-09-05 02:18:34 +00:00
SelectionDAGPrinter.cpp Eliminate unnecessary empty string literals. 2010-08-04 01:39:08 +00:00
TargetLowering.cpp remove some llvmcontext arguments that are now dead post-refactoring. 2010-08-25 23:00:45 +00:00
TargetSelectionDAGInfo.cpp Implement a bunch more TargetSelectionDAGInfo infrastructure. 2010-05-11 17:31:57 +00:00