hanchenye-llvm-project/llvm/lib
Chris Lattner 084b3a47d3 Change instcombine to use FoldPHIArgGEPIntoPHI to fold two operand PHIs
instead of using FoldPHIArgBinOpIntoPHI.  In addition to being more
obvious, this also fixes a problem where instcombine wouldn't merge two
phis that had different variable indices.  This prevented instcombine
from factoring big chunks of code in 403.gcc.  For example:

 insn_cuid.exit:                
-       %tmp336 = load i32** @uid_cuid, align 4      
-       %tmp337 = getelementptr %struct.rtx_def* %insn_addr.0.ph.i, i32 0, i32 3    
-       %tmp338 = bitcast [1 x %struct.rtunion]* %tmp337 to i32*               
-       %tmp339 = load i32* %tmp338, align 4           
-       %tmp340 = getelementptr i32* %tmp336, i32 %tmp339     
        br label %bb62
 
 bb61:       
-       %tmp341 = load i32** @uid_cuid, align 4     
-       %tmp342 = getelementptr %struct.rtx_def* %insn, i32 0, i32 3        
-       %tmp343 = bitcast [1 x %struct.rtunion]* %tmp342 to i32*           
-       %tmp344 = load i32* %tmp343, align 4        
-       %tmp345 = getelementptr i32* %tmp341, i32 %tmp344          
        br label %bb62
 
 bb62:      
-       %iftmp.62.0.in = phi i32* [ %tmp345, %bb61 ], [ %tmp340, %insn_cuid.exit ]         
+       %insn.pn2 = phi %struct.rtx_def* [ %insn, %bb61 ], [ %insn_addr.0.ph.i, %insn_cuid.exit ]         
+       %tmp344.pn.in.in = getelementptr %struct.rtx_def* %insn.pn2, i32 0, i32 3     
+       %tmp344.pn.in = bitcast [1 x %struct.rtunion]* %tmp344.pn.in.in to i32*  
+       %tmp341.pn = load i32** @uid_cuid     
+       %tmp344.pn = load i32* %tmp344.pn.in 
+       %iftmp.62.0.in = getelementptr i32* %tmp341.pn, i32 %tmp344.pn   
        %iftmp.62.0 = load i32* %iftmp.62.0.in     

llvm-svn: 60325
2008-12-01 03:42:51 +00:00
..
Analysis Reimplement the non-local dependency data structure in terms of a sorted 2008-12-01 01:15:42 +00:00
Archive Silence unused variable warnings. 2008-11-21 20:00:59 +00:00
AsmParser Extend the 'noalias' attribute to function return values. This is intended to 2008-11-24 03:41:24 +00:00
Bitcode Added support for the following definition of shufflevector 2008-11-10 04:46:22 +00:00
CodeGen Followup to r60283: optimize arbitrary width signed divisions as well 2008-11-30 06:35:39 +00:00
Debugger Initial support for the CMake build system. 2008-09-22 01:08:49 +00:00
ExecutionEngine Make JIT::runFunction handle functions with non-C calling conventions. 2008-11-23 08:00:11 +00:00
Linker Make comments and code for QuietWarnings and QuietErrors 2008-10-25 17:57:20 +00:00
Support fix build on some machines. thanks buildbot 2008-11-27 16:42:44 +00:00
System ARM / Mac OS X also wants to invalidate icache after jitting. 2008-11-14 02:33:17 +00:00
Target Implement ((A|B)&1)|(B&-2) -> (A&1) | B transformation. This also takes care of 2008-12-01 01:07:11 +00:00
Transforms Change instcombine to use FoldPHIArgGEPIntoPHI to fold two operand PHIs 2008-12-01 03:42:51 +00:00
VMCore improve const correctness. 2008-11-27 08:39:18 +00:00
Makefile remove attribution from lib Makefiles. 2007-12-29 20:09:26 +00:00