summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Tidy up whitespace in ConstantRange::print output.Dan Gohman2008-05-271-1/+1
| | | | llvm-svn: 51606
* back out last commit: The .cpp file for a module should include its ↵Gabor Greif2008-05-271-0/+1
| | | | | | corresponding header first, even if redundant. llvm-svn: 51598
* Fix some constructs that gcc-4.4 warns about.Duncan Sands2008-05-276-8/+12
| | | | llvm-svn: 51591
* prune unneeded #includesGabor Greif2008-05-272-2/+0
| | | | llvm-svn: 51590
* remove unneeded reinterpret_castsGabor Greif2008-05-271-2/+2
| | | | llvm-svn: 51589
* We have the correct headers included to know that BB isa Value. No ↵Gabor Greif2008-05-271-6/+6
| | | | | | reinterpret_cast necessary. llvm-svn: 51588
* InequalityGraph::node() can create new nodes, invalidating iterators acrossNick Lewycky2008-05-271-0/+1
| | | | | | | the set of nodes. Fix makeEqual to handle this by creating the new node first then iterating across them second. llvm-svn: 51573
* Grammaro.Nick Lewycky2008-05-261-1/+1
| | | | llvm-svn: 51572
* eliminate calls to deprecated Use::init() interfaceGabor Greif2008-05-265-139/+139
| | | | llvm-svn: 51570
* Factor code to copy global value attributes likeDuncan Sands2008-05-269-42/+47
| | | | | | | | | | | | | | | the section or the visibility from one global value to another: copyAttributesFrom. This is particularly useful for duplicating functions: previously this was done by explicitly copying each attribute in turn at each place where a new function was created out of an old one, with the result that obscure attributes were regularly forgotten (like the collector or the section). Hopefully now everything is uniform and nothing is forgotten. llvm-svn: 51567
* Use a DenseMap instead of an std::map, speeding up the testcase in PR2368 by ↵Owen Anderson2008-05-261-3/+3
| | | | | | about a third. llvm-svn: 51565
* The enabling of remat in 2-address conversion breaks this test:Bill Wendling2008-05-261-23/+30
| | | | | | | | | | | | Running /Users/void/llvm/llvm.src/test/CodeGen/X86/dg.exp ... FAIL: /Users/void/llvm/llvm.src/test/CodeGen/X86/2007-11-30-LoadFolding-Bug.ll Failed with exit(1) at line 1 while running: llvm-as < /Users/void/llvm/llvm.src/test/CodeGen/X86/2007-11-30-LoadFolding-Bug.ll | llc -march=x86 -mattr=+sse2 -stats |& grep {1 .*folded into instructions} child process exited abnormally Make this conditional for now. llvm-svn: 51563
* A problem that's exposed when machine LICM is enabled. Consider this code:Bill Wendling2008-05-261-1/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | LBB1_3: # bb ... xorl %ebp, %ebp subl (%ebx), %ebp ... incl %ecx cmpl %edi, %ecx jl LBB1_3 # bb Whe using machine LICM, LLVM converts it into: xorl %esi, %esi LBB1_3: # bb ... movl %esi, %ebp subl (%ebx), %ebp ... incl %ecx cmpl %edi, %ecx jl LBB1_3 # bb Two address conversion inserts the copy instruction. However, it's cheaper to rematerialize it, and remat helps reduce register pressure. llvm-svn: 51562
* Don't treat values as signed when looking at loop steppings in HowForToNonZero.Nick Lewycky2008-05-251-2/+2
| | | | llvm-svn: 51560
* "ret (constexpr)" can't be folded into a Constant. Add a method toNick Lewycky2008-05-252-16/+55
| | | | | | | | | | Analysis/ConstantFolding to fold ConstantExpr's, then make instcombine use it to try to use targetdata to fold constant expressions on void instructions. Also extend the icmp(inttoptr, inttoptr) folding to handle the case where int size != ptr size. llvm-svn: 51559
* Create archives with the same permissions are ar.Owen Anderson2008-05-241-0/+7
| | | | | | Patch by Mikael Lepistö. llvm-svn: 51540
* Add FreeBSD/PPC support, patch by Marcel Moolenaar!Chris Lattner2008-05-241-2/+2
| | | | llvm-svn: 51538
* Fix a serious brain-o. Obviously no-one reviewed my patch :(Chris Lattner2008-05-241-2/+4
| | | | | | This fixes PR2359 llvm-svn: 51536
* Fix PR2358 by resolving calls with undef arguments to overdefined.Chris Lattner2008-05-241-0/+6
| | | | llvm-svn: 51535
* Eliminate x86.sse2.punpckh.qdq and x86.sse2.punpckl.qdq.Evan Cheng2008-05-242-14/+12
| | | | llvm-svn: 51533
* Eliminate x86.sse2.movs.d, x86.sse2.shuf.pd, x86.sse2.unpckh.pd, and ↵Evan Cheng2008-05-242-21/+43
| | | | | | x86.sse2.unpckl.pd intrinsics. These will be lowered into shuffles. llvm-svn: 51531
* Tweak how ConstantFP80Ty constants are outputDuncan Sands2008-05-241-1/+1
| | | | | | so that gcc doesn't warn about them. llvm-svn: 51529
* Put initialized const weak objects into correctDale Johannesen2008-05-241-1/+9
| | | | | | sections on ppc32 darwin. g++.dg/abi/key2.C llvm-svn: 51527
* This is done.Evan Cheng2008-05-241-46/+0
| | | | llvm-svn: 51526
* Autoupgrade x86.sse2.loadh.pd and x86.sse2.loadl.pd.Evan Cheng2008-05-241-19/+50
| | | | llvm-svn: 51523
* Remove x86.sse2.loadh.pd and x86.sse2.loadl.pd. These will be lowered into ↵Evan Cheng2008-05-241-4/+0
| | | | | | load and shuffle instructions. llvm-svn: 51522
* Remove x86.sse2.loadh.pd and x86.sse2.loadl.pd. These will be lowered into ↵Evan Cheng2008-05-241-5/+0
| | | | | | load and shuffle instructions. llvm-svn: 51521
* Revert 51440 as it breaks a bunch of PIC tests.Evan Cheng2008-05-231-3/+1
| | | | llvm-svn: 51513
* Don't silently truncate array extents to 32 bits.Dan Gohman2008-05-231-1/+1
| | | | llvm-svn: 51505
* Add a missed CommonLinkage check.Dale Johannesen2008-05-231-0/+1
| | | | llvm-svn: 51503
* Use movlps / movhps to modify low / high half of 16-byet memory location.Evan Cheng2008-05-233-62/+69
| | | | llvm-svn: 51501
* Tidy up BasicBlock::getFirstNonPHI, and change a bunch of places toDan Gohman2008-05-2315-61/+34
| | | | | | use it instead of duplicating its functionality. llvm-svn: 51499
* Add #includes to make some dependencies explicit.Dan Gohman2008-05-234-0/+4
| | | | llvm-svn: 51496
* Issue errors in several situations instead of aborting.Dan Gohman2008-05-231-7/+21
| | | | llvm-svn: 51493
* Elaborate on the entry on integer vector multiplication by constants.Dan Gohman2008-05-231-1/+6
| | | | llvm-svn: 51491
* Fix a duplicated pattern.Evan Cheng2008-05-231-2/+2
| | | | llvm-svn: 51490
* Use PMULDQ for v2i64 multiplies when SSE4.1 is available. And addDan Gohman2008-05-233-7/+13
| | | | | | load-folding table entries for PMULDQ and PMULLD. llvm-svn: 51489
* New entry.Evan Cheng2008-05-231-0/+44
| | | | llvm-svn: 51487
* Rewrite a loop to avoid using iterators pointing toDale Johannesen2008-05-231-4/+6
| | | | | | | elements that have been erased. Based on a patch by Nicolas Capens. llvm-svn: 51485
* Fix another isFirstClassType that now needs to be isSingleValueType.Dan Gohman2008-05-231-1/+1
| | | | | | This fixes recent CBE regressions. llvm-svn: 51483
* Replace some weird usage of UserOp1 introduced in r49492 by a plain if.Matthijs Kooijman2008-05-231-1/+3
| | | | llvm-svn: 51482
* Restucture a part of the SimplifyCFG pass and include a testcase.Matthijs Kooijman2008-05-231-65/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The SimplifyCFG pass looks at basic blocks that contain only phi nodes, followed by an unconditional branch. In a lot of cases, such a block (BB) can be merged into their successor (Succ). This merging is performed by TryToSimplifyUncondBranchFromEmptyBlock. It does this by taking all phi nodes in the succesor block Succ and expanding them to include the predecessors of BB. Furthermore, any phi nodes in BB are moved to Succ and expanded to include the predecessors of Succ as well. Before attempting this merge, CanPropagatePredecessorsForPHIs checks to see if all phi nodes can be properly merged. All functional changes are made to this function, only comments were updated in TryToSimplifyUncondBranchFromEmptyBlock. In the original code, CanPropagatePredecessorsForPHIs looks quite convoluted and more like stack of checks added to handle different kinds of situations than a comprehensive check. In particular the first check in the function did some value checking for the case that BB and Succ have a common predecessor, while the last check in the function simply rejected all cases where BB and Succ have a common predecessor. The first check was still useful in the case that BB did not contain any phi nodes at all, though, so it was not completely useless. Now, CanPropagatePredecessorsForPHIs is restructured to to look a lot more similar to the code that actually performs the merge. Both functions now look at the same phi nodes in about the same order. Any conflicts (phi nodes with different values for the same source) that could arise from merging or moving phi nodes are detected. If no conflicts are found, the merge can happen. Apart from only restructuring the checks, two main changes in functionality happened. Firstly, the old code rejected blocks with common predecessors in most cases. The new code performs some extra checks so common predecessors can be handled in a lot of cases. Wherever common predecessors still pose problems, the blocks are left untouched. Secondly, the old code rejected the merge when values (phi nodes) from BB were used in any other place than Succ. However, it does not seem that there is any situation that would require this check. Even more, this can be proven. Consider that BB is a block containing of a single phi node "%a" and a branch to Succ. Now, since the definition of %a will dominate all of its uses, BB will dominate all blocks that use %a. Furthermore, since the branch from BB to Succ is unconditional, Succ will also dominate all uses of %a. Now, assume that one predecessor of Succ is not dominated by BB (and thus not dominated by Succ). Since at least one use of %a (but in reality all of them) is reachable from Succ, you could end up at a use of %a without passing through it's definition in BB (by coming from X through Succ). This is a contradiction, meaning that our original assumption is wrong. Thus, all predecessors of Succ must also be dominated by BB (and thus also by Succ). This means that moving the phi node %a from BB to Succ does not pose any problems when the two blocks are merged, and any use checks are not needed. llvm-svn: 51478
* Indent fix.Matthijs Kooijman2008-05-231-2/+2
| | | | llvm-svn: 51477
* Constant integer vectors may also be negated.Nick Lewycky2008-05-231-0/+5
| | | | llvm-svn: 51476
* Typo.Nick Lewycky2008-05-231-1/+1
| | | | llvm-svn: 51475
* Revert X + X --> X * 2 optz'n which pessimizes heavily on x86.Nick Lewycky2008-05-231-13/+5
| | | | llvm-svn: 51474
* we compile multiply-by-constant into horrible code. Doesn't sse4 have someChris Lattner2008-05-231-0/+38
| | | | | | instruction for doing this? llvm-svn: 51473
* Implement X + X for vectors.Nick Lewycky2008-05-231-5/+13
| | | | llvm-svn: 51472
* Fix a recently added optimization to not crash on vectors.Nick Lewycky2008-05-231-2/+10
| | | | llvm-svn: 51471
* Generalize the new code in instcombine's ComputeNumSignBits for handlingDan Gohman2008-05-232-51/+22
| | | | | | | and/or to handle more cases (such as this add-sitofp.ll testcase), and port it to selectiondag's ComputeNumSignBits. llvm-svn: 51469
OpenPOWER on IntegriCloud