summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* Add sub/mul overflow intrinsics. This currently doesn't have aBill Wendling2008-12-0910-91/+233
| | | | | | | target-independent way of determining overflow on multiplication. It's very tricky. Patch by Zoltan Varga! llvm-svn: 60800
* Teach GVN to invalidate some memdep information when it does an RAUWChris Lattner2008-12-092-1/+33
| | | | | | | | | | | | | | | | | | | | | | | | of a pointer. This allows is to catch more equivalencies. For example, the type_lists_compatible_p function used to require two iterations of the gvn pass (!) to delete its 18 redundant loads because the first pass would CSE all the addressing computation cruft, which would unblock the second memdep/gvn passes from recognizing them. This change allows memdep/gvn to catch all 18 when run just once on the function (as is typical :) instead of just 3. On all of 403.gcc, this bumps up the # reundandancies found from: 63 gvn - Number of instructions PRE'd 153991 gvn - Number of instructions deleted 50069 gvn - Number of loads deleted to: 63 gvn - Number of instructions PRE'd 154137 gvn - Number of instructions deleted 50185 gvn - Number of loads deleted +120 loads deleted isn't bad. llvm-svn: 60799
* Fix PR3117: not all nodes being legalized. TheDuncan Sands2008-12-097-207/+467
| | | | | | | | | | | | | | | | | | | | | | | essential problem was that the DAG can contain random unused nodes which were never analyzed. When remapping a value of a node being processed, such a node may become used and need to be analyzed; however due to operands being transformed during analysis the node may morph into a different one. Users of the morphing node need to be updated, and this wasn't happening. While there I added a bunch of documentation and sanity checks, so I (or some other poor soul) won't have to scratch their head over this stuff so long trying to remember how it was all supposed to work next time some obscure problem pops up! The extra sanity checking exposed a few places where invariants weren't being preserved, so those are fixed too. Since some of the sanity checking is expensive, I added a flag to turn it on. It is also turned on when building with ENABLE_EXPENSIVE_CHECKS=1. llvm-svn: 60797
* Teach BasicAA::getModRefInfo(CallSite, CallSite) someChris Lattner2008-12-092-21/+52
| | | | | | | | | | | | | | | | | | | | | | tricks based on readnone/readonly functions. Teach memdep to look past readonly calls when analyzing deps for a readonly call. This allows elimination of a few more calls from 403.gcc: before: 63 gvn - Number of instructions PRE'd 153986 gvn - Number of instructions deleted 50069 gvn - Number of loads deleted after: 63 gvn - Number of instructions PRE'd 153991 gvn - Number of instructions deleted 50069 gvn - Number of loads deleted 5 calls isn't much, but this adds plumbing for the next change. llvm-svn: 60794
* Fix a fixme: allow memdep to see past read-only calls when doingChris Lattner2008-12-091-4/+13
| | | | | | | | | | | | | load dependence queries. This allows GVN to eliminate a few more instructions on 403.gcc: 152598 gvn - Number of instructions deleted 49240 gvn - Number of loads deleted after: 153986 gvn - Number of instructions deleted 50069 gvn - Number of loads deleted llvm-svn: 60786
* rename getNonLocalDependency -> getNonLocalCallDependency, and removeChris Lattner2008-12-092-49/+23
| | | | | | pointer stuff from it, simplifying the code a bit. llvm-svn: 60783
* Switch GVN::processNonLocalLoad to using the new Chris Lattner2008-12-091-20/+11
| | | | | | | | | | | | MemDep::getNonLocalPointerDependency method. There are some open issues with this (missed optimizations) and plenty of future work, but this does allow GVN to eliminate *slightly* more loads (49246 vs 49033). Switching over now allows simplification of the other code path in memdep. llvm-svn: 60780
* random cleanups, no functionality change.Chris Lattner2008-12-091-14/+26
| | | | llvm-svn: 60779
* Back out 60748 for now. It's breaking SPASS, 254.gap, and 464.h264ref.Evan Cheng2008-12-091-5/+1
| | | | llvm-svn: 60776
* Cosmetic changes.Evan Cheng2008-12-091-6/+8
| | | | llvm-svn: 60771
* remove unused varNuno Lopes2008-12-091-2/+0
| | | | llvm-svn: 60770
* Whitespace cleanups.Dan Gohman2008-12-091-12/+14
| | | | llvm-svn: 60769
* Handle a compiler warning.Duncan Sands2008-12-091-1/+1
| | | | llvm-svn: 60755
* fix typos gabor noticedChris Lattner2008-12-091-1/+1
| | | | llvm-svn: 60754
* Correct my English.Bill Wendling2008-12-091-8/+9
| | | | llvm-svn: 60753
* restructure the top level non-local ptr dep query to handle Chris Lattner2008-12-091-19/+26
| | | | | | | | the first block of a query specially. This makes the "complete query caching" subsystem more effective, avoiding predecessor queries. This speeds up GVN another 4%. llvm-svn: 60752
* rename getNonLocalPointerDepInternal -> getNonLocalPointerDepFromBBChris Lattner2008-12-091-65/+83
| | | | | | | and split its inner loop out into a new GetNonLocalInfoForBlock function. No functionality change. llvm-svn: 60751
* DisableGVCompilation should not abort on internal GlobalValue's.Evan Cheng2008-12-091-2/+2
| | | | llvm-svn: 60750
* In LegalizeOp, don't change the result type of CONVERT_RNDSAT when promotingMon P Wang2008-12-091-2/+2
| | | | | | one of its operand. llvm-svn: 60749
* It's easy to handle SLE/SGE when the loop has a unit stride.Nick Lewycky2008-12-091-1/+5
| | | | llvm-svn: 60748
* if we have two elements, insert both, don't use std::sort.Chris Lattner2008-12-091-3/+16
| | | | | | This speeds up the new GVN by another 3% llvm-svn: 60747
* If we're only adding one new element to 'Cache', insert it into its knownChris Lattner2008-12-091-1/+12
| | | | | | | position instead of using a full sort. This speeds up GVN by ~4% with the new memdep stuff. llvm-svn: 60746
* convert a couple other places that use pred_iterator to use the cachingChris Lattner2008-12-091-2/+4
| | | | | | pred iterator. llvm-svn: 60745
* use hte new pred cache to speed up the new non-local memdepChris Lattner2008-12-091-4/+24
| | | | | | | queries. This speeds up GVN using the new queries (not yet checked in) by just over 10%. llvm-svn: 60743
* Fix getNode to allow a vector for the shift amount for shifts of vectors.Mon P Wang2008-12-092-9/+33
| | | | | | | | Fix the shift amount when unrolling a vector shift into scalar shifts. Fix problem in getShuffleScalarElt where it assumes that the input of a bit convert must be a vector. llvm-svn: 60740
* Fix a really subtle off-by-one bug that Duncan noticed with valgrindChris Lattner2008-12-091-1/+1
| | | | | | on test/CodeGen/Generic/2007-06-06-CriticalEdgeLandingPad. llvm-svn: 60739
* CellSPU:Scott Michel2008-12-091-2/+5
| | | | | | | | - Change default scheduling preference to list-burr, which produces somewhat better code than the default. Could also use list-tdrr, but need to ask dev list about the appropriate handy mnemonic before commiting. llvm-svn: 60738
* Add initial support for fast-isel of the [SU]ADDO intrinsics. It isn'tBill Wendling2008-12-091-7/+84
| | | | | | | | | | | | | | | | | | | complete. For instance, it lowers the common case into this less-than-optimal code: addl %ecx, %eax seto %cl testb %cl, %cl jne LBB1_2 ## overflow instead of: addl %ecx, %eax jo LBB1_2 ## overflow That will come in a future commit. llvm-svn: 60737
* Don't charge full latency for an anti-dependence, in this simplisticDan Gohman2008-12-091-3/+7
| | | | | | pipeline model. llvm-svn: 60733
* Fix a couple of mistaken switch case fall-throughs. Thanks to BillDan Gohman2008-12-081-0/+2
| | | | | | for spotting these! llvm-svn: 60728
* remove DebugIterations option. Despite the accusations, Chris Lattner2008-12-081-14/+1
| | | | | | | jump threading has been shown to only expose problems not have bugs itself. I'm sure it's completely bug free! ;-) llvm-svn: 60725
* Re-apply 60689 now my head is screwed on right.Evan Cheng2008-12-081-0/+2
| | | | llvm-svn: 60711
* Fix the top-level comments, and fix some 80-column violations.Dan Gohman2008-12-081-7/+9
| | | | llvm-svn: 60707
* Revert 60689. It caused many regressions on Darwin targets.Dan Gohman2008-12-081-3/+1
| | | | llvm-svn: 60705
* Fix spelling. Devang Patel2008-12-081-10/+10
| | | | | | Thanks Duncan! llvm-svn: 60702
* Undo previous patch. Devang Patel2008-12-081-3/+1
| | | | llvm-svn: 60701
* Fix comment typo.Duncan Sands2008-12-081-1/+1
| | | | llvm-svn: 60697
* Factor out the code for sign-extending/truncating gep indicesDan Gohman2008-12-082-26/+35
| | | | | | | | | and use it in x86 address mode folding. Also, make getRegForValue return 0 for illegal types even if it has a ValueMap for them, because Argument values are put in the ValueMap. This fixes PR3181. llvm-svn: 60696
* add another level of caching for non-local pointer queries, keepingChris Lattner2008-12-081-7/+32
| | | | | | | | | track of whether the CachedNonLocalPointerInfo for a block is specific to a block. If so, just return it without any pred scanning. This is good for a 6% speedup on GVN (when it uses this lookup method, which it doesn't right now). llvm-svn: 60695
* consistencyChris Lattner2008-12-081-2/+2
| | | | llvm-svn: 60694
* introduce a new RoundUpAlignment helper function, use it to Chris Lattner2008-12-081-32/+29
| | | | | | | remove some more 64-bit divs and rems from the StructLayout ctor. llvm-svn: 60692
* Make ConstantAggregateZero::get return a ConstantAggregateZero*,Dan Gohman2008-12-081-1/+1
| | | | | | as suggested in PR3182. llvm-svn: 60691
* Update CPP backend for PrintModulePass API changes.Dan Gohman2008-12-081-4/+4
| | | | llvm-svn: 60690
* Perform cheap checks first.Evan Cheng2008-12-081-1/+3
| | | | llvm-svn: 60689
* Some minor optimizations for isObjectSmallerThan.Chris Lattner2008-12-081-7/+12
| | | | llvm-svn: 60687
* Move createVirtualRegister out-of-line.Dan Gohman2008-12-081-0/+18
| | | | llvm-svn: 60684
* Clarify some comments.Dan Gohman2008-12-081-2/+2
| | | | llvm-svn: 60683
* Fixes for Visual Studio users. Patch by OvermindDL1 on llvm-dev!Nick Lewycky2008-12-081-1/+1
| | | | llvm-svn: 60679
* add an assert. the cast<> below would catch this but a message is moreChris Lattner2008-12-071-0/+2
| | | | | | useful. llvm-svn: 60674
* factor some code better.Chris Lattner2008-12-071-17/+17
| | | | llvm-svn: 60673
OpenPOWER on IntegriCloud