9a6fef0a52 
								
							 
						 
						
							
							
								
								Simplify code by using SmallVector's pop_back_val() instead of  
							
							... 
							
							
							
							separate back() and pop_back() calls.
llvm-svn: 71089 
							
						 
						
							2009-05-06 17:22:41 +00:00  
				
					
						
							
							
								 
						
							
								e4f361212b 
								
							 
						 
						
							
							
								
								Fix comment typo.  
							
							... 
							
							
							
							llvm-svn: 67307 
							
						 
						
							2009-03-19 17:23:29 +00:00  
				
					
						
							
							
								 
						
							
								cecfa6e08d 
								
							 
						 
						
							
							
								
								Fix one more place where debug info affected  
							
							... 
							
							
							
							codegen (speculative execution).
llvm-svn: 66859 
							
						 
						
							2009-03-13 01:05:24 +00:00  
				
					
						
							
							
								 
						
							
								ed6f5a8253 
								
							 
						 
						
							
							
								
								Previous debug info fix to this code wasn't quite  
							
							... 
							
							
							
							right; did the wrong thing when there are exactly 11
non-debug instructions, followed by debug info.
Remove a FIXME since it's apparently been fixed along the way.
llvm-svn: 66840 
							
						 
						
							2009-03-12 23:18:09 +00:00  
				
					
						
							
							
								 
						
							
								7f99d22f2f 
								
							 
						 
						
							
							
								
								There already was a class to force deterministic  
							
							... 
							
							
							
							sorting of ConstantInt's; unreinvent wheel.
llvm-svn: 66824 
							
						 
						
							2009-03-12 21:01:11 +00:00  
				
					
						
							
							
								 
						
							
								578d8bfc3c 
								
							 
						 
						
							
							
								
								Another missing check for debug intrinsics.  
							
							... 
							
							
							
							llvm-svn: 66800 
							
						 
						
							2009-03-12 17:42:45 +00:00  
				
					
						
							
							
								 
						
							
								9cdb9bb3e5 
								
							 
						 
						
							
							
								
								Allow for switch values bigger than 64 bits.  
							
							... 
							
							
							
							llvm-svn: 66751 
							
						 
						
							2009-03-12 01:20:06 +00:00  
				
					
						
							
							
								 
						
							
								5a41b2def5 
								
							 
						 
						
							
							
								
								Fix some nondeterministic behavior when forwarding  
							
							... 
							
							
							
							from a switch table.  Multiple table entries that
branch to the same place were being sorted by the
pointer value of the ConstantInt*; changed to sort
by the actual value of the ConstantInt.
llvm-svn: 66749 
							
						 
						
							2009-03-12 01:00:26 +00:00  
				
					
						
							
							
								 
						
							
								84fceff969 
								
							 
						 
						
							
							
								
								Ignore dbg info, while estimating size of jump through block.  
							
							... 
							
							
							
							llvm-svn: 66554 
							
						 
						
							2009-03-10 18:00:05 +00:00  
				
					
						
							
							
								 
						
							
								6e447e08ee 
								
							 
						 
						
							
							
								
								Fix another case where debug info interferes with  
							
							... 
							
							
							
							an optimization.
llvm-svn: 66288 
							
						 
						
							2009-03-06 21:08:33 +00:00  
				
					
						
							
							
								 
						
							
								5aed7765b8 
								
							 
						 
						
							
							
								
								While hoisting instruction to speculatively execute simple bb, ignore dbg intrinsics.  
							
							... 
							
							
							
							llvm-svn: 66255 
							
						 
						
							2009-03-06 06:00:17 +00:00  
				
					
						
							
							
								 
						
							
								7fcd6148f7 
								
							 
						 
						
							
							
								
								Remove accidental check-ins in r65960. :-(  
							
							... 
							
							
							
							llvm-svn: 65961 
							
						 
						
							2009-03-03 19:25:16 +00:00  
				
					
						
							
							
								 
						
							
								a68fc7af63 
								
							 
						 
						
							
							
								
								Use > instead of >=. We want to promote aggregates of 128-bytes.  
							
							... 
							
							
							
							llvm-svn: 65960 
							
						 
						
							2009-03-03 19:18:49 +00:00  
				
					
						
							
							
								 
						
							
								264e46e1e9 
								
							 
						 
						
							
							
								
								Ignore dbg info intrinsics when folding conditional branch to  
							
							... 
							
							
							
							conditional branch predecessors.
llvm-svn: 65509 
							
						 
						
							2009-02-26 06:56:37 +00:00  
				
					
						
							
							
								 
						
							
								5d9cc1763b 
								
							 
						 
						
							
							
								
								Don't block basic block with only SwitchInst to fold into predecessors.  
							
							... 
							
							
							
							llvm-svn: 65456 
							
						 
						
							2009-02-25 15:34:27 +00:00  
				
					
						
							
							
								 
						
							
								e288082644 
								
							 
						 
						
							
							
								
								While folding unconditional return move DbgRegionEndInst into the predecessor, instead of removing it. This fixes following tests from llvmgcc42 testsuite.  
							
							... 
							
							
							
							gcc.c-torture/execute/20000605-3.c
gcc.c-torture/execute/20020619-1.c
gcc.c-torture/execute/20030920-1.c
gcc.c-torture/execute/loop-ivopts-1.c
llvm-svn: 65353 
							
						 
						
							2009-02-24 00:05:16 +00:00  
				
					
						
							
							
								 
						
							
								316705027b 
								
							 
						 
						
							
							
								
								If llvm.dbg.region.end is disappearing then remove corresponding llvm.dbg.func.start also.  
							
							... 
							
							
							
							llvm-svn: 64278 
							
						 
						
							2009-02-11 01:29:06 +00:00  
				
					
						
							
							
								 
						
							
								654e47f366 
								
							 
						 
						
							
							
								
								Ignore dbg intrinsic while folding unconditional branch.  
							
							... 
							
							
							
							llvm-svn: 64242 
							
						 
						
							2009-02-10 22:14:17 +00:00  
				
					
						
							
							
								 
						
							
								02f58e1e8d 
								
							 
						 
						
							
							
								
								Revert rev. 63876. It is causing llvm-gcc bootstrap failure.  
							
							... 
							
							
							
							llvm-svn: 63888 
							
						 
						
							2009-02-05 21:46:41 +00:00  
				
					
						
							
							
								 
						
							
								5922e26d1a 
								
							 
						 
						
							
							
								
								Ignore dbg intrinsics while propagating conditional expression info.  
							
							... 
							
							
							
							llvm-svn: 63876 
							
						 
						
							2009-02-05 19:15:39 +00:00  
				
					
						
							
							
								 
						
							
								086b212277 
								
							 
						 
						
							
							
								
								Ignore dbg intrinsics while folding switch instruction.  
							
							... 
							
							
							
							llvm-svn: 63802 
							
						 
						
							2009-02-05 00:30:42 +00:00  
				
					
						
							
							
								 
						
							
								916fdce16d 
								
							 
						 
						
							
							
								
								Ignore dbg intrinsics.  
							
							... 
							
							
							
							llvm-svn: 63781 
							
						 
						
							2009-02-04 21:39:48 +00:00  
				
					
						
							
							
								 
						
							
								fd9f635103 
								
							 
						 
						
							
							
								
								While folding vallue comparison terminators ignore dbg intrinsics.  
							
							... 
							
							
							
							llvm-svn: 63700 
							
						 
						
							2009-02-04 01:06:11 +00:00  
				
					
						
							
							
								 
						
							
								f10e287c65 
								
							 
						 
						
							
							
								
								Ignore dbg intrinsics while hoisting common code in the two blocks up into the branch block.  
							
							... 
							
							
							
							llvm-svn: 63687 
							
						 
						
							2009-02-04 00:03:08 +00:00  
				
					
						
							
							
								 
						
							
								2032cadd0f 
								
							 
						 
						
							
							
								
								Do not let dbg intrinsic block folding of two entry phi node.  
							
							... 
							
							
							
							llvm-svn: 63671 
							
						 
						
							2009-02-03 22:12:02 +00:00  
				
					
						
							
							
								 
						
							
								c59945b4bd 
								
							 
						 
						
							
							
								
								another fix for PR3354  
							
							... 
							
							
							
							llvm-svn: 62561 
							
						 
						
							2009-01-20 01:15:41 +00:00  
				
					
						
							
							
								 
						
							
								caf1d22243 
								
							 
						 
						
							
							
								
								Doxygen-ify comments.  
							
							... 
							
							
							
							llvm-svn: 62546 
							
						 
						
							2009-01-19 23:43:56 +00:00  
				
					
						
							
							
								 
						
							
								ea9f1d3c47 
								
							 
						 
						
							
							
								
								Fix a problem exposed by PR3354: simplifycfg was making a potentially  
							
							... 
							
							
							
							trapping instruction be executed unconditionally.
llvm-svn: 62541 
							
						 
						
							2009-01-19 23:03:13 +00:00  
				
					
						
							
							
								 
						
							
								534d2e0bae 
								
							 
						 
						
							
							
								
								Temporarily revert r62487. It's causing this error during a release bootstrap of  
							
							... 
							
							
							
							llvm-gcc. Most likely, it's miscompiling one of the "gen*" programs:
/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.obj/./prev-gcc/xgcc -B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.obj/./prev-gcc/ -B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.6.0/bin/ -c -g -O2 -mdynamic-no-pic -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -mdynamic-no-pic -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I../../llvm-gcc.src/gcc -I../../llvm-gcc.src/gcc/build -I../../llvm-gcc.src/gcc/../include -I./../intl -I../../llvm-gcc.src/gcc/../libcpp/include  -I../../llvm-gcc.src/gcc/../libdecnumber -I../libdecnumber -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.obj/include -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/include -DENABLE_LLVM -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.obj/../llvm.src/include  -D_DEBUG  -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS   -o build/gencondmd.o build/gencondmd.c
../../llvm-gcc.src/gcc/config/i386/mmx.md:926: error: expected '}' before ')' token
../../llvm-gcc.src/gcc/config/i386/mmx.md:926: warning: excess elements in struct initializer
../../llvm-gcc.src/gcc/config/i386/mmx.md:926: warning: (near initialization for 'insn_conditions[4]')
../../llvm-gcc.src/gcc/config/i386/mmx.md:926: error: expected '}' before ')' token
../../llvm-gcc.src/gcc/config/i386/mmx.md:926: error: expected ',' or ';' before ')' token
../../llvm-gcc.src/gcc/config/i386/mmx.md:927: error: expected identifier or '(' before ',' token
../../llvm-gcc.src/gcc/config/i386/sse.md:3458: error: expected identifier or '(' before ',' token
...
llvm-svn: 62506 
							
						 
						
							2009-01-19 08:46:20 +00:00  
				
					
						
							
							
								 
						
							
								f2bb4ea39c 
								
							 
						 
						
							
							
								
								Fix PR3016, a bug which can occur do to an invalid assumption:  
							
							... 
							
							
							
							we assumed a CFG structure that would be valid when all code in 
the function is reachable, but not all code is necessarily 
reachable.  Do a simple, but horrible, CFG walk to check for this
case.
llvm-svn: 62487 
							
						 
						
							2009-01-19 02:46:28 +00:00  
				
					
						
							
							
								 
						
							
								e381d7026f 
								
							 
						 
						
							
							
								
								reduce indentation by using 'continue', no functionality change.  
							
							... 
							
							
							
							llvm-svn: 62477 
							
						 
						
							2009-01-19 02:07:32 +00:00  
				
					
						
							
							
								 
						
							
								54f0c61d71 
								
							 
						 
						
							
							
								
								Fix some problems in SpeculativelyExecuteBB.  Basically,  
							
							... 
							
							
							
							because of dead code, a phi could use the speculated instruction
that was not in "BB2".  Make this check explicit and tighten up 
some other corners.  This fixes PR3292.  No testcase becauase this
depends entirely on visitation order of blocks and requires a 
sequence of 8 passes to repro.
llvm-svn: 62476 
							
						 
						
							2009-01-19 00:36:37 +00:00  
				
					
						
							
							
								 
						
							
								e1c01e4e2b 
								
							 
						 
						
							
							
								
								Make this a bit more explicit about which cases need the  
							
							... 
							
							
							
							check.  No functionality change.
llvm-svn: 62474 
							
						 
						
							2009-01-18 23:22:07 +00:00  
				
					
						
							
							
								 
						
							
								cb61afb546 
								
							 
						 
						
							
							
								
								Add a helper to remove a branch and DCE the condition, and use it  
							
							... 
							
							
							
							consistently for deleting branches.  In addition to being slightly 
more readable, this makes SimplifyCFG a bit better 
about cleaning up after itself when it makes conditions unused.
llvm-svn: 61100 
							
						 
						
							2008-12-16 20:54:32 +00:00  
				
					
						
							
							
								 
						
							
								f50d7f76c6 
								
							 
						 
						
							
							
								
								fix a bug I introduced in simplifycfg handling single entry phi  
							
							... 
							
							
							
							nodes. FoldSingleEntryPHINodes deletes the PHI, so there is no
need to delete it afterward.
llvm-svn: 60653 
							
						 
						
							2008-12-07 07:22:45 +00:00  
				
					
						
							
							
								 
						
							
								dc3f6f2c12 
								
							 
						 
						
							
							
								
								Factor some code into a new FoldSingleEntryPHINodes method.  
							
							... 
							
							
							
							llvm-svn: 60501 
							
						 
						
							2008-12-03 19:44:02 +00:00  
				
					
						
							
							
								 
						
							
								7eb270ed03 
								
							 
						 
						
							
							
								
								Rename DeleteBlockIfDead to DeleteDeadBlock and make it  
							
							... 
							
							
							
							unconditionally delete the block.  All likely clients will
do the checking anyway.
llvm-svn: 60464 
							
						 
						
							2008-12-03 06:40:52 +00:00  
				
					
						
							
							
								 
						
							
								bcc904a67c 
								
							 
						 
						
							
							
								
								Factor some code out of SimplifyCFG, forming a new  
							
							... 
							
							
							
							DeleteBlockIfDead method.
llvm-svn: 60463 
							
						 
						
							2008-12-03 06:37:44 +00:00  
				
					
						
							
							
								 
						
							
								8e84c129ce 
								
							 
						 
						
							
							
								
								delete ErasePossiblyDeadInstructionTree, replacing uses of it with  
							
							... 
							
							
							
							RecursivelyDeleteTriviallyDeadInstructions.
llvm-svn: 60196 
							
						 
						
							2008-11-27 23:25:44 +00:00  
				
					
						
							
							
								 
						
							
								d6204bed3d 
								
							 
						 
						
							
							
								
								simplify this code a bit.  
							
							... 
							
							
							
							llvm-svn: 60164 
							
						 
						
							2008-11-27 07:54:38 +00:00  
				
					
						
							
							
								 
						
							
								0934c0f35b 
								
							 
						 
						
							
							
								
								Fix PR2967 by not deleting volatile load/stores that occur before unreachable.  
							
							... 
							
							
							
							I don't really see this as being needed, but there is little harm from doing
it.
llvm-svn: 58385 
							
						 
						
							2008-10-29 17:46:26 +00:00  
				
					
						
							
							
								 
						
							
								f963403b58 
								
							 
						 
						
							
							
								
								Nick Lewycky's patch.  
							
							... 
							
							
							
							While hosting instruction check PHI node.
llvm-svn: 57025 
							
						 
						
							2008-10-03 18:57:37 +00:00  
				
					
						
							
							
								 
						
							
								4c758ea3e0 
								
							 
						 
						
							
							
								
								Large mechanical patch.  
							
							... 
							
							
							
							s/ParamAttr/Attribute/g
s/PAList/AttrList/g
s/FnAttributeWithIndex/AttributeWithIndex/g
s/FnAttr/Attribute/g
This sets the stage 
- to implement function notes as function attributes and 
- to distinguish between function attributes and return value attributes.
This requires corresponding changes in llvm-gcc and clang.
llvm-svn: 56622 
							
						 
						
							2008-09-25 21:00:45 +00:00  
				
					
						
							
							
								 
						
							
								76b22c1420 
								
							 
						 
						
							
							
								
								Try to place hoisted instructions befoe icmp instruction.  
							
							... 
							
							
							
							llvm-svn: 56315 
							
						 
						
							2008-09-18 22:50:42 +00:00  
				
					
						
							
							
								 
						
							
								7f9671ba37 
								
							 
						 
						
							
							
								
								Do not hoist instruction above branch condition. The instruction may use branch condition.  
							
							... 
							
							
							
							llvm-svn: 56286 
							
						 
						
							2008-09-17 18:21:49 +00:00  
				
					
						
							
							
								 
						
							
								8de6d22392 
								
							 
						 
						
							
							
								
								Use empty() instead of begin() == end().  
							
							... 
							
							
							
							llvm-svn: 54780 
							
						 
						
							2008-08-14 18:13:49 +00:00  
				
					
						
							
							
								 
						
							
								fa1211f69b 
								
							 
						 
						
							
							
								
								Enable first-class aggregates support.  
							
							... 
							
							
							
							Remove the GetResultInst instruction. It is still accepted in LLVM assembly
and bitcode, where it is now auto-upgraded to ExtractValueInst. Also, remove
support for return instructions with multiple values. These are auto-upgraded
to use InsertValueInst instructions.
The IRBuilder still accepts multiple-value returns, and auto-upgrades them
to InsertValueInst instructions.
llvm-svn: 53941 
							
						 
						
							2008-07-23 00:34:11 +00:00  
				
					
						
							
							
								 
						
							
								9858691f25 
								
							 
						 
						
							
							
								
								Reapply r53735.  My last patch fixed the failures Dan observed.  
							
							... 
							
							
							
							llvm-svn: 53761 
							
						 
						
							2008-07-18 17:49:43 +00:00  
				
					
						
							
							
								 
						
							
								29c3adaae0 
								
							 
						 
						
							
							
								
								Revert r53735. It broke SPEC 464.h264ref.  
							
							... 
							
							
							
							llvm-svn: 53757 
							
						 
						
							2008-07-18 16:44:49 +00:00  
				
					
						
							
							
								 
						
							
								fd7102037d 
								
							 
						 
						
							
							
								
								Use MergeBlockIntoPredecessor to simplify some code.  
							
							... 
							
							
							
							llvm-svn: 53735 
							
						 
						
							2008-07-17 20:00:46 +00:00