11cf3f4a27 
								
							 
						 
						
							
							
								
								Factor out redundancy from clone() implementations.  
							
							... 
							
							
							
							llvm-svn: 85327 
							
						 
						
							2009-10-27 22:16:29 +00:00  
				
					
						
							
							
								 
						
							
								8f986672a1 
								
							 
						 
						
							
							
								
								Fix SplitBlockPredecessors' LoopInfo updating code to handle the case  
							
							... 
							
							
							
							where a loop's header is being split and it has predecessors which are not
contained by the most-nested loop which contains the loop.
This fixes PR5235.
llvm-svn: 84505 
							
						 
						
							2009-10-19 16:04:50 +00:00  
				
					
						
							
							
								 
						
							
								42fb7452df 
								
							 
						 
						
							
							
								
								Instruction::clone does not need to take an LLVMContext&. Remove that and  
							
							... 
							
							
							
							update all the callers.
llvm-svn: 82889 
							
						 
						
							2009-09-27 07:38:41 +00:00  
				
					
						
							
							
								 
						
							
								3ddbc242fb 
								
							 
						 
						
							
							
								
								Re-apply r80926, with fixes: keep the domtree informed of new blocks  
							
							... 
							
							
							
							that get created during loop unswitching, and fix SplitBlockPredecessors'
LCSSA updating code to create new PHIs instead of trying to just move
existing ones.
Also, optimize Loop::verifyLoop, since it gets called a lot. Use
searches on a sorted list of blocks instead of calling the "contains"
function, as is done in other places in the Loop class, since "contains"
does a linear search. Also, don't call verifyLoop from LoopSimplify or
LCSSA, as the PassManager is already calling verifyLoop as part of
LoopInfo's verifyAnalysis.
llvm-svn: 81221 
							
						 
						
							2009-09-08 15:45:00 +00:00  
				
					
						
							
							
								 
						
							
								904199547b 
								
							 
						 
						
							
							
								
								Revert r80926. It causes loop unswitch assertion and slow down some JIT tests significantly.  
							
							... 
							
							
							
							llvm-svn: 81101 
							
						 
						
							2009-09-06 02:26:10 +00:00  
				
					
						
							
							
								 
						
							
								4c1bdcf5d7 
								
							 
						 
						
							
							
								
								Add a verifyAnalysis to LoopInfo, LoopSimplify, and LCSSA form that verify  
							
							... 
							
							
							
							that these passes are properly preserved.
Fix several transformation passes that claimed to preserve LoopSimplify
form but weren't.
llvm-svn: 80926 
							
						 
						
							2009-09-03 16:31:42 +00:00  
				
					
						
							
							
								 
						
							
								22571485b3 
								
							 
						 
						
							
							
								
								Change PHINode::hasConstantValue to have a DominatorTree argument  
							
							... 
							
							
							
							instead of a bool argument, and to do the dominator check itself.
This makes it eaiser to use when DominatorTree information is
available.
llvm-svn: 80920 
							
						 
						
							2009-09-03 15:34:35 +00:00  
				
					
						
							
							
								 
						
							
								c8a27f2a5c 
								
							 
						 
						
							
							
								
								Rename Instruction::isIdenticalTo to Instruction::isIdenticalToWhenDefined,  
							
							... 
							
							
							
							and introduce a new Instruction::isIdenticalTo which tests for full
identity, including the SubclassOptionalData flags. Also, fix the
Instruction::clone implementations to preserve the SubclassOptionalData
flags. Finally, teach several optimizations how to handle
SubclassOptionalData correctly, given these changes.
This fixes the counterintuitive behavior of isIdenticalTo not comparing
the full value, and clone not returning an identical clone, as well as
some subtle bugs that could be caused by these.
Thanks to Nick Lewycky for reporting this, and for an initial patch!
llvm-svn: 80038 
							
						 
						
							2009-08-25 22:11:20 +00:00  
				
					
						
							
							
								 
						
							
								55f1c09e31 
								
							 
						 
						
							
							
								
								Push LLVMContexts through the IntegerType APIs.  
							
							... 
							
							
							
							llvm-svn: 78948 
							
						 
						
							2009-08-13 21:58:54 +00:00  
				
					
						
							
							
								 
						
							
								5a1acd9912 
								
							 
						 
						
							
							
								
								Move a few more APIs back to 2.5 forms.  The only remaining ones left to change back are  
							
							... 
							
							
							
							metadata related, which I'm waiting on to avoid conflicting with Devang.
llvm-svn: 77721 
							
						 
						
							2009-07-31 20:28:14 +00:00  
				
					
						
							
							
								 
						
							
								b292b8ce70 
								
							 
						 
						
							
							
								
								Move more code back to 2.5 APIs.  
							
							... 
							
							
							
							llvm-svn: 77635 
							
						 
						
							2009-07-30 23:03:37 +00:00  
				
					
						
							
							
								 
						
							
								43d19d61d4 
								
							 
						 
						
							
							
								
								Make AliasAnalysis and related classes use  
							
							... 
							
							
							
							getAnalysisIfAvailable<TargetData>().
llvm-svn: 77028 
							
						 
						
							2009-07-25 00:48:42 +00:00  
				
					
						
							
							
								 
						
							
								85a791ef7a 
								
							 
						 
						
							
							
								
								AliasAnalysis wants sizes in address-units, not bits.  
							
							... 
							
							
							
							llvm-svn: 77009 
							
						 
						
							2009-07-24 23:01:30 +00:00  
				
					
						
							
							
								 
						
							
								47db941fd3 
								
							 
						 
						
							
							
								
								Get rid of the Pass+Context magic.  
							
							... 
							
							
							
							llvm-svn: 76702 
							
						 
						
							2009-07-22 00:24:57 +00:00  
				
					
						
							
							
								 
						
							
								fbcc663cbf 
								
							 
						 
						
							
							
								
								llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.  
							
							... 
							
							
							
							This adds location info for all llvm_unreachable calls (which is a macro now) in
!NDEBUG builds.
In NDEBUG builds location info and the message is off (it only prints
"UREACHABLE executed").
llvm-svn: 75640 
							
						 
						
							2009-07-14 16:55:14 +00:00  
				
					
						
							
							
								 
						
							
								ccb29cd290 
								
							 
						 
						
							
							
								
								Convert more assert(0)+abort() -> LLVM_UNREACHABLE,  
							
							... 
							
							
							
							and abort()/exit() -> llvm_report_error().
llvm-svn: 75363 
							
						 
						
							2009-07-11 13:10:19 +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  
				
					
						
							
							
								 
						
							
								e70b637033 
								
							 
						 
						
							
							
								
								More LLVMContext-ification.  
							
							... 
							
							
							
							llvm-svn: 74807 
							
						 
						
							2009-07-05 22:41:43 +00:00  
				
					
						
							
							
								 
						
							
								48f8222293 
								
							 
						 
						
							
							
								
								Re-apply 70645, converting ScalarEvolution to use  
							
							... 
							
							
							
							CallbackVH, with fixes. allUsesReplacedWith need to
walk the def-use chains and invalidate all users of a
value that is replaced. SCEVs of users need to be
recalcualted even if the new value is equivalent. Also,
make forgetLoopPHIs walk def-use chains, since any
SCEV that depends on a PHI should be recalculated when
more information about that PHI becomes available.
llvm-svn: 70927 
							
						 
						
							2009-05-04 22:30:44 +00:00  
				
					
						
							
							
								 
						
							
								351134ba93 
								
							 
						 
						
							
							
								
								Factor loop backedge finding out of CodeGenPrepare into a new  
							
							... 
							
							
							
							FindFunctionBackedges function.
llvm-svn: 70819 
							
						 
						
							2009-05-04 02:25:58 +00:00  
				
					
						
							
							
								 
						
							
								5036695c32 
								
							 
						 
						
							
							
								
								Revert r70645 for now; it's causing a variety of regressions.  
							
							... 
							
							
							
							llvm-svn: 70661 
							
						 
						
							2009-05-03 05:46:20 +00:00  
				
					
						
							
							
								 
						
							
								e9a38d16fe 
								
							 
						 
						
							
							
								
								Convert ScalarEvolution to use CallbackVH for its internal map. This  
							
							... 
							
							
							
							makes ScalarEvolution::deleteValueFromRecords, and it's code that
subtly needed to be called before ReplaceAllUsesWith, unnecessary.
It also makes ValueDeletionListener unnecessary.
llvm-svn: 70645 
							
						 
						
							2009-05-02 21:19:20 +00:00  
				
					
						
							
							
								 
						
							
								ff08995589 
								
							 
						 
						
							
							
								
								Previously, RecursivelyDeleteDeadInstructions provided an option  
							
							... 
							
							
							
							of returning a list of pointers to Values that are deleted. This was
unsafe, because the pointers in the list are, by nature of what
RecursivelyDeleteDeadInstructions does, always dangling. Replace this
with a simple callback mechanism. This may eventually be removed if
all clients can reasonably be expected to use CallbackVH.
Use this to factor out the dead-phi-cycle-elimination code from LSR
utility function, and generalize it to use the
RecursivelyDeleteTriviallyDeadInstructions utility function.
This makes LSR more aggressive about eliminating dead PHI cycles;
adjust tests to either be less trivial or to simply expect fewer
instructions.
llvm-svn: 70636 
							
						 
						
							2009-05-02 18:29:22 +00:00  
				
					
						
							
							
								 
						
							
								d71c20081c 
								
							 
						 
						
							
							
								
								Skip ptr-to-ptr bitcasts when counting in another case.  
							
							... 
							
							
							
							llvm-svn: 66000 
							
						 
						
							2009-03-04 02:06:53 +00:00  
				
					
						
							
							
								 
						
							
								09c3e8ec00 
								
							 
						 
						
							
							
								
								Instruction counters must skip the bitcasts that  
							
							... 
							
							
							
							feed into llvm.dbg.declare nodes, as well as
the debug directives themselves.
llvm-svn: 65976 
							
						 
						
							2009-03-03 22:36:47 +00:00  
				
					
						
							
							
								 
						
							
								77456b7ab4 
								
							 
						 
						
							
							
								
								When removing a store to an alloca that has only one  
							
							... 
							
							
							
							use, check also for the case where it has two uses,
the other being a llvm.dbg.declare.  This is needed so
debug info doesn't affect codegen.
llvm-svn: 65970 
							
						 
						
							2009-03-03 21:26:39 +00:00  
				
					
						
							
							
								 
						
							
								92b551bc2b 
								
							 
						 
						
							
							
								
								Fix a bunch of Doxygen syntax issues. Escape special characters,  
							
							... 
							
							
							
							and put @file  directives on their own comment line.
llvm-svn: 65920 
							
						 
						
							2009-03-03 02:55:14 +00:00  
				
					
						
							
							
								 
						
							
								e1bb2f86f9 
								
							 
						 
						
							
							
								
								When sinking an insn in InstCombine bring its debug  
							
							... 
							
							
							
							info with it.
Don't count debug info insns against the scan maximum
in FindAvailableLoadedValue (lest they affect codegen).
llvm-svn: 65910 
							
						 
						
							2009-03-03 01:09:07 +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  
				
					
						
							
							
								 
						
							
								5a913d61e3 
								
							 
						 
						
							
							
								
								Rename getAnalysisToUpdate to getAnalysisIfAvailable.  
							
							... 
							
							
							
							llvm-svn: 63198 
							
						 
						
							2009-01-28 13:14:17 +00:00  
				
					
						
							
							
								 
						
							
								dc3f6f2c12 
								
							 
						 
						
							
							
								
								Factor some code into a new FoldSingleEntryPHINodes method.  
							
							... 
							
							
							
							llvm-svn: 60501 
							
						 
						
							2008-12-03 19:44:02 +00:00  
				
					
						
							
							
								 
						
							
								37e0136fef 
								
							 
						 
						
							
							
								
								third time is the charm.  
							
							... 
							
							
							
							llvm-svn: 60469 
							
						 
						
							2008-12-03 07:45:15 +00:00  
				
					
						
							
							
								 
						
							
								c04a1ffa9a 
								
							 
						 
						
							
							
								
								fix assertion.  
							
							... 
							
							
							
							llvm-svn: 60468 
							
						 
						
							2008-12-03 07:43:05 +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  
				
					
						
							
							
								 
						
							
								e0d019def6 
								
							 
						 
						
							
							
								
								switch InstCombine::visitLoadInst to use  
							
							... 
							
							
							
							FindAvailableLoadedValue
llvm-svn: 60169 
							
						 
						
							2008-11-27 08:56:30 +00:00  
				
					
						
							
							
								 
						
							
								c6ae56d23f 
								
							 
						 
						
							
							
								
								enhance FindAvailableLoadedValue to make use of AliasAnalysis  
							
							... 
							
							
							
							if it has it.
llvm-svn: 60167 
							
						 
						
							2008-11-27 08:18:12 +00:00  
				
					
						
							
							
								 
						
							
								72f16e70f0 
								
							 
						 
						
							
							
								
								move FindAvailableLoadedValue from JumpThreading to Transforms/Utils.  
							
							... 
							
							
							
							llvm-svn: 60166 
							
						 
						
							2008-11-27 08:10:05 +00:00  
				
					
						
							
							
								 
						
							
								f33f8a8606 
								
							 
						 
						
							
							
								
								Fix unused variable warnings.  
							
							... 
							
							
							
							llvm-svn: 58651 
							
						 
						
							2008-11-03 23:14:09 +00:00  
				
					
						
							
							
								 
						
							
								cb4f156b6b 
								
							 
						 
						
							
							
								
								SplitBlock should only attempt to update LoopInfo if it is actually being used.  
							
							... 
							
							
							
							llvm-svn: 56994 
							
						 
						
							2008-10-03 06:55:35 +00:00  
				
					
						
							
							
								 
						
							
								0f7a3507cf 
								
							 
						 
						
							
							
								
								Fix simplifycfg crash in handing block merge.  
							
							... 
							
							
							
							llvm-svn: 55971 
							
						 
						
							2008-09-09 01:06:56 +00:00  
				
					
						
							
							
								 
						
							
								1468bec06e 
								
							 
						 
						
							
							
								
								Add some checks that got lost in the shuffle.  This fixes 464.h264ref.  
							
							... 
							
							
							
							llvm-svn: 53760 
							
						 
						
							2008-07-18 17:46:41 +00:00  
				
					
						
							
							
								 
						
							
								27405efdc0 
								
							 
						 
						
							
							
								
								Make MergeBlockIntoPredecessor more aggressive when the same successor appears  
							
							... 
							
							
							
							more than once.
llvm-svn: 53731 
							
						 
						
							2008-07-17 19:42:29 +00:00  
				
					
						
							
							
								 
						
							
								c062381c7b 
								
							 
						 
						
							
							
								
								Factor MergeBlockIntoPredecessor out into BasicBlockUtils.  
							
							... 
							
							
							
							llvm-svn: 53705 
							
						 
						
							2008-07-17 00:01:40 +00:00  
				
					
						
							
							
								 
						
							
								4d43d3c72c 
								
							 
						 
						
							
							
								
								Remove 'unwinds to' support from mainline. This patch undoes r47802 r47989  
							
							... 
							
							
							
							r48047 r48084 r48085 r48086 r48088 r48096 r48099 r48109 and r48123.
llvm-svn: 50265 
							
						 
						
							2008-04-25 16:53:59 +00:00  
				
					
						
							
							
								 
						
							
								a5b11705b6 
								
							 
						 
						
							
							
								
								Move SplitBlockPredecessors out of loopsimplify into BasicBlockUtils.h  
							
							... 
							
							
							
							as a global helper function.  At the same type, switch it from taking
a vector of predecessors to an arbitrary sequential input.  This allows
us to switch LoopSimplify to use a SmallVector for various temporary
vectors that it passed into SplitBlockPredecessors.
llvm-svn: 50020 
							
						 
						
							2008-04-21 01:28:02 +00:00  
				
					
						
							
							
								 
						
							
								e9ecc68d8f 
								
							 
						 
						
							
							
								
								API changes for class Use size reduction, wave 1.  
							
							... 
							
							
							
							Specifically, introduction of XXX::Create methods
for Users that have a potentially variable number of
Uses.
llvm-svn: 49277 
							
						 
						
							2008-04-06 20:25:17 +00:00  
				
					
						
							
							
								 
						
							
								cc24104703 
								
							 
						 
						
							
							
								
								Two things. Preserve the unwind_to when splitting a BB.  
							
							... 
							
							
							
							Add the ability to remove just one instance of a BB from a phi node. This fixes
the compile error in the tree now.
llvm-svn: 48085 
							
						 
						
							2008-03-09 05:04:48 +00:00  
				
					
						
							
							
								 
						
							
								f3ebc3f3d2 
								
							 
						 
						
							
							
								
								Remove attribution from file headers, per discussion on llvmdev.  
							
							... 
							
							
							
							llvm-svn: 45418 
							
						 
						
							2007-12-29 20:36:04 +00:00  
				
					
						
							
							
								 
						
							
								b0dd27ee91 
								
							 
						 
						
							
							
								
								Make LoopInfoBase more generic, in preparation for having MachineLoopInfo.  This involves a small interface change.  
							
							... 
							
							
							
							llvm-svn: 44348 
							
						 
						
							2007-11-27 03:43:35 +00:00  
				
					
						
							
							
								 
						
							
								186e0d8b0a 
								
							 
						 
						
							
							
								
								After a basic block is split into two parts,  
							
							... 
							
							
							
							second part dominates all the blocks dominated
by original basic block. And first part dominates
second part.
llvm-svn: 40035 
							
						 
						
							2007-07-19 02:29:24 +00:00  
				
					
						
							
							
								 
						
							
								d7767cc2a7 
								
							 
						 
						
							
							
								
								Add SplitEdge and SplitBlock utility routines.  
							
							... 
							
							
							
							llvm-svn: 37952 
							
						 
						
							2007-07-06 21:39:20 +00:00  
				
					
						
							
							
								 
						
							
								8dd4cae4f8 
								
							 
						 
						
							
							
								
								simplify code by using Value::takeName  
							
							... 
							
							
							
							llvm-svn: 34177 
							
						 
						
							2007-02-11 01:37:51 +00:00  
				
					
						
							
							
								 
						
							
								2452c94df4 
								
							 
						 
						
							
							
								
								Fix a doxygen problem and break lines at 80 columns  
							
							... 
							
							
							
							llvm-svn: 28395 
							
						 
						
							2006-05-19 19:09:46 +00:00  
				
					
						
							
							
								 
						
							
								b1c9317bb4 
								
							 
						 
						
							
							
								
								Remove trailing whitespace  
							
							... 
							
							
							
							llvm-svn: 21427 
							
						 
						
							2005-04-21 23:48:37 +00:00  
				
					
						
							
							
								 
						
							
								7ceb081f3f 
								
							 
						 
						
							
							
								
								Improve doxygen documentation, patch contributed by Evan Jones!  
							
							... 
							
							
							
							llvm-svn: 21393 
							
						 
						
							2005-04-21 16:04:49 +00:00  
				
					
						
							
							
								 
						
							
								6d0a24c608 
								
							 
						 
						
							
							
								
								second argument to Value::setName is now gone.  
							
							... 
							
							
							
							llvm-svn: 20463 
							
						 
						
							2005-03-05 19:05:20 +00:00  
				
					
						
							
							
								 
						
							
								63b38bd2ed 
								
							 
						 
						
							
							
								
								Fix #includes of i*.h => Instructions.h as per PR403.  
							
							... 
							
							
							
							llvm-svn: 15334 
							
						 
						
							2004-07-29 17:30:56 +00:00  
				
					
						
							
							
								 
						
							
								df3c342a4c 
								
							 
						 
						
							
							
								
								Finegrainify namespacification  
							
							... 
							
							
							
							llvm-svn: 10727 
							
						 
						
							2004-01-09 06:12:26 +00:00  
				
					
						
							
							
								 
						
							
								960707c335 
								
							 
						 
						
							
							
								
								Put all LLVM code into the llvm namespace, as per bug 109.  
							
							... 
							
							
							
							llvm-svn: 9903 
							
						 
						
							2003-11-11 22:41:34 +00:00  
				
					
						
							
							
								 
						
							
								482202a601 
								
							 
						 
						
							
							
								
								Added LLVM project notice to the top of every C++ source file.  
							
							... 
							
							
							
							Header files will be on the way.
llvm-svn: 9298 
							
						 
						
							2003-10-20 19:43:21 +00:00  
				
					
						
							
							
								 
						
							
								8b2bd4ed47 
								
							 
						 
						
							
							
								
								Fix spelling.  
							
							... 
							
							
							
							llvm-svn: 9027 
							
						 
						
							2003-10-10 17:57:28 +00:00  
				
					
						
							
							
								 
						
							
								7eb05a170a 
								
							 
						 
						
							
							
								
								Spell `necessary' correctly.  
							
							... 
							
							
							
							llvm-svn: 7944 
							
						 
						
							2003-08-18 14:43:39 +00:00  
				
					
						
							
							
								 
						
							
								98cf1f5d64 
								
							 
						 
						
							
							
								
								- Eliminated the deferred symbol table stuff in Module & Function, it really  
							
							... 
							
							
							
							wasn't an optimization and it was causing lots of bugs.
llvm-svn: 4779 
							
						 
						
							2002-11-20 18:36:02 +00:00  
				
					
						
							
							
								 
						
							
								632df28deb 
								
							 
						 
						
							
							
								
								Fix spelling of `propagate'.  
							
							... 
							
							
							
							llvm-svn: 4423 
							
						 
						
							2002-10-29 23:06:16 +00:00  
				
					
						
							
							
								 
						
							
								b17274ebf6 
								
							 
						 
						
							
							
								
								Implement a new RemoveSuccessor function  
							
							... 
							
							
							
							llvm-svn: 3131 
							
						 
						
							2002-07-29 22:32:08 +00:00  
				
					
						
							
							
								 
						
							
								fda72b1aad 
								
							 
						 
						
							
							
								
								*** empty log message ***  
							
							... 
							
							
							
							llvm-svn: 2777 
							
						 
						
							2002-06-25 16:12:52 +00:00  
				
					
						
							
							
								 
						
							
								28537dff72 
								
							 
						 
						
							
							
								
								Add code pulled out of TransformInternals.cpp, ConstProp.cpp, and DCE.cpp  
							
							... 
							
							
							
							llvm-svn: 2513 
							
						 
						
							2002-05-07 18:07:59 +00:00