summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Make invokes of inline asm legal. Teach codegenDuncan Sands2007-12-171-3/+2
| | | | | | | | how to lower them (with no attempt made to be efficient, since they should only occur for unoptimized code). llvm-svn: 45108
* GLIBCXX_DEBUG fix. std::vector<>::end() is invalidated by erase.David Greene2007-12-171-1/+1
| | | | llvm-svn: 45101
* Change the PointerType api for creating pointer types. The old functionality ↵Christopher Lamb2007-12-174-11/+13
| | | | | | of PointerType::get() has become PointerType::getUnqual(), which returns a pointer in the generic address space. The new prototype of PointerType::get() requires both a type and an address space. llvm-svn: 45082
* Revert this part of r45073 until the verifier isDuncan Sands2007-12-161-2/+3
| | | | | | changed not to reject invoke of inline asm. llvm-svn: 45077
* Make instcombine promote inline asm calls to 'nounwind'Duncan Sands2007-12-161-3/+2
| | | | | | | | | | | | | calls. Remove special casing of inline asm from the inliner. There is a potential problem: the verifier rejects invokes of inline asm (not sure why). If an asm call is not marked "nounwind" in some .ll, and instcombine is not run, but the inliner is run, then an illegal module will be created. This is bad but I'm not sure what the best approach is. I'm tempted to remove the check in the verifier... llvm-svn: 45073
* Fix PR1850 by removing an unsafe transformation from VMCore/ConstantFold.cpp.Chris Lattner2007-12-101-1/+7
| | | | | | | | Reimplement the xform in Analysis/ConstantFolding.cpp where we can use targetdata to validate that it is safe. While I'm in there, fix some const correctness issues and generalize the interface to the "operand folder". llvm-svn: 44817
* Adding a collector name attribute to Function in the IR. These Gordon Henriksen2007-12-101-0/+2
| | | | | | | | | | | | | | | | | | | | methods are new to Function: bool hasCollector() const; const std::string &getCollector() const; void setCollector(const std::string &); void clearCollector(); The assembly representation is as such: define void @f() gc "shadow-stack" { ... The implementation uses an on-the-side table to map Functions to collector names, such that there is no overhead. A StringPool is further used to unique collector names, which are extremely likely to be unique per process. llvm-svn: 44769
* Rather than having special rules like "intrinsics cannotDuncan Sands2007-12-031-5/+3
| | | | | | | | | throw exceptions", just mark intrinsics with the nounwind attribute. Likewise, mark intrinsics as readnone/readonly and get rid of special aliasing logic (which didn't use anything more than this anyway). llvm-svn: 44544
* Fix PR1146: parameter attributes are longer part ofDuncan Sands2007-11-275-4/+11
| | | | | | | | | | | | the function type, instead they belong to functions and function calls. This is an updated and slightly corrected version of Reid Spencer's original patch. The only known problem is that auto-upgrading of bitcode files doesn't seem to work properly (see test/Bitcode/AutoUpgradeIntrinsics.ll). Hopefully a bitcode guru (who might that be? :) ) will fix it. llvm-svn: 44359
OpenPOWER on IntegriCloud