summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
Commit message (Collapse)AuthorAgeFilesLines
...
* BCUI + 1 doesn't work. Use next instead.Bill Wendling2008-11-071-1/+2
| | | | llvm-svn: 58830
* Handle (delete) dbg intrinsics while promoting alloca.Devang Patel2008-11-071-3/+22
| | | | llvm-svn: 58826
* Fixed scalarizing an extract subvector and prevent an infinite loopMon P Wang2008-11-061-0/+6
| | | | | | when simplify a vector. llvm-svn: 58820
* InstructionNamer preserves everything.Devang Patel2008-11-061-0/+4
| | | | llvm-svn: 58787
* Do now allow InlineAlways pass to remove dead functions.Devang Patel2008-11-052-0/+13
| | | | llvm-svn: 58744
* Check Attribute::NoInline.Devang Patel2008-11-051-4/+2
| | | | llvm-svn: 58742
* CMake: updated list of source files.Oscar Fuentes2008-11-051-0/+1
| | | | llvm-svn: 58736
* Add a new pass to simplify specific half_powr function calls. This isDan Gohman2008-11-041-0/+159
| | | | | | a specialized pass that it not likely to be generally useful. llvm-svn: 58732
* Allow SROA of vectors. Removing this caused aDale Johannesen2008-11-041-12/+4
| | | | | | | huge performance regression in something we care about. This may not be final fix. llvm-svn: 58718
* Fix unused variable warnings.Devang Patel2008-11-031-1/+5
| | | | llvm-svn: 58651
* Ignore conditions that are outside the loop.Devang Patel2008-11-031-2/+4
| | | | llvm-svn: 58631
* add a period at the end of the comment, ignoring the fact that the comment ↵Andrew Lenharth2008-11-031-1/+1
| | | | | | would be hard pressed to be considered a sentence, but if it makes Bill happy... llvm-svn: 58630
* Turn floating point IVs into integer IVs where possible.Devang Patel2008-11-031-0/+150
| | | | | | | | This allows SCEV users to effectively calculate trip count. LSR later on transforms back integer IVs to floating point IVs later on to avoid int-to-float casts inside the loop. llvm-svn: 58625
* Ensure that we are checking only calls to the function we are interested in ↵Andrew Lenharth2008-11-031-2/+4
| | | | | | specializing llvm-svn: 58615
* Replace explicit loop with utility function.Nick Lewycky2008-11-031-4/+2
| | | | llvm-svn: 58593
* Changes from Duncan's review:Nick Lewycky2008-11-021-9/+28
| | | | | | | | * merge two weak functions by making them both alias a third non-weak fn * don't reimplement CallSite::hasArgument * whitelist the safe linkage types llvm-svn: 58568
* Get this building on 64 bit machines (error:Duncan Sands2008-11-021-5/+5
| | | | | | | cast from ‘const llvm::PointerType*’ to ‘unsigned int’ loses precision). llvm-svn: 58561
* CMake: added a source file.Oscar Fuentes2008-11-021-0/+1
| | | | llvm-svn: 58559
* Add a new MergeFunctions pass. It finds identical functions and merges them.Nick Lewycky2008-11-021-0/+358
| | | | | | | | This triggers only 60 times in llvm-test (look at .llvm.bc, not .linked.rbc) and so it probably wont be turned on by default. Also, may of those are likely to go away when PR2973 is fixed. llvm-svn: 58557
* Fix demanded bits analysis with srem by negative number. Based on a patchNick Lewycky2008-11-021-3/+3
| | | | | | by Richard Osborne. llvm-svn: 58555
* Fix this recently moved code to use the correct type. CI is now aDan Gohman2008-11-021-2/+2
| | | | | | | ConstantInt, and SI is the original cast instruction. This fixes PR2996. llvm-svn: 58549
* Fix warning.Daniel Dunbar2008-10-311-1/+1
| | | | llvm-svn: 58486
* Canonicalize sext(i1) to i1?-1:0, and update various instcombineDan Gohman2008-10-301-40/+91
| | | | | | optimizations accordingly. llvm-svn: 58457
* Add InlineCost class for represent the estimated cost of inlining aDaniel Dunbar2008-10-305-15/+43
| | | | | | | | | function. - This explicitly models the costs for functions which should "always" or "never" be inlined. This fixes bugs where such costs were not previously respected. llvm-svn: 58450
* Fix PR2967 by not deleting volatile load/stores that occur before unreachable.Chris Lattner2008-10-291-0/+11
| | | | | | | I don't really see this as being needed, but there is little harm from doing it. llvm-svn: 58385
* Factor shouldInline method out of Inliner.Daniel Dunbar2008-10-291-18/+26
| | | | | | - No functionality change. llvm-svn: 58355
* Assorted comment/naming fixes, 80-col violations, and reindentation.Daniel Dunbar2008-10-282-12/+11
| | | | | | - No functionality change. llvm-svn: 58352
* (A & sext(C)) | (B & ~sext(C) -> C ? A : BDan Gohman2008-10-281-0/+19
| | | | llvm-svn: 58351
* export an ID for the instructionNamer, allowing analysis/transformation passesTorok Edwin2008-10-271-0/+1
| | | | | | that need it to require it by ID. llvm-svn: 58238
* Rewrite all the 'PromoteLocallyUsedAlloca[s]' logic. With the power ofChris Lattner2008-10-271-175/+97
| | | | | | | | | | | | | | | | LargeBlockInfo, we can now dramatically simplify their implementation and speed them up at the same time. Now the code has time proportional to the number of uses of the alloca, not the size of the block. This also eliminates code that tried to batch up different allocas which are used in the same blocks, and eliminates the 'retry list' logic which was baroque and no unneccesary. In addition to being a speedup for crazy cases, this is also a nice cleanup: PromoteMemoryToRegister.cpp | 270 +++++++++++++++----------------------------- 1 file changed, 96 insertions(+), 174 deletions(-) llvm-svn: 58229
* Add a new LargeBlockInfo helper, which is just a wrapper aroundChris Lattner2008-10-271-57/+123
| | | | | | | | | a trivial dense map. Use this in RewriteSingleStoreAlloca to avoid aggressively rescanning blocks over and over again. This fixes PR2925, speeding up mem2reg on the testcase in that bug from 4.56s to 0.02s in a debug build on my machine. llvm-svn: 58227
* Add value range analyzing of Add and Sub.Nick Lewycky2008-10-241-9/+73
| | | | | | Understand that mul %x, 1 = %x. llvm-svn: 58069
* Change create*Pass factory functions to return Pass* instead ofDaniel Dunbar2008-10-229-9/+9
| | | | | | | | | | | LoopPass*. - Although less precise, this means they can be used in clients without RTTI (who would otherwise need to include LoopPass.h, which eventually includes things using dynamic_cast). This was the simplest solution that presented itself, but I am happy to use a better one if available. llvm-svn: 58010
* Use Function::getEntryBlock() instead of Function::front(), for clarity.Dan Gohman2008-10-211-1/+1
| | | | llvm-svn: 57870
* Fix a bug that prevented llvm-extract -delete from working.Dan Gohman2008-10-211-1/+1
| | | | llvm-svn: 57864
* Use 0 instead of false to return a null pointer.Dan Gohman2008-10-171-1/+1
| | | | llvm-svn: 57660
* Teach instcombine's visitLoad to scan back several instructionsDan Gohman2008-10-151-10/+46
| | | | | | | | | | | | | | to find opportunities for store-to-load forwarding or load CSE, in the same way that visitStore scans back to do DSE. Also, define a new helper function for testing whether the addresses of two memory accesses are known to have the same value, and use it in both visitStore and visitLoad. These two changes allow instcombine to eliminate loads in code produced by front-ends that frequently emit obviously redundant addressing for memory references. llvm-svn: 57608
* Combine (fcmp cc0 x, y) | (fcmp cc1 x, y) into a single fcmp when possible.Evan Cheng2008-10-141-1/+41
| | | | llvm-svn: 57515
* - Somehow I forgot about one / une.Evan Cheng2008-10-141-9/+21
| | | | | | | - Renumber fcmp predicates to match their icmp counterparts. - Try swapping operands to expose more optimization opportunities. llvm-svn: 57513
* Optimize anding of two fcmp into a single fcmp if the operands are the same. ↵Evan Cheng2008-10-141-3/+111
| | | | | | | | | e.g. uno && ueq -> ueq ord && olt -> olt ord && ueq -> oeq llvm-svn: 57507
* Make InstructionCombining::getBitCastOperand() recognize GEP instructions andMatthijs Kooijman2008-10-131-3/+23
| | | | | | constant expression with all zero indices as being the same as a bitcast. llvm-svn: 57442
* Fix PR2697 by rewriting the '(X / pos) op neg' logic. This also changesChris Lattner2008-10-111-10/+15
| | | | | | | | a couple other cases for clarity, but shouldn't affect correctness. Patch by Eli Friedman! llvm-svn: 57387
* Check loop exit predicate properly while eliminating one iteration loop.Devang Patel2008-10-101-13/+15
| | | | | | This patch fixes PR 2869 llvm-svn: 57369
* fix memleak by cleaning the global sets on pass exitNuno Lopes2008-10-101-11/+17
| | | | llvm-svn: 57353
* Add a "loses information" return value to APFloat::convertDale Johannesen2008-10-091-1/+3
| | | | | | | and APFloat::convertToInteger. Restore return value to IEEE754. Adjust all users accordingly. llvm-svn: 57329
* Don't drop alignment on globals when cloning.Nick Lewycky2008-10-091-5/+9
| | | | llvm-svn: 57320
* dont specialize weak functions and the likeNuno Lopes2008-10-081-1/+1
| | | | llvm-svn: 57305
* Add <cstdio> include where needed by gcc-4.4.Duncan Sands2008-10-082-0/+2
| | | | | | Patch by Samuel Tardieu. llvm-svn: 57291
* Add parentheses to avoid warnings in GCC 4.4.0,Chris Lattner2008-10-081-1/+1
| | | | | | patch by Samuel Tardieu! llvm-svn: 57288
* Correctly set attributes when removing args during cloning. Fixes PR2765Andrew Lenharth2008-10-071-1/+17
| | | | llvm-svn: 57254
OpenPOWER on IntegriCloud