llvm-6502/lib/Transforms/Scalar
Chris Lattner a5ddb59a13 Start doing the significantly useful part of jump threading: handle cases
where a comparison has a phi input and that phi is a constant.  For example,
stuff like:

  Threading edge through bool from 'bb2149' to 'bb2231' with cost: 1, across block:
bb2237:		; preds = %bb2231, %bb2149
	%tmp2328.rle = phi i32 [ %tmp2232, %bb2231 ], [ %tmp2232439, %bb2149 ]		; <i32> [#uses=2]
	%done.0 = phi i32 [ %done.2, %bb2231 ], [ 0, %bb2149 ]		; <i32> [#uses=1]
	%tmp2239 = icmp eq i32 %done.0, 0		; <i1> [#uses=1]
	br i1 %tmp2239, label %bb2231, label %bb2327

or

bb38.i298:		; preds = %bb33.i295, %bb1693
	%tmp39.i296.rle = phi %struct.ibox* [ null, %bb1693 ], [ %tmp39.i296.rle1109, %bb33.i295 ]		; <%struct.ibox*> [#uses=2]
	%minspan.1.i291.reg2mem.1 = phi i32 [ 32000, %bb1693 ], [ %minspan.0.i288, %bb33.i295 ]		; <i32> [#uses=1]
	%tmp40.i297 = icmp eq %struct.ibox* %tmp39.i296.rle, null		; <i1> [#uses=1]
	br i1 %tmp40.i297, label %implfeeds.exit311, label %bb43.i301

This triggers thousands of times in spec.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50110 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-22 21:40:39 +00:00
..
ADCE.cpp API changes for class Use size reduction, wave 1. 2008-04-06 20:25:17 +00:00
BasicBlockPlacement.cpp
CodeGenPrepare.cpp silence a warning when assertions are disabled. 2008-04-06 21:44:08 +00:00
CondPropagate.cpp
ConstantProp.cpp
DCE.cpp
DeadStoreElimination.cpp
GCSE.cpp API changes for class Use size reduction, wave 1. 2008-04-06 20:25:17 +00:00
GVN.cpp Remove unneeded #include's. 2008-04-21 07:47:38 +00:00
GVNPRE.cpp API changes for class Use size reduction, wave 1. 2008-04-06 20:25:17 +00:00
IndVarSimplify.cpp API changes for class Use size reduction, wave 1. 2008-04-06 20:25:17 +00:00
InstructionCombining.cpp remove dead code. 2008-04-22 03:21:48 +00:00
JumpThreading.cpp Start doing the significantly useful part of jump threading: handle cases 2008-04-22 21:40:39 +00:00
LICM.cpp
LoopIndexSplit.cpp API changes for class Use size reduction, wave 1. 2008-04-06 20:25:17 +00:00
LoopRotation.cpp Revert r49614. As Dan pointed out, some of these aren't correct. 2008-04-14 17:38:21 +00:00
LoopStrengthReduce.cpp Minor whitespace and comment cleanups. 2008-04-14 18:26:16 +00:00
LoopUnroll.cpp Revert r49614. As Dan pointed out, some of these aren't correct. 2008-04-14 17:38:21 +00:00
LoopUnswitch.cpp fit some more code in 80 cols. 2008-04-21 00:25:49 +00:00
Makefile
MemCpyOptimizer.cpp Refactor memcpyopt based on Chris' suggestions. Consolidate several functions 2008-04-21 07:45:10 +00:00
PredicateSimplifier.cpp Remove unnecessary <sstream> includes. 2008-04-14 20:40:47 +00:00
Reassociate.cpp Don't include <map> in Pass.h, which doesn't need it. This requires 2008-03-21 23:51:57 +00:00
Reg2Mem.cpp
Scalar.cpp C and Objective Caml bindings for mem2reg and reg2mem. 2008-03-20 17:16:03 +00:00
ScalarReplAggregates.cpp API changes for class Use size reduction, wave 1. 2008-04-06 20:25:17 +00:00
SCCP.cpp Be conservative if getresult operand is neither call nor invoke. 2008-04-09 15:58:24 +00:00
SimplifyCFG.cpp API changes for class Use size reduction, wave 1. 2008-04-06 20:25:17 +00:00
TailDuplication.cpp replace a slow and verbose version of Instruction::isUsedOutsideOfBlock with 2008-04-20 22:18:22 +00:00
TailRecursionElimination.cpp API changes for class Use size reduction, wave 1. 2008-04-06 20:25:17 +00:00