b292b8ce70 
								
							 
						 
						
							
							
								
								Move more code back to 2.5 APIs.  
							
							... 
							
							
							
							llvm-svn: 77635 
							
						 
						
							2009-07-30 23:03:37 +00:00  
				
					
						
							
							
								 
						
							
								6115b39ffd 
								
							 
						 
						
							
							
								
								Remove Value::getName{Start,End}, the last of the old Name APIs.  
							
							... 
							
							
							
							llvm-svn: 77152 
							
						 
						
							2009-07-26 09:48:23 +00:00  
				
					
						
							
							
								 
						
							
								0dd5e1ed39 
								
							 
						 
						
							
							
								
								More migration to raw_ostream, the water has dried up around the iostream hole.  
							
							... 
							
							
							
							- Some clients which used DOUT have moved to DEBUG. We are deprecating the
   "magic" DOUT behavior which avoided calling printing functions when the
   statement was disabled. In addition to being unnecessary magic, it had the
   downside of leaving code in -Asserts builds, and of hiding potentially
   unnecessary computations.
llvm-svn: 77019 
							
						 
						
							2009-07-25 00:23:56 +00:00  
				
					
						
							
							
								 
						
							
								edb4a70325 
								
							 
						 
						
							
							
								
								Revert the ConstantInt constructors back to their 2.5 forms where possible, thanks to contexts-on-types.  More to come.  
							
							... 
							
							
							
							llvm-svn: 77011 
							
						 
						
							2009-07-24 23:12:02 +00:00  
				
					
						
							
							
								 
						
							
								47db941fd3 
								
							 
						 
						
							
							
								
								Get rid of the Pass+Context magic.  
							
							... 
							
							
							
							llvm-svn: 76702 
							
						 
						
							2009-07-22 00:24:57 +00:00  
				
					
						
							
							
								 
						
							
								b8f6a4fc8e 
								
							 
						 
						
							
							
								
								Replace isTrapping with a new, similar method called  
							
							... 
							
							
							
							isSafeToSpeculativelyExecute. The new method is a bit closer to what 
the callers actually care about in that it rejects more things callers 
don't want.  It also adds more precise handling for integer 
division, and unifies code for analyzing the legality of a speculative 
load.
llvm-svn: 76150 
							
						 
						
							2009-07-17 04:28:42 +00:00  
				
					
						
							
							
								 
						
							
								542619e6d5 
								
							 
						 
						
							
							
								
								Move more functionality over to LLVMContext.  
							
							... 
							
							
							
							llvm-svn: 75497 
							
						 
						
							2009-07-13 20:58:05 +00:00  
				
					
						
							
							
								 
						
							
								1e5f00e7a7 
								
							 
						 
						
							
							
								
								This started as a small change, I swear.  Unfortunately, lots of things call the [I|F]CmpInst constructors.  Who knew!?  
							
							... 
							
							
							
							llvm-svn: 75200 
							
						 
						
							2009-07-09 23:48:35 +00:00  
				
					
						
							
							
								 
						
							
								38264b1554 
								
							 
						 
						
							
							
								
								"LLVMContext* " --> "LLVMContext *"  
							
							... 
							
							
							
							llvm-svn: 74878 
							
						 
						
							2009-07-06 23:00:19 +00:00  
				
					
						
							
							
								 
						
							
								39f00cc1d4 
								
							 
						 
						
							
							
								
								Thread LLVMContext through the constant folding APIs, which touches a lot of files.  
							
							... 
							
							
							
							llvm-svn: 74844 
							
						 
						
							2009-07-06 18:42:36 +00:00  
				
					
						
							
							
								 
						
							
								e70b637033 
								
							 
						 
						
							
							
								
								More LLVMContext-ification.  
							
							... 
							
							
							
							llvm-svn: 74807 
							
						 
						
							2009-07-05 22:41:43 +00:00  
				
					
						
							
							
								 
						
							
								c8ca49659a 
								
							 
						 
						
							
							
								
								Teach LoopSimplify how to merge multiple loop exits into a single exit,  
							
							... 
							
							
							
							when one of them can be converted to a trivial icmp and conditional
branch.
This addresses what is essentially a phase ordering problem.
SimplifyCFG knows how to do this transformation, but it doesn't do so
if the primary block has any instructions in it other than an icmp and
a branch. In the given testcase, the block contains other instructions,
however they are loop-invariant and can be hoisted. SimplifyCFG doesn't
have LoopInfo though, so it can't hoist them. And, it's important that
the blocks be merged before LoopRotation, as it doesn't support
multiple-exit loops.
llvm-svn: 74396 
							
						 
						
							2009-06-27 21:30:38 +00:00  
				
					
						
							
							
								 
						
							
								9df78ee1ae 
								
							 
						 
						
							
							
								
								Fix the crash in this test.  This is basically the same  
							
							... 
							
							
							
							problem addressed in 31284, but the patch there only
addressed the case where an invoke is the first thing in
a block.
llvm-svn: 73416 
							
						 
						
							2009-06-15 20:59:27 +00:00  
				
					
						
							
							
								 
						
							
								a5b9645c4b 
								
							 
						 
						
							
							
								
								Split the Add, Sub, and Mul instruction opcodes into separate  
							
							... 
							
							
							
							integer and floating-point opcodes, introducing
FAdd, FSub, and FMul.
For now, the AsmParser, BitcodeReader, and IRBuilder all preserve
backwards compatability, and the Core LLVM APIs preserve backwards
compatibility for IR producers. Most front-ends won't need to change
immediately.
This implements the first step of the plan outlined here:
http://nondot.org/sabre/LLVMNotes/IntegerOverflow.txt 
llvm-svn: 72897 
							
						 
						
							2009-06-04 22:49:04 +00:00  
				
					
						
							
							
								 
						
							
								1ac1969e09 
								
							 
						 
						
							
							
								
								Reuse existing getUnderlyingObject instead of  
							
							... 
							
							
							
							adding another copy.
llvm-svn: 71783 
							
						 
						
							2009-05-14 18:41:18 +00:00  
				
					
						
							
							
								 
						
							
								3181652363 
								
							 
						 
						
							
							
								
								Handle some additonal cases of external weak globals.  
							
							... 
							
							
							
							llvm-svn: 71717 
							
						 
						
							2009-05-13 20:55:30 +00:00  
				
					
						
							
							
								 
						
							
								69921959b4 
								
							 
						 
						
							
							
								
								Don't generate a select whose operand is load of a weak  
							
							... 
							
							
							
							external.  These may have address 0 and are not safe
to execute unconditionally.
llvm-svn: 71688 
							
						 
						
							2009-05-13 18:25:07 +00:00  
				
					
						
							
							
								 
						
							
								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