summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
Commit message (Collapse)AuthorAgeFilesLines
* When considering whether to inline Callee into Caller,Dale Johannesen2009-10-091-6/+70
| | | | | | | | | and that will make Caller too big to inline, see if it might be better to inline Caller into its callers instead. This situation is described in PR 2973, although I haven't tried the specific case in SPASS. llvm-svn: 83602
* Add a form of addPreserved which takes a string argument, to allow passesDan Gohman2009-10-081-4/+4
| | | | | | | | to declare that they preserve other passes without needing to pull in additional header file or library dependencies. Convert MachineFunctionPass and CodeGenLICM to make use of this. llvm-svn: 83555
* In instcombine's debug output, avoid printing ADD for instructions that areJeffrey Yasskin2009-10-081-3/+5
| | | | | | | already on the worklist, and print Visited when an instruction is about to be visited. Net, on one input, this reduced the output size by at least 9x. llvm-svn: 83510
* 80-column and whitespace fixes.Eric Christopher2009-10-071-135/+156
| | | | llvm-svn: 83489
* Add FreeInst to the "is a call" check for Insts that are calls, butEric Christopher2009-10-071-2/+2
| | | | | | not intrinsics. llvm-svn: 83441
* While we still have a MallocInst treat it as a call like any otherEric Christopher2009-10-071-0/+4
| | | | | | | | | for inlining. When MallocInst goes away this code will be subsumed as part of calls and work just fine... llvm-svn: 83434
* Update CMake file.Ted Kremenek2009-10-061-1/+0
| | | | llvm-svn: 83404
* remove predicate simplifier, it never got the last bugs beatenChris Lattner2009-10-061-2704/+0
| | | | | | | out of it, and jump threading, condprop and gvn are now getting most of the benefit. This was approved by Nicholas and Nicolas. llvm-svn: 83390
* Introduce and use convenience methods for getting pointer typesDuncan Sands2009-10-0610-38/+38
| | | | | | | where the element is of a basic builtin type. For example, to get an i8* use getInt8PtrTy. llvm-svn: 83379
* Remove an unnnecessary LLVMContext argument inDan Gohman2009-10-054-11/+7
| | | | | | ConstantFoldLoadThroughGEPConstantExpr. llvm-svn: 83311
* Use Use::operator= instead of Use::set, for consistency.Dan Gohman2009-10-051-2/+2
| | | | llvm-svn: 83310
* strength reduce a ton of type equality tests to check the typeid (ThroughChris Lattner2009-10-054-23/+24
| | | | | | | | the new predicates I added) instead of going through a context and doing a pointer comparison. Besides being cheaper, this allows a smart compiler to turn the if sequence into a switch. llvm-svn: 83297
* instcombine shouldn't delete all null checks for mallocs.Chris Lattner2009-10-051-2/+2
| | | | | | This fixes PR5130. llvm-svn: 83290
* Do away with the strange use of BitVectors in SSI, and just use normal sets. ↵Owen Anderson2009-10-041-116/+90
| | | | | | This makes the code much more C++/LLVM-ish. llvm-svn: 83286
* Fix a typo in the comment.Owen Anderson2009-10-041-1/+1
| | | | llvm-svn: 83283
* SSI needs to require DT and DF transitively, since it uses them outside of ↵Owen Anderson2009-10-041-3/+3
| | | | | | | | its runOnFunction. Similarly, it can be marked setPreservesAll, since it does no work in its runOnFunction. llvm-svn: 83282
* Allow -inline-threshold override default threshold even if compiling to ↵Evan Cheng2009-10-041-0/+1
| | | | | | optimize for size. llvm-svn: 83274
* Remove GVNPRE.cpp from the CMake makefileDouglas Gregor2009-10-011-1/+0
| | | | llvm-svn: 83194
* remove the GVNPRE pass. It has been subsumed by the GVN pass.Chris Lattner2009-10-011-1893/+0
| | | | | | Ok'd by Owen. llvm-svn: 83193
* Fix this code so that it doesn't try to iterate through a std::vectorDan Gohman2009-09-301-3/+4
| | | | | | | while calling changeImmediateDominator, which removes elements from the vector. This fixes PR5097. llvm-svn: 83166
* Remove a redundant #ifndef and add an assertion string.Dan Gohman2009-09-281-3/+1
| | | | llvm-svn: 82991
* Convert LoopSimplify and LoopExtractor from FunctionPass to LoopPass.Dan Gohman2009-09-282-146/+89
| | | | llvm-svn: 82990
* The select instruction is not neccesarily in the same block as theChris Lattner2009-09-281-2/+3
| | | | | | | | phi nodes. Make sure to phi translate from the right block. This fixes a llvm-building-llvm failure on GVN-PRE.cpp llvm-svn: 82970
* simplify some code.Chris Lattner2009-09-271-2/+2
| | | | llvm-svn: 82936
* The bitcast case is not needed here: instcombine turns icmp(bitcast(x), ↵Chris Lattner2009-09-271-24/+7
| | | | | | null) -> icmp(x, null) already. llvm-svn: 82935
* calls are already unmovable, malloc doesn't need a special case.Chris Lattner2009-09-271-2/+1
| | | | llvm-svn: 82933
* calls to external functions are already marked overdefined, special casingChris Lattner2009-09-271-5/+1
| | | | | | malloc isn't needed. llvm-svn: 82932
* calls are already handled, malloc doesn't need a special case.Chris Lattner2009-09-271-3/+1
| | | | llvm-svn: 82931
* calls are rejected above, no need to special case malloc here.Chris Lattner2009-09-271-3/+2
| | | | llvm-svn: 82929
* remove special handling of bitcast(malloc), it will be handledChris Lattner2009-09-271-5/+4
| | | | | | when the loop inspects the bitcast operand. llvm-svn: 82928
* unlike the malloc instruction, "malloc" calls do not claim to be readonly, ↵Chris Lattner2009-09-271-1/+1
| | | | | | just nounwind. llvm-svn: 82927
* allow pushing icmps through phis with multiple uses and across critical edges.Chris Lattner2009-09-271-8/+23
| | | | | | These are important to push up to encourage jump threading. This shrinks 176.gcc a bit. llvm-svn: 82923
* Enhance the previous fix for PR4895 to allow more values than justChris Lattner2009-09-271-13/+26
| | | | | | | simple constants for the true/false value of the select. We now do phi translation etc. This really fixes PR4895 :) llvm-svn: 82917
* implement PR4895, by making FoldOpIntoPhi handle select conditionsChris Lattner2009-09-271-11/+42
| | | | | | | | | | that are phi nodes. Also tighten up FoldOpIntoPhi to treat constantexpr operands to phis just like other variables, avoiding moving constantexpr computations around. Patch by Daniel Dunbar. llvm-svn: 82913
* Grab an LLVM Context from an instruction that exists rather than oneDan Gohman2009-09-271-1/+1
| | | | | | that is deleted in some situations. This fixes a use-after-free. llvm-svn: 82903
* Tell ScalarEvolution to forget everything it knows about a loop beforeDan Gohman2009-09-271-0/+5
| | | | | | rotating the loop, since loop rotation is a very significant change. llvm-svn: 82901
* Instruction::clone does not need to take an LLVMContext&. Remove that andNick Lewycky2009-09-2712-26/+19
| | | | | | update all the callers. llvm-svn: 82889
* Fix SimplifyLibCalls to transfer attributes from callees rather thanDan Gohman2009-09-261-4/+7
| | | | | | | calls, since direct calls don't always reflect the attributes of their callees. llvm-svn: 82867
* Rename ConstantFP's getInf to getInfinity.Dan Gohman2009-09-251-2/+2
| | | | llvm-svn: 82823
* Transform pow(x, 0.5) to (x == -inf ? inf : fabs(sqrt(x))), which isDan Gohman2009-09-251-15/+19
| | | | | | typically faster then doing a general pow. llvm-svn: 82819
* Constant propagating byval pointer is safe if function is readonly.Torok Edwin2009-09-242-3/+3
| | | | llvm-svn: 82700
* Don't constant propagate byval pointers, since they are not really pointers, butTorok Edwin2009-09-242-1/+6
| | | | | | | rather structs passed by value. This fixes PR5038. llvm-svn: 82689
* A minor improvment in accuracy to inline costDale Johannesen2009-09-231-6/+14
| | | | | | computation, and some cosmetics. llvm-svn: 82660
* tidy upChris Lattner2009-09-211-7/+8
| | | | llvm-svn: 82488
* big endian systems shift by bits too, hopefully this will fix the ppc Chris Lattner2009-09-211-1/+1
| | | | | | bootstrap problems. llvm-svn: 82464
* Nick pointed out that DominanceFrontier and DominanceTree are preservedDan Gohman2009-09-211-2/+0
| | | | | | by setPreservesCFG(). llvm-svn: 82463
* Remove the special-case for constants in PHI nodes; it's not reallyDan Gohman2009-09-211-3/+0
| | | | | | | helpful, and it didn't correctly handle the case of constants input to PHIs for backedges. llvm-svn: 82462
* fix PR5016, a crash I introduced in GVN handing first classChris Lattner2009-09-211-10/+38
| | | | | | arrays and structs, which cannot be bitcast to integers. llvm-svn: 82460
* enable non-local analysis and PRE of large store -> little load.Chris Lattner2009-09-211-30/+66
| | | | | | | This doesn't kick in too much because of phi translation issues, but this can be resolved in the future. llvm-svn: 82447
* convert an std::pair to an explicit struct.Chris Lattner2009-09-211-17/+32
| | | | llvm-svn: 82446
OpenPOWER on IntegriCloud