e260ed8628 
								
							 
						 
						
							
							
								
								Add support for CombineTo, allowing the dag combiner to replace nodes with  
							
							... 
							
							
							
							multiple results.
Use this support to implement trivial store->load forwarding, implementing
CodeGen/PowerPC/store-load-fwd.ll.  Though this is the most simple case and
can be extended in the future, it is still useful.  For example, it speeds
up 197.parser by 6.2% by avoiding an LSU reject in xalloc:
        stw r6, lo16(l5_end_of_array)(r2)
        addi r2, r5, -4
        stwx r5, r4, r2
-       lwzx r5, r4, r2
-       rlwinm r5, r5, 0, 0, 30
        stwx r5, r4, r2
        lwz r2, -4(r4)
        ori r2, r2, 1
llvm-svn: 23690 
							
						 
						
							2005-10-10 22:04:48 +00:00  
				
					
						
							
							
								 
						
							
								6828ed9bfd 
								
							 
						 
						
							
							
								
								Teach the DAGCombiner several new tricks, teaching it how to turn  
							
							... 
							
							
							
							sext_inreg into zext_inreg based on the signbit (fires a lot), srem into
urem, etc.
llvm-svn: 23688 
							
						 
						
							2005-10-10 21:26:48 +00:00  
				
					
						
							
							
								 
						
							
								7730924067 
								
							 
						 
						
							
							
								
								Fix comment  
							
							... 
							
							
							
							llvm-svn: 23686 
							
						 
						
							2005-10-10 16:52:03 +00:00  
				
					
						
							
							
								 
						
							
								3d1d4a3d12 
								
							 
						 
						
							
							
								
								Add ISD::ADD to MaskedValueIsZero  
							
							... 
							
							
							
							llvm-svn: 23685 
							
						 
						
							2005-10-10 16:51:40 +00:00  
				
					
						
							
							
								 
						
							
								6a49b7cabb 
								
							 
						 
						
							
							
								
								add a todo for something I noticed  
							
							... 
							
							
							
							llvm-svn: 23679 
							
						 
						
							2005-10-09 22:59:08 +00:00  
				
					
						
							
							
								 
						
							
								1d3dc00674 
								
							 
						 
						
							
							
								
								(X & Y) & C == 0 if either X&C or Y&C are zero  
							
							... 
							
							
							
							llvm-svn: 23678 
							
						 
						
							2005-10-09 22:12:36 +00:00  
				
					
						
							
							
								 
						
							
								2042aa5b92 
								
							 
						 
						
							
							
								
								Lo and behold, the last bits of SelectionDAG.cpp have been moved over.  
							
							... 
							
							
							
							llvm-svn: 23665 
							
						 
						
							2005-10-08 00:29:44 +00:00  
				
					
						
							
							
								 
						
							
								fb12624a3f 
								
							 
						 
						
							
							
								
								implement CodeGen/PowerPC/div-2.ll:test2-4 by propagating zero bits through  
							
							... 
							
							
							
							C-X's
llvm-svn: 23662 
							
						 
						
							2005-10-07 15:30:32 +00:00  
				
					
						
							
							
								 
						
							
								5bcd0dd811 
								
							 
						 
						
							
							
								
								Turn sdivs into udivs when we can prove the sign bits are clear.  This  
							
							... 
							
							
							
							implements CodeGen/PowerPC/div-2.ll
llvm-svn: 23659 
							
						 
						
							2005-10-07 06:10:46 +00:00  
				
					
						
							
							
								 
						
							
								bd7df030d2 
								
							 
						 
						
							
							
								
								Check in some more DAGCombiner pieces  
							
							... 
							
							
							
							llvm-svn: 23639 
							
						 
						
							2005-10-05 21:43:42 +00:00  
				
					
						
							
							
								 
						
							
								a49e16fefa 
								
							 
						 
						
							
							
								
								implement visitBR_CC so that PowerPC/inverted-bool-compares.ll passes  
							
							... 
							
							
							
							with the dag combiner.  This speeds up espresso by 8%, reaching performance
parity with the dag-combiner-disabled llc.
llvm-svn: 23636 
							
						 
						
							2005-10-05 06:47:48 +00:00  
				
					
						
							
							
								 
						
							
								06f1d0f73a 
								
							 
						 
						
							
							
								
								Add a new HandleNode class, which is used to handle (haha) cases in the  
							
							... 
							
							
							
							dead node elim and dag combiner passes where the root is potentially updated.
This fixes a fixme in the dag combiner.
llvm-svn: 23634 
							
						 
						
							2005-10-05 06:35:28 +00:00  
				
					
						
							
							
								 
						
							
								a6895d180e 
								
							 
						 
						
							
							
								
								Implement the code for PowerPC/inverted-bool-compares.ll, even though it  
							
							... 
							
							
							
							that testcase still does not pass with the dag combiner.  This is because
not all forms of br* are folded yet.
Also, when we combine a node into another one, delete the node immediately
instead of waiting for the node to potentially come up in the future.
llvm-svn: 23632 
							
						 
						
							2005-10-05 06:11:08 +00:00  
				
					
						
							
							
								 
						
							
								746d50a01a 
								
							 
						 
						
							
							
								
								Fix a crash compiling Olden/tsp  
							
							... 
							
							
							
							llvm-svn: 23630 
							
						 
						
							2005-10-05 04:45:43 +00:00  
				
					
						
							
							
								 
						
							
								6f3b577ee6 
								
							 
						 
						
							
							
								
								Add FP versions of the binary operators, keeping the int and fp worlds seperate.  
							
							... 
							
							
							
							Though I have done extensive testing, it is possible that this will break
things in configs I can't test.  Please let me know if this causes a problem
and I'll fix it ASAP.
llvm-svn: 23504 
							
						 
						
							2005-09-28 22:28:18 +00:00  
				
					
						
							
							
								 
						
							
								c760f80fed 
								
							 
						 
						
							
							
								
								Stub out the rest of the DAG Combiner.  Just need to fill in the  
							
							... 
							
							
							
							select_cc bits and then wrap it in a convenience function for  use with
regular select.
llvm-svn: 23389 
							
						 
						
							2005-09-19 22:34:01 +00:00  
				
					
						
							
							
								 
						
							
								24a7eca282 
								
							 
						 
						
							
							
								
								More DAG combining.  Still need the branch instructions, and select_cc  
							
							... 
							
							
							
							llvm-svn: 23371 
							
						 
						
							2005-09-16 00:54:12 +00:00  
				
					
						
							
							
								 
						
							
								bd39c1a4c6 
								
							 
						 
						
							
							
								
								Add a missing #include, patch courtesy of Baptiste Lepilleur.  
							
							... 
							
							
							
							llvm-svn: 23302 
							
						 
						
							2005-09-09 23:53:39 +00:00  
				
					
						
							
							
								 
						
							
								049b748c76 
								
							 
						 
						
							
							
								
								Last round of 2-node folds from SD.cpp.  Will  move on to 3 node ops such  
							
							... 
							
							
							
							as setcc and select next.
llvm-svn: 23295 
							
						 
						
							2005-09-09 19:49:52 +00:00  
				
					
						
							
							
								 
						
							
								85c1cc4523 
								
							 
						 
						
							
							
								
								Move yet more folds over to the dag combiner from sd.cpp  
							
							... 
							
							
							
							llvm-svn: 23278 
							
						 
						
							2005-09-08 20:18:10 +00:00  
				
					
						
							
							
								 
						
							
								2cc2c9a79c 
								
							 
						 
						
							
							
								
								Another round of dag combiner changes.  This fixes some missing XOR folds  
							
							... 
							
							
							
							as well as fixing how we replace old values with new values.
llvm-svn: 23260 
							
						 
						
							2005-09-07 23:25:52 +00:00  
				
					
						
							
							
								 
						
							
								6791d63e55 
								
							 
						 
						
							
							
								
								Implement a common missing fold, (add (add x, c1), c2) -> (add x, c1+c2).  
							
							... 
							
							
							
							This restores all of stanford to being identical with and without the dag
combiner with the add folding turned off in sd.cpp.
llvm-svn: 23258 
							
						 
						
							2005-09-07 16:09:19 +00:00  
				
					
						
							
							
								 
						
							
								007c650699 
								
							 
						 
						
							
							
								
								Add an option to the DAG Combiner to enable it for beta runs, and turn on  
							
							... 
							
							
							
							that option for PowerPC's beta.
llvm-svn: 23253 
							
						 
						
							2005-09-07 00:15:36 +00:00  
				
					
						
							
							
								 
						
							
								d23739d020 
								
							 
						 
						
							
							
								
								Next round of DAGCombiner changes.  This version now passes all the tests  
							
							... 
							
							
							
							I have run so far when run before Legalize.  It still needs to pick up the
SetCC folds, and nodes that use SetCC.
llvm-svn: 23243 
							
						 
						
							2005-09-06 04:43:02 +00:00  
				
					
						
							
							
								 
						
							
								7cea6ef16e 
								
							 
						 
						
							
							
								
								Next round of DAG Combiner changes.  Just need to support multiple return  
							
							... 
							
							
							
							values, and then we should be able to hook it up.
llvm-svn: 23231 
							
						 
						
							2005-09-02 21:18:40 +00:00  
				
					
						
							
							
								 
						
							
								2504fe2613 
								
							 
						 
						
							
							
								
								Implement first round of feedback from chris (there's still a couple things  
							
							... 
							
							
							
							left to do).
llvm-svn: 23195 
							
						 
						
							2005-09-01 23:24:04 +00:00  
				
					
						
							
							
								 
						
							
								e8f78d1aab 
								
							 
						 
						
							
							
								
								Add the rest of the currently implemented visit routines to the switch  
							
							... 
							
							
							
							statement in visit().
llvm-svn: 23185 
							
						 
						
							2005-09-01 00:33:32 +00:00  
				
					
						
							
							
								 
						
							
								21158fc485 
								
							 
						 
						
							
							
								
								First pass at the DAG Combiner.  It isn't used anywhere yet, but it should  
							
							... 
							
							
							
							be mostly functional.  It currently has all folds from SelectionDAG.cpp
that do not involve a condition code.
llvm-svn: 23184 
							
						 
						
							2005-09-01 00:19:25 +00:00