summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils
Commit message (Collapse)AuthorAgeFilesLines
* back out r98957, it broke ↵Gabor Greif2010-03-191-2/+2
| | | | | | http://smooshlab.apple.com:8010/builders/clang-x86_64-darwin10-fnt/builds/703 in the nightly test suite llvm-svn: 98958
* Recommit r80858 again (which has been backed out in r80871).Gabor Greif2010-03-191-2/+2
| | | | | | | | | | | This time I did a self-hosted bootstrap on Linux x86-64, with no problems. Let's see how darwin 64-bit self-hosting goes. At the first sign of failure I'll back this out. Maybe the valgrind bots give me a hint of what may be wrong (it at all). llvm-svn: 98957
* Skip debug info intrinsics.Devang Patel2010-03-151-0/+4
| | | | llvm-svn: 98581
* Make returns more consistent with others.Bill Wendling2010-03-141-2/+2
| | | | llvm-svn: 98490
* Add a virtual destructor and give vtable a home.Benjamin Kramer2010-03-121-0/+2
| | | | llvm-svn: 98376
* Factor checked library call optimization into a common helper class and use itBenjamin Kramer2010-03-121-0/+81
| | | | | | to unify the almost identical code in CodeGenPrepare and InstCombineCalls. llvm-svn: 98338
* stpcpy is so similar to strcpy, it doesn't deserve a complete copy of the ↵Benjamin Kramer2010-03-111-21/+3
| | | | | | __strcpy_chk -> strcpy code. llvm-svn: 98284
* Lower stpcpy_chk when possible.Eric Christopher2010-03-111-0/+18
| | | | llvm-svn: 98274
* Fix typo.Eric Christopher2010-03-111-1/+1
| | | | llvm-svn: 98260
* Add strncpy libcall creator. Use it when it should be used.Eric Christopher2010-03-111-0/+20
| | | | llvm-svn: 98219
* Add a DominatorTree argument to isLCSSA so that it doesn't have toDan Gohman2010-03-102-8/+2
| | | | | | | compute a set of reachable blocks for itself each time it is called, which is fairly frequently. llvm-svn: 98179
* Fix a comment.Dan Gohman2010-03-101-1/+1
| | | | llvm-svn: 98122
* Avoid using DIDescriptor.isNull(). Devang Patel2010-03-081-3/+3
| | | | | | This is a first step towards eliminating checks in Descriptor constructors. llvm-svn: 97975
* Revert r97947.Devang Patel2010-03-081-3/+3
| | | | llvm-svn: 97963
* Avoid using DIDescriptor.isNull().Devang Patel2010-03-081-3/+3
| | | | | | This is a first step towards eliminating unncessary constructor checks in light weight DIDescriptor wrappers. llvm-svn: 97947
* Update CMake build.Ted Kremenek2010-03-051-0/+1
| | | | llvm-svn: 97846
* Move SimplifyLibCalls's LibCall builders to a separate file so theyEric Christopher2010-03-051-0/+324
| | | | | | | | can be used in more places. Add an argument for the TargetData that most of them need. Update for the getInt8PtrTy() change. Should be no functionality change. llvm-svn: 97844
* Add some debug output to LoopSimplify.Dan Gohman2010-03-011-0/+30
| | | | llvm-svn: 97458
* Make LoopSimplify change conditional branches in loop exiting blocksDan Gohman2010-02-251-2/+16
| | | | | | | | | | | | which branch on undef to branch on a boolean constant for the edge exiting the loop. This helps ScalarEvolution compute trip counts for loops. Teach ScalarEvolution to recognize single-value PHIs, when safe, and ForgetSymbolicName to forget such single-value PHI nodes as apprpriate in ForgetSymbolicName. llvm-svn: 97126
* Rename SuccessorNumber to GetSuccessorNumber.Bob Wilson2010-02-161-5/+6
| | | | llvm-svn: 96387
* Refactor to share code to find the position of a basic block successor in theBob Wilson2010-02-161-11/+17
| | | | | | terminator's list of successors. llvm-svn: 96377
* There are two ways of checking for a given type, for example isa<PointerType>(T)Duncan Sands2010-02-164-17/+17
| | | | | | | and T->isPointerTy(). Convert most instances of the first form to the second form. Requested by Chris. llvm-svn: 96344
* fix PR6305 by handling BlockAddress in a helper functionChris Lattner2010-02-151-0/+11
| | | | | | called by jump threading. llvm-svn: 96263
* Uniformize the names of type predicates: rather than having isFloatTy andDuncan Sands2010-02-151-1/+1
| | | | | | isInteger, we now have isFloatTy and isIntegerTy. Requested by Chris! llvm-svn: 96223
* Speed up codegen prepare from 3.58s to 0.488s.Chris Lattner2010-02-131-19/+52
| | | | llvm-svn: 96081
* PHINode::getBasicBlockIndex is O(n) in the number of inputsChris Lattner2010-02-131-3/+10
| | | | | | | | to a PHI, avoid it in the common case where the BB occurs in the same index for multiple phis. This speeds up CGP on an insane testcase from 8.35 to 3.58s. llvm-svn: 96080
* iterate over preds using PHI information when available instead ofChris Lattner2010-02-131-6/+14
| | | | | | using pred_begin/end. It is much faster. llvm-svn: 96079
* Teach SimplifyCFG about magic pointer constants.Jakob Stoklund Olesen2010-02-051-33/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Weird code sometimes uses pointer constants other than null. This patch teaches SimplifyCFG to build switch instructions in those cases. Code like this: void f(const char *x) { if (!x) puts("null"); else if ((uintptr_t)x == 1) puts("one"); else if (x == (char*)2 || x == (char*)3) puts("two"); else if ((intptr_t)x == 4) puts("four"); else puts(x); } Now becomes a switch: define void @f(i8* %x) nounwind ssp { entry: %magicptr23 = ptrtoint i8* %x to i64 ; <i64> [#uses=1] switch i64 %magicptr23, label %if.else16 [ i64 0, label %if.then i64 1, label %if.then2 i64 2, label %if.then9 i64 3, label %if.then9 i64 4, label %if.then14 ] Note that LLVM's own DenseMap uses magic pointers. llvm-svn: 95439
* Use a SmallSetVector instead of a SetVector; this code showed up as aDan Gohman2010-02-051-2/+3
| | | | | | malloc caller in a profile. llvm-svn: 95407
* Fix pr6198 by moving the isSized() check to an outer conditional.Bob Wilson2010-02-011-6/+8
| | | | | | | The testcase from pr6198 does not crash for me -- I don't know what's up with that -- so I'm not adding it to the tests. llvm-svn: 94984
* Check alignment of loads when deciding whether it is safe to execute themBob Wilson2010-01-301-7/+14
| | | | | | | unconditionally. Besides checking the offset, also check that the underlying object is aligned as much as the load itself. llvm-svn: 94875
* Use uint64_t instead of unsigned for offsets and sizes.Bob Wilson2010-01-291-3/+3
| | | | llvm-svn: 94835
* Improve isSafeToLoadUnconditionally to recognize that GEPs with constantBob Wilson2010-01-291-8/+61
| | | | | | | indices are safe if the result is known to be within the bounds of the underlying object. llvm-svn: 94829
* mem2reg erases the dbg.declare intrinsics that it converts to dbg.val intrinsicsVictor Hernandez2010-01-291-3/+13
| | | | llvm-svn: 94763
* Avoid creating redundant PHIs in SSAUpdater::GetValueInMiddleOfBlock.Bob Wilson2010-01-271-41/+75
| | | | | | | This was already being done in SSAUpdater::GetValueAtEndOfBlock so I've just changed SSAUpdater to check for existing PHIs in both places. llvm-svn: 94690
* Don't bother with sprintf, just pass the Twine through.Benjamin Kramer2010-01-272-6/+2
| | | | llvm-svn: 94684
* some cleanups.Chris Lattner2010-01-271-14/+15
| | | | llvm-svn: 94649
* no need to check for nullChris Lattner2010-01-271-1/+1
| | | | llvm-svn: 94648
* When converting dbg.declare to dbg.value, attach promoted store's debug ↵Victor Hernandez2010-01-271-1/+4
| | | | | | metadata to dbg.value llvm-svn: 94634
* Avoid extra calls to MD->getNumOperands()Victor Hernandez2010-01-261-1/+1
| | | | llvm-svn: 94618
* Switch AllocaDbgDeclares to SmallVector and don't leak DIFactoryVictor Hernandez2010-01-261-1/+4
| | | | llvm-svn: 94567
* In mem2reg, for all alloca/stores that get promoted where the alloca has an ↵Victor Hernandez2010-01-261-1/+52
| | | | | | associated llvm.dbg.declare instrinsic, insert an llvm.dbg.var intrinsic before each store. llvm-svn: 94493
* Revert r94260 until findDbgDeclare() is made more efficientVictor Hernandez2010-01-251-38/+3
| | | | llvm-svn: 94432
* make -fno-rtti the default unless a directory builds with REQUIRES_RTTI.Chris Lattner2010-01-241-1/+0
| | | | llvm-svn: 94378
* In mem2reg, for all alloca/stores that get promoted where the alloca has an ↵Victor Hernandez2010-01-231-3/+38
| | | | | | associated llvm.dbg.declare instrinsic, insert an llvm.dbg.var intrinsic before each store llvm-svn: 94260
* Keep ignoring pointer-to-pointer bitcastsVictor Hernandez2010-01-221-3/+0
| | | | llvm-svn: 94194
* Stop building RTTI information for *most* llvm libraries. NotableChris Lattner2010-01-221-0/+1
| | | | | | | | | | | missing ones are libsupport, libsystem and libvmcore. libvmcore is currently blocked on bugpoint, which uses EH. Once it stops using EH, we can switch it off. This #if 0's out 3 unit tests, because gtest requires RTTI information. Suggestions welcome on how to fix this. llvm-svn: 94164
* No need to look through bitcasts for DbgInfoIntrinsicVictor Hernandez2010-01-211-5/+0
| | | | llvm-svn: 94114
* DbgInfoIntrinsic no longer appear in an instruction's use listVictor Hernandez2010-01-211-19/+4
| | | | llvm-svn: 94113
* DbgInfoIntrinsics no longer appear in an instruction's use list; so clean up ↵Victor Hernandez2010-01-211-24/+0
| | | | | | looking for them in use iterations and remove OnlyUsedByDbgInfoIntrinsics() llvm-svn: 94111
OpenPOWER on IntegriCloud