llvm-6502/lib/Transforms/Scalar
Chris Lattner 05f18920e1 Teach inst combine to merge GEPs through PHIs. This is really
important because it is sinking the loads using the GEPs, but
not the GEPs themselves.  This triggers 647 times on 403.gcc
and makes the .s file much much nicer.  For example before:

        je      LBB1_87 ## bb78
LBB1_62:        ## bb77
        leal    84(%esi), %eax
LBB1_63:        ## bb79
        movl    (%eax), %eax
...
LBB1_87:        ## bb78
        movl    $0, 4(%esp)
        movl    %esi, (%esp)
        call    L_make_decl_rtl$stub
        jmp     LBB1_62 ## bb77


after:

        jne     LBB1_63 ## bb79
LBB1_62:        ## bb78
        movl    $0, 4(%esp)
        movl    %esi, (%esp)
        call    L_make_decl_rtl$stub
LBB1_63:        ## bb79
        movl    84(%esi), %eax

The input code was (and the GEPs are merged and
the PHI is now eliminated by instcombine):

        br i1 %tmp233, label %bb78, label %bb77
bb77:           
        %tmp234 = getelementptr %struct.tree_node* %t_addr.3, i32 0, i32 0, i32 22              
        br label %bb79
bb78:           
        call void @make_decl_rtl(%struct.tree_node* %t_addr.3, i8* null) nounwind
        %tmp235 = getelementptr %struct.tree_node* %t_addr.3, i32 0, i32 0, i32 22              
        br label %bb79
bb79:           
        %iftmp.12.0.in = phi %struct.rtx_def** [ %tmp235, %bb78 ], [ %tmp234, %bb77 ]           
        %iftmp.12.0 = load %struct.rtx_def** %iftmp.12.0.in             



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60322 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-01 02:34:36 +00:00
..
ADCE.cpp Let instcombiner remove redundant dbg intrinsics. 2008-11-19 18:59:41 +00:00
BasicBlockPlacement.cpp Tidy up several unbeseeming casts from pointer to intptr_t. 2008-09-04 17:05:41 +00:00
CMakeLists.txt CMake: updated list of source files. 2008-11-05 00:11:22 +00:00
CodeGenPrepare.cpp don't call MergeBasicBlockIntoOnlyPred on a block whose only 2008-11-28 19:54:49 +00:00
CondPropagate.cpp Tidy up several unbeseeming casts from pointer to intptr_t. 2008-09-04 17:05:41 +00:00
ConstantProp.cpp Tidy up several unbeseeming casts from pointer to intptr_t. 2008-09-04 17:05:41 +00:00
DCE.cpp simplify this logic. 2008-11-27 22:46:09 +00:00
DeadStoreElimination.cpp Fix a thinko that manifested as a crash on clamav last night. 2008-11-29 20:29:04 +00:00
GVN.cpp Make GVN be more intelligent about redundant load 2008-12-01 01:31:36 +00:00
GVNPRE.cpp Tidy up several unbeseeming casts from pointer to intptr_t. 2008-09-04 17:05:41 +00:00
IndVarSimplify.cpp Revert r60042. IndVarSimplify should check if APFloat is PPCDoubleDouble first before trying to convert it to an integer. 2008-11-26 01:11:57 +00:00
InstructionCombining.cpp Teach inst combine to merge GEPs through PHIs. This is really 2008-12-01 02:34:36 +00:00
JumpThreading.cpp don't call MergeBasicBlockIntoOnlyPred on a block whose only 2008-11-28 19:54:49 +00:00
LICM.cpp Change create*Pass factory functions to return Pass* instead of 2008-10-22 23:32:42 +00:00
LoopDeletion.cpp Change create*Pass factory functions to return Pass* instead of 2008-10-22 23:32:42 +00:00
LoopIndexSplit.cpp If the sign of exit condition and split condition does not match 2008-11-10 19:48:34 +00:00
LoopRotation.cpp Change create*Pass factory functions to return Pass* instead of 2008-10-22 23:32:42 +00:00
LoopStrengthReduce.cpp Temporarily revert r60195. It's causing an optimized bootstrap of llvm-gcc to fail. 2008-11-29 03:43:04 +00:00
LoopUnroll.cpp Change create*Pass factory functions to return Pass* instead of 2008-10-22 23:32:42 +00:00
LoopUnswitch.cpp Ignore conditions that are outside the loop. 2008-11-03 19:38:07 +00:00
Makefile remove attribution from lib Makefiles. 2007-12-29 20:09:26 +00:00
MemCpyOptimizer.cpp Eliminate the dropInstruction method, which is not needed any more. 2008-11-29 23:30:39 +00:00
PredicateSimplifier.cpp Silence unused variable warnings. 2008-11-21 20:00:59 +00:00
Reassociate.cpp Fix build failure. 2008-11-21 21:00:20 +00:00
Reg2Mem.cpp Tidy up several unbeseeming casts from pointer to intptr_t. 2008-09-04 17:05:41 +00:00
Scalar.cpp C and Objective Caml bindings for mem2reg and reg2mem. 2008-03-20 17:16:03 +00:00
ScalarReplAggregates.cpp Allow SROA of vectors. Removing this caused a 2008-11-04 20:54:03 +00:00
SCCP.cpp Fix unused variable warnings. 2008-11-21 01:52:59 +00:00
SimplifyCFGPass.cpp Large mechanical patch. 2008-09-25 21:00:45 +00:00
SimplifyHalfPowrLibCalls.cpp Add a new pass to simplify specific half_powr function calls. This is 2008-11-04 23:41:45 +00:00
SimplifyLibCalls.cpp Optimize memmove and memset into the LLVM builtins. Note that these 2008-11-30 08:32:11 +00:00
TailDuplication.cpp simplify code. 2008-11-27 22:56:14 +00:00
TailRecursionElimination.cpp Tidy up several unbeseeming casts from pointer to intptr_t. 2008-09-04 17:05:41 +00:00