summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils
Commit message (Collapse)AuthorAgeFilesLines
* Fix nondeterministic behavior.Julien Lerouge2010-01-101-9/+3
| | | | llvm-svn: 93093
* Fix nondeterministic behavior.Julien Lerouge2010-01-091-6/+7
| | | | llvm-svn: 93038
* Convert a ton of simple integer type equality tests to the new predicate.Benjamin Kramer2010-01-051-1/+1
| | | | llvm-svn: 92760
* Nick Lewycky pointed out that this code makes changes unconditionally.Dan Gohman2010-01-051-1/+2
| | | | llvm-svn: 92739
* Use do+while instead of while for loops which obviously have aDan Gohman2010-01-053-6/+6
| | | | | | non-zero trip count. Use SmallVector's pop_back_val(). llvm-svn: 92734
* Make RecursivelyDeleteTriviallyDeadInstructions,Dan Gohman2010-01-052-9/+17
| | | | | | | RecursivelyDeleteDeadPHINode, and DeleteDeadPHIs return a flag indicating whether they made any changes. llvm-svn: 92732
* Avoid going through the LLVMContext for type equality where it's safe to ↵Benjamin Kramer2010-01-057-8/+8
| | | | | | dereference the type pointer. llvm-svn: 92726
* Change errs() to dbgs().David Greene2010-01-051-4/+4
| | | | llvm-svn: 92606
* Change errs() to dbgs().David Greene2010-01-051-2/+3
| | | | llvm-svn: 92605
* Change errs() to dbgs().David Greene2010-01-051-13/+13
| | | | llvm-svn: 92604
* Change errs() to dbgs().David Greene2010-01-051-2/+2
| | | | llvm-svn: 92603
* Change errs() to dbgs().David Greene2010-01-051-5/+5
| | | | llvm-svn: 92602
* Change errs() to dbgs().David Greene2010-01-051-7/+7
| | | | llvm-svn: 92601
* Change errs() to dbgs().David Greene2010-01-051-11/+11
| | | | llvm-svn: 92600
* Change errs() to dbgs().David Greene2010-01-051-5/+5
| | | | llvm-svn: 92599
* Remove dead debug info intrinsics.Devang Patel2010-01-054-80/+1
| | | | | | | | | | Intrinsic::dbg_stoppoint Intrinsic::dbg_region_start Intrinsic::dbg_region_end Intrinsic::dbg_func_start AutoUpgrade simply ignores these intrinsics now. llvm-svn: 92557
* fix Analysis/DebugInfo.h to not include Metadata.h. Do thisChris Lattner2009-12-311-0/+1
| | | | | | | by moving one method out of line and eliminating redundant checks from other methods. llvm-svn: 92337
* rename "elements" of metadata to "operands". "Elements" areChris Lattner2009-12-311-3/+3
| | | | | | | things that occur in types. "operands" are things that occur in values. llvm-svn: 92322
* Use an array instead of a SmallVector.Benjamin Kramer2009-12-291-7/+7
| | | | llvm-svn: 92264
* prune #includes.Chris Lattner2009-12-291-2/+2
| | | | llvm-svn: 92260
* Final step in the metadata API restructuring: move the Chris Lattner2009-12-291-2/+1
| | | | | | | | getMDKindID/getMDKindNames methods to LLVMContext (and add convenience methods to Module), eliminating MetadataContext. Move the state that it maintains out to LLVMContext. llvm-svn: 92259
* remove useless argument.Chris Lattner2009-12-291-8/+7
| | | | llvm-svn: 92256
* This is a major cleanup of the instruction metadata interfaces thatChris Lattner2009-12-281-7/+13
| | | | | | | | | | | | | | | | | | | | | | I asked Devang to do back on Sep 27. Instead of going through the MetadataContext class with methods like getMD() and getMDs(), just ask the instruction directly for its metadata with getMetadata() and getAllMetadata(). This includes a variety of other fixes and improvements: previously all Value*'s were bloated because the HasMetadata bit was thrown into value, adding a 9th bit to a byte. Now this is properly sunk down to the Instruction class (the only place where it makes sense) and it will be folded away somewhere soon. This also fixes some confusion in getMDs and its clients about whether the returned list is indexed by the MDID or densely packed. This is now returned sorted and densely packed and the comments make this clear. This introduces a number of fixme's which I'll follow up on. llvm-svn: 92235
* rename getMDKind -> getMDKindID, make it autoinsert if an MD KindChris Lattner2009-12-281-1/+1
| | | | | | | doesn't exist already, eliminate registerMDKind. Tidy up a bunch of random stuff. llvm-svn: 92225
* improve indentation avoid a pointless conversion from weakvh to trackingvh,Chris Lattner2009-12-211-3/+3
| | | | | | no functionality change. llvm-svn: 91848
* revert r89298, which was committed without a testcase. I thinkChris Lattner2009-12-211-6/+0
| | | | | | the underlying PHI node insertion issue in SSAUpdate is fixed. llvm-svn: 91821
* fix PR5837 by having SSAUpdate reuse phi nodes for theChris Lattner2009-12-211-1/+23
| | | | | | | | | | 'GetValueInMiddleOfBlock' case, instead of inserting duplicates. A similar fix is almost certainly needed by the machine-level SSAUpdate implementation. llvm-svn: 91820
* Add Loop contains utility methods for testing whether a loopDan Gohman2009-12-182-6/+6
| | | | | | | | contains another loop, or an instruction. The loop form is substantially more efficient on large loops than the typical code it replaces. llvm-svn: 91654
* Update a comment.Dan Gohman2009-12-181-1/+1
| | | | llvm-svn: 91645
* Remove isPod() from DenseMapInfo, splitting it out to its ownChris Lattner2009-12-151-1/+0
| | | | | | | | isPodLike type trait. This is a generally useful type trait for more than just DenseMap, and we really care about whether something acts like a pod, not whether it really is a pod. llvm-svn: 91421
* Don't leave pointers uninitialized in the default constructor. GCC complainsChandler Carruth2009-12-131-1/+1
| | | | | | about the potential use of these uninitialized members under certain conditions. llvm-svn: 91239
* Remove unnecessary #include "llvm/LLVMContext.h".Nick Lewycky2009-12-081-1/+0
| | | | llvm-svn: 90836
* add an assert to make it really clear what this is doing. Return singularval asChris Lattner2009-12-041-1/+5
| | | | | | a compile time perf optimization to avoid a load. llvm-svn: 90507
* improve portability to avoid conflicting with std::next in c++'0x.Chris Lattner2009-12-031-1/+1
| | | | | | Patch by Howard Hinnant! llvm-svn: 90365
* Move EliminateDuplicatePHINodes() from SimplifyCFG.cpp to Local.cppJim Grosbach2009-12-022-63/+62
| | | | llvm-svn: 90324
* Pull LLVMContext out of PromoteMemToReg.Nick Lewycky2009-11-232-9/+5
| | | | llvm-svn: 89645
* Make Loop::getLoopLatch() work on loops which don't have preheaders, asDan Gohman2009-11-201-1/+6
| | | | | | | | | | | | it may be used in contexts where preheader insertion may have failed due to an indirectbr. Make LoopSimplify's LoopSimplify::SeparateNestedLoop properly fail in the case that it would require splitting an indirectbr edge. These fix PR5502. llvm-svn: 89484
* Eliminate duplicate phi nodes in loops. Loop rotation, for example, can ↵Jim Grosbach2009-11-191-0/+6
| | | | | | introduce these, and it's beneficial to later passes to clean them up. llvm-svn: 89298
* Make EliminateDuplicatePHINodes() available as a utility functionJim Grosbach2009-11-191-1/+1
| | | | llvm-svn: 89297
* Add the braces gcc suggested.Daniel Dunbar2009-11-121-5/+8
| | | | llvm-svn: 86933
* Don't trivially delete unused calls to llvm.invariant.start. This allowsDuncan Sands2009-11-111-0/+3
| | | | | | | | | | | | | llvm.invariant.start to be used without necessarily being paired with a call to llvm.invariant.end. If you run the entire optimization pipeline then such calls are in fact deleted (adce does it), but that's actually a good thing since we probably do want them to be zapped late in the game. There should really be an integration test that checks that the llvm.invariant.start call lasts long enough that all passes that do interesting things with it get to do their stuff before it is deleted. But since no passes do anything interesting with it yet this will have to wait for later. llvm-svn: 86840
* Implement support to debug inlined functions.Devang Patel2009-11-102-4/+57
| | | | llvm-svn: 86748
* move some generally useful functions out of jump threadingChris Lattner2009-11-101-2/+47
| | | | | | into libanalysis and transformutils. llvm-svn: 86735
* refactor TryToSimplifyUncondBranchFromEmptyBlock out of SimplifyCFG.Chris Lattner2009-11-102-164/+173
| | | | llvm-svn: 86666
* fix ConstantFoldCompareInstOperands to take the LHS/RHS asChris Lattner2009-11-091-2/+2
| | | | | | individual operands instead of taking a temporary array llvm-svn: 86619
* Fix a comment in a typo that Duncan noticed.Dan Gohman2009-11-091-1/+1
| | | | llvm-svn: 86575
* Generalize LCSSA to handle loops with exits with predecessors outsideDan Gohman2009-11-091-2/+14
| | | | | | | | | | | | the loop. This is needed because with indirectbr it may not be possible for LoopSimplify to guarantee that all loop exit predecessors are inside the loop. This fixes PR5437. LCCSA no longer actually requires LoopSimplify form, but for now it must still have the dependency because the PassManager doesn't know how to schedule LoopSimplify otherwise. llvm-svn: 86569
* remove a bunch of extraneous LLVMContext argumentsChris Lattner2009-11-063-8/+4
| | | | | | from various APIs, addressing PR5325. llvm-svn: 86231
* Avoid calling getUniqueExitBlocks from within LoopSimplify, as it dependsDan Gohman2009-11-051-1/+8
| | | | | | | on loops having dedicated exits, which LoopSimplify can no longer always guarantee. llvm-svn: 86181
* The introduction of indirectbr meant the introduction ofDan Gohman2009-11-051-21/+82
| | | | | | | | | unsplittable critical edges, which means the introduction of loops which cannot be transformed to LoopSimplify form. Fix LoopSimplify to avoid transforming such loops into invalid code. llvm-svn: 86176
OpenPOWER on IntegriCloud