summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils
Commit message (Collapse)AuthorAgeFilesLines
* VisualStudio project files updated. #include <algorithm> added to make ↵Chuck Rose III2008-04-151-0/+15
| | | | | | VisualStudio happy. Also had to undefine setjmp because of #include <csetjmp> turning setjmp into _setjmp in VisualStudio. llvm-svn: 49743
* Revert r49614. As Dan pointed out, some of these aren't correct.Owen Anderson2008-04-141-1/+1
| | | | llvm-svn: 49657
* Replace calls of the form V1->setName(V2->getName()) with V1->takeName(V2), Owen Anderson2008-04-131-1/+1
| | | | | | which is significantly more efficient. llvm-svn: 49614
* Fix insert point handling for multiple return values.Devang Patel2008-04-081-4/+12
| | | | llvm-svn: 49367
* The "stacksave is not nounwind problem" no longerDuncan Sands2008-04-071-8/+3
| | | | | | | | | needs to be fixed here - a previous commit made sure that intrinsics always get the right attributes. So remove no-longer needed code, and while there use Intrinsic::getDeclaration rather than getOrInsertFunction. llvm-svn: 49337
* Use Intrinsic::getDeclaration to get hold ofDuncan Sands2008-04-071-7/+8
| | | | | | | intrinsics. Fix up the argument type (should be i8*, was an array*). llvm-svn: 49336
* Mark calls to llvm.stacksave, llvm.stackrestore asDale Johannesen2008-04-071-1/+4
| | | | | | | | nounwind. When such calls are inlined into something else that is invoked, they were getting changed to invokes, which is badness. llvm-svn: 49299
* API changes for class Use size reduction, wave 1.Gabor Greif2008-04-0615-159/+159
| | | | | | | | Specifically, introduction of XXX::Create methods for Users that have a potentially variable number of Uses. llvm-svn: 49277
* 1. Drop default inline threshold back down to 200.Evan Cheng2008-04-011-8/+13
| | | | | | | 2. Do not use # of basic blocks as part of the cost computation since it doesn't really figure into function size. 3. More aggressively inline function with vector code. llvm-svn: 49061
* Revert 49006 for the moment.Dale Johannesen2008-04-011-9/+0
| | | | llvm-svn: 49046
* Emit exception handling info for functions which areDale Johannesen2008-03-311-0/+9
| | | | | | | | | | | not marked nounwind, or for all functions when -enable-eh is set, provided the target supports Dwarf EH. llvm-gcc generates nounwind in the right places; other FEs will need to do so also. Given such a FE, -enable-eh should no longer be needed. llvm-svn: 49006
* Increasing the inline limit from (overly conservative) 200 to 300. Given ↵Evan Cheng2008-03-241-5/+29
| | | | | | | | each BB costs 20 and each instruction costs 5, 200 means a 4 BB function + 24 instructions (actually less because caller's size also contributes to it). Furthermore, double the limit when more than 10% of the callee instructions are vector instructions. Multimedia kernels tend to love inlining. llvm-svn: 48725
* Preserve calling convention during function cloningAnton Korobeynikov2008-03-231-0/+3
| | | | llvm-svn: 48708
* 80 col violation.Evan Cheng2008-03-201-1/+2
| | | | llvm-svn: 48573
* Update -mem2reg to use succ_iterator instead of iterating across TerminatorInstNick Lewycky2008-03-131-13/+10
| | | | | | successors. This makes it support nounwind. llvm-svn: 48320
* Check to see if a two-entry PHI block can be simplifiedDan Gohman2008-03-111-6/+6
| | | | | | | | before trying to merge the block into its predecessors. This allows two-entry-phi-return.ll to be simplified into a single basic block. llvm-svn: 48252
* Restore optimization that merges blocks when inline function Devang Patel2008-03-101-6/+24
| | | | | | has single return value. llvm-svn: 48162
* SimplifyDevang Patel2008-03-101-18/+15
| | | | llvm-svn: 48161
* simplifyDevang Patel2008-03-101-2/+4
| | | | llvm-svn: 48160
* Turn unwind_to into "unwinds to".Nick Lewycky2008-03-103-3/+3
| | | | llvm-svn: 48123
* Firstly, having a BranchInst isn't exclusive with having an unwind_to.Nick Lewycky2008-03-091-5/+8
| | | | | | | Secondly, we have to check whether the branch is actually pointing to the block with the unwind in it. We could have gotten here because of the unwind_to alone. llvm-svn: 48099
* A BB that unwind_to an "unwind" inst is that same as one that doesn't unwind_toNick Lewycky2008-03-091-1/+4
| | | | | | at all. llvm-svn: 48096
* Update the block cloner which fixes bugpoint on code using unwind_to (phew!)Nick Lewycky2008-03-094-8/+29
| | | | | | and also update the cloning interface's major user, the loop optimizations. llvm-svn: 48088
* Update the inliner and simplifycfg to handle unwind_to.Nick Lewycky2008-03-092-1/+22
| | | | llvm-svn: 48086
* Two things. Preserve the unwind_to when splitting a BB.Nick Lewycky2008-03-091-0/+1
| | | | | | | 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
* Update inliner to handle functions that return multiple values.Devang Patel2008-03-071-43/+52
| | | | llvm-svn: 48020
* Handle 'ret' with multiple values.Devang Patel2008-03-051-11/+23
| | | | llvm-svn: 47965
* Skip functions that return multiple values.Devang Patel2008-03-051-0/+5
| | | | llvm-svn: 47924
* Use while loop.Devang Patel2008-03-041-3/+2
| | | | llvm-svn: 47909
* Use cast instead of dyn_cast.Devang Patel2008-03-041-2/+1
| | | | | | Update test to use multiple return value directly, instead of relying on -sretpromotion. llvm-svn: 47907
* Handle multiple return values.Devang Patel2008-03-041-3/+15
| | | | llvm-svn: 47904
* Fix newly-introduced 4.3 warningsAnton Korobeynikov2008-02-201-1/+1
| | | | llvm-svn: 47375
* Make Transforms to be 4.3 warnings-cleanAnton Korobeynikov2008-02-202-7/+12
| | | | llvm-svn: 47371
* remove the LowerSelect pass. The last client was the old Sparc backend, ↵Chris Lattner2008-02-196-110/+0
| | | | | | which is long dead by now. llvm-svn: 47323
* switch simplifycfg from using vectors for most things to smallvectors,Chris Lattner2008-02-181-14/+12
| | | | | | this speeds it up 2.3% on eon. llvm-svn: 47261
* Fix PR2029Chris Lattner2008-02-141-0/+11
| | | | llvm-svn: 47129
* Make RenamePass faster by making the 'is this a new phi node'Chris Lattner2008-02-051-11/+11
| | | | | | | | check more intelligent. This speeds up mem2reg from 5.29s to 0.79s on a synthetic testcase with tons of predecessors and phi nodes. llvm-svn: 46767
* Revert r46393: readonly/readnone functions are noDuncan Sands2008-01-271-9/+6
| | | | | | longer allowed to write through byval arguments. llvm-svn: 46416
* Create an explicit copy for byval parameters evenDuncan Sands2008-01-261-6/+9
| | | | | | when inlining a readonly function. llvm-svn: 46393
* Do this more neatly.Duncan Sands2008-01-251-2/+1
| | | | llvm-svn: 46369
* we don't have to make an explicit copy of a byval argument when Chris Lattner2008-01-121-4/+6
| | | | | | | inlining a function if we know that the function does not write to *any* memory. This implements test/Transforms/Inline/byval2.ll llvm-svn: 45912
* When inlining a functino with a byval argument, make an explicit Chris Lattner2008-01-111-6/+57
| | | | | | copy of it in case the callee modifies the struct. llvm-svn: 45853
* don't hoist FP additions into unconditional adds + selects. This Chris Lattner2008-01-031-0/+2
| | | | | | | could theoretically introduce a trap, but is also a performance issue. This speeds up ptrdist/ks by 8%. llvm-svn: 45533
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-2923-46/+46
| | | | llvm-svn: 45418
* remove attribution from lib Makefiles.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45415
* dead calls to llvm.stacksave can be deleted, even though theyChris Lattner2007-12-291-1/+10
| | | | | | have potential side-effects. llvm-svn: 45392
* GC poses hazards to the inliner. Consider:Gordon Henriksen2007-12-251-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | define void @f() { ... call i32 @g() ... } define void @g() { ... } The hazards are: - @f and @g have GC, but they differ GC. Inlining is invalid. This may never occur. - @f has no GC, but @g does. g's GC must be propagated to @f. The other scenarios are safe: - @f and @g have the same GC. - @f and @g have no GC. - @g has no GC. This patch adds inliner checks for the former two scenarios. llvm-svn: 45351
* If succ has succ itself as one of the predecessors then doDevang Patel2007-12-221-2/+2
| | | | | | | not merge current bb and succ even if bb's terminator is unconditional branch to succ. llvm-svn: 45305
* When inlining through an 'nounwind' call, mark inlinedDuncan Sands2007-12-191-5/+27
| | | | | | | | | calls 'nounwind'. It is important for correct C++ exception handling that nounwind markings do not get lost, so this transformation is actually needed for correctness. llvm-svn: 45218
* Rename isNoReturn to doesNotReturn, and isNoUnwind toDuncan Sands2007-12-181-1/+1
| | | | | | doesNotThrow. llvm-svn: 45160
OpenPOWER on IntegriCloud