summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Enhance earlycse to do CSE of casts, instsimplify and die.Chris Lattner2011-01-021-4/+141
| | | | | | Add a testcase. llvm-svn: 122715
* split dom frontier handling stuff out to its own DominanceFrontier header,Chris Lattner2011-01-0221-35/+32
| | | | | | so that Dominators.h is *just* domtree. Also prune #includes a bit. llvm-svn: 122714
* sketch out a new early cse pass. No functionality yet.Chris Lattner2011-01-022-0/+63
| | | | llvm-svn: 122713
* fix a miscompilation of tramp3d-v4: when forming a memcpy, we have to makeChris Lattner2011-01-021-12/+23
| | | | | | | | sure that the loop we're promoting into a memcpy doesn't mutate the input of the memcpy. Before we were just checking that the dest of the memcpy wasn't mod/ref'd by the loop. llvm-svn: 122712
* If a loop iterates exactly once (has backedge count = 0) then don'tChris Lattner2011-01-021-0/+6
| | | | | | | mess with it. We'd rather peel/unroll it than convert all of its stores into memsets. llvm-svn: 122711
* Try to reuse the value when lowering memset.Benjamin Kramer2011-01-022-47/+21
| | | | | | | | | | This allows us to compile: void test(char *s, int a) { __builtin_memset(s, a, 15); } into 1 mul + 3 stores instead of 3 muls + 3 stores. llvm-svn: 122710
* Lower the i8 extension in memset to a multiply instead of a potentially long ↵Benjamin Kramer2011-01-021-15/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | series of shifts and ors. We could implement a DAGCombine to turn x * 0x0101 back into logic operations on targets that doesn't support the multiply or it is slow (p4) if someone cares enough. Example code: void test(char *s, int a) { __builtin_memset(s, a, 4); } before: _test: ## @test movzbl 8(%esp), %eax movl %eax, %ecx shll $8, %ecx orl %eax, %ecx movl %ecx, %eax shll $16, %eax orl %ecx, %eax movl 4(%esp), %ecx movl %eax, 4(%ecx) movl %eax, (%ecx) ret after: _test: ## @test movzbl 8(%esp), %eax imull $16843009, %eax, %eax ## imm = 0x1010101 movl 4(%esp), %ecx movl %eax, 4(%ecx) movl %eax, (%ecx) ret llvm-svn: 122707
* A workaround for a bug in cmake 2.8.3 diagnosed on PR 8885.Oscar Fuentes2011-01-021-0/+5
| | | | llvm-svn: 122706
* Also remove functions that use complex constant expressions in terms ofNick Lewycky2011-01-021-5/+18
| | | | | | another function. llvm-svn: 122705
* enhance loop idiom recognition to scan *all* unconditionally executedChris Lattner2011-01-021-8/+39
| | | | | | | blocks in a loop, instead of just the header block. This makes it more aggressive, able to handle Duncan's Ada examples. llvm-svn: 122704
* make inSubLoop much more efficient.Chris Lattner2011-01-021-4/+1
| | | | llvm-svn: 122703
* rip out isExitBlockDominatedByBlockInLoop, calling DomTree::dominates instead.Chris Lattner2011-01-021-37/+4
| | | | | | | | isExitBlockDominatedByBlockInLoop is a relic of the days when domtree was *just* a tree and didn't have DFS numbers. Checking DFS numbers is faster and easier than "limiting the search of the tree". llvm-svn: 122702
* add a list of opportunities for future improvement.Chris Lattner2011-01-021-1/+22
| | | | llvm-svn: 122701
* update a bunch of entries.Chris Lattner2011-01-022-137/+56
| | | | llvm-svn: 122700
* Fix PR8702 by not having LoopSimplify claim to preserve LCSSA form. As ↵Duncan Sands2011-01-021-15/+12
| | | | | | | | | | described in the PR, the pass could break LCSSA form when inserting preheaders. It probably would be easy enough to fix this, but since currently we always go into LCSSA form after running this pass, doing so is not urgent. llvm-svn: 122695
* Allow loop-idiom to run on multiple BB loops, but still only scan the loop Chris Lattner2011-01-022-13/+5
| | | | | | | | | | | | | | | | | | header for now for memset/memcpy opportunities. It turns out that loop-rotate is successfully rotating loops, but *DOESN'T MERGE THE BLOCKS*, turning "for loops" into 2 basic block loops that loop-idiom was ignoring. With this fix, we form many *many* more memcpy and memsets than before, including on the "history" loops in the viterbi benchmark, which look like this: for (j=0; j<MAX_history; ++j) { history_new[i][j+1] = history[2*i][j]; } Transforming these loops into memcpy's speeds up the viterbi benchmark from 11.98s to 3.55s on my machine. Woo. llvm-svn: 122685
* remove debugging code.Chris Lattner2011-01-021-4/+0
| | | | llvm-svn: 122683
* add some -stats output.Chris Lattner2011-01-021-1/+10
| | | | llvm-svn: 122682
* improve loop rotation to use CodeMetrics to analyze theChris Lattner2011-01-022-17/+8
| | | | | | | size of a loop header instead of its own code size estimator. This allows it to handle bitcasts etc more precisely. llvm-svn: 122681
* teach loop idiom recognition to form memcpy's from simple loops.Chris Lattner2011-01-021-22/+102
| | | | llvm-svn: 122678
* Remove functions from the FnSet when one of their callee's is being merged. ThisNick Lewycky2011-01-021-82/+66
| | | | | | | | | | | maintains the guarantee that the DenseSet expects two elements it contains to not go from inequal to equal under its nose. As a side-effect, this also lets us switch from iterating to a fixed-point to actually maintaining a work queue of functions to look at again, and we don't add thunks to our work queue so we don't need to detect and ignore them. llvm-svn: 122677
* a missed __builtin_object_size case.Chris Lattner2011-01-011-0/+17
| | | | llvm-svn: 122676
* various updates.Chris Lattner2011-01-011-31/+29
| | | | llvm-svn: 122675
* fix a globalopt crash on two Adobe-C++ testcases that the recentChris Lattner2011-01-011-0/+5
| | | | | | loop idiom pass exposed. llvm-svn: 122674
* Add support for the 'H' modifier.Rafael Espindola2011-01-011-0/+6
| | | | llvm-svn: 122667
* Model operand restrictions of mul-like instructions on ARMv5 viaAnton Korobeynikov2011-01-014-10/+100
| | | | | | | | | earlyclobber stuff. This should fix PRs 2313 and 8157. Unfortunately, no testcase, since it'd be dependent on register assignments. llvm-svn: 122663
* add a validity check that was missed, fixing a crash on theChris Lattner2011-01-011-0/+5
| | | | | | new testcase. llvm-svn: 122662
* Revert commit 122654 at the request of Chris, who reckons that instsimplifyDuncan Sands2011-01-012-124/+63
| | | | | | is the wrong hammer for this nail, and is probably right. llvm-svn: 122661
* improve validity check to handle constant-trip-count loops moreChris Lattner2011-01-011-7/+17
| | | | | | | aggressively. In practice, this doesn't help anything though, see the todo. llvm-svn: 122660
* implement the "no aliasing accesses in loop" safety check. This passChris Lattner2011-01-011-5/+32
| | | | | | should be correct now. llvm-svn: 122659
* Fix PR8878.Rafael Espindola2011-01-011-0/+1
| | | | llvm-svn: 122658
* Fix a README item by having InstructionSimplify do a mild form of valueDuncan Sands2011-01-012-63/+124
| | | | | | | | | | | numbering, in which it considers (for example) "%a = add i32 %x, %y" and "%b = add i32 %x, %y" to be equal because the operands are equal and the result of the instructions only depends on the values of the operands. This has almost no effect (it removes 4 instructions from gcc-as-one-file), and perhaps slows down compilation: I measured a 0.4% slowdown on the large gcc-as-one-file testcase, but it wasn't statistically significant. llvm-svn: 122654
* ptx: remove reg-reg addressing mode and st.constChe-Liang Chiou2011-01-012-29/+11
| | | | llvm-svn: 122653
* ptx: add store instructionChe-Liang Chiou2011-01-014-4/+101
| | | | llvm-svn: 122652
* Add to the list of cmake files the object file, not the asm file. ThisOscar Fuentes2010-12-311-1/+1
| | | | | | | is necessary for executing the custom command that runs the assember. Fixes PR8877. llvm-svn: 122649
* Simplify this pass by using a depth-first iterator to ensure that allDuncan Sands2010-12-311-39/+20
| | | | | | operands are visited before the instructions themselves. llvm-svn: 122647
* Zap dead instructions harder.Duncan Sands2010-12-311-7/+2
| | | | llvm-svn: 122645
* Make a bunch of symbols internal.Benjamin Kramer2010-12-302-19/+19
| | | | llvm-svn: 122642
* Add another non-commutable instruction that gas accepts commuted forms for.Nick Lewycky2010-12-301-3/+4
| | | | | | Fixes PR8861. llvm-svn: 122641
* ptx: add state spacesChe-Liang Chiou2010-12-303-8/+63
| | | | llvm-svn: 122638
* include the module identifier when emitting this warning, PR8865.Chris Lattner2010-12-301-4/+7
| | | | llvm-svn: 122637
* print the right string, thanks for Frits for noticing.Chris Lattner2010-12-301-1/+1
| | | | llvm-svn: 122636
* Use getVRegDef() instead of def_iterator. This leads to fewer defs being addedCameron Zwarich2010-12-301-4/+3
| | | | | | | with 2-address instructions, for about a 3.5% speedup of StrongPHIElimination on 403.gcc. llvm-svn: 122635
* improve warning message to at least say what the triples are.Chris Lattner2010-12-291-1/+3
| | | | llvm-svn: 122632
* Fix stack layout error in MBlaze backend.Wesley Peck2010-12-292-37/+98
| | | | llvm-svn: 122631
* MC/Mach-O/Thumb: Set the thumb bit in the symbol table.Daniel Dunbar2010-12-291-2/+6
| | | | llvm-svn: 122630
* None of the other pass names in CodeGen have terminating periods.Cameron Zwarich2010-12-291-2/+2
| | | | llvm-svn: 122628
* Instead of processing every instruction when splitting interferences, onlyCameron Zwarich2010-12-291-27/+61
| | | | | | | process those instructions that define phi sources. This is a 47% speedup of StrongPHIElimination compile time on 403.gcc. llvm-svn: 122627
* SPARC backend fix: correctly passing arguments through stackVenkatraman Govindaraju2010-12-291-23/+51
| | | | llvm-svn: 122626
* Add a missing word to a comment.Cameron Zwarich2010-12-291-1/+1
| | | | llvm-svn: 122625
OpenPOWER on IntegriCloud