summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* A new dag combine; several permutations of thisDale Johannesen2008-12-161-0/+6
| | | | | | are there under ADD, this one was missing. llvm-svn: 61107
* Add code to renumber split intervals into new vregs. This is disabled for ↵Owen Anderson2008-12-161-0/+48
| | | | | | now until I finish working out some iterator invalidation issues. llvm-svn: 61104
* Fix another crash found by inspection. If we have a PHI node mergingChris Lattner2008-12-161-47/+68
| | | | | | | the load multiple times, make sure the check the uses of the PHI to ensure they are transformable. llvm-svn: 61102
* fix a crash found by inspection.Chris Lattner2008-12-161-1/+1
| | | | llvm-svn: 61101
* Add a helper to remove a branch and DCE the condition, and use it Eli Friedman2008-12-161-32/+25
| | | | | | | | consistently for deleting branches. In addition to being slightly more readable, this makes SimplifyCFG a bit better about cleaning up after itself when it makes conditions unused. llvm-svn: 61100
* Eliminate the loop that walks the critical path. Instead, just track theDan Gohman2008-12-161-54/+64
| | | | | | | position in the critical path during the main instruction walk. This eliminates the need for the CritialAntiDep DenseMap. llvm-svn: 61096
* Temporarily revert r61019, r61030, and r61040. These were breaking LLVM ReleaseBill Wendling2008-12-166-66/+20
| | | | | | builds. llvm-svn: 61094
* Preserve SourceValue information when lowering produces multiple loads fromDan Gohman2008-12-161-3/+6
| | | | | | different offsets within the same stack slot. llvm-svn: 61093
* We have decided not to support inline asm where an output operand with a ↵Evan Cheng2008-12-161-11/+12
| | | | | | matching input operand with incompatible type (i.e. either one is a floating point and the other is an integer or the sizes of the types differ). SelectionDAGBuild will catch these and exit with an error. llvm-svn: 61092
* CMake: Added DbgInfoPrinter.cpp to lib/Analysis/CMakeFiles.txt.Oscar Fuentes2008-12-161-0/+1
| | | | llvm-svn: 61087
* Add -print-dbginfo pass that prints LLVM IR with comments inserted to showTorok Edwin2008-12-161-0/+145
| | | | | | | which source/line a certain BB/instruction comes from, original variable names, and original (unmangled) C++ name of functions. llvm-svn: 61085
* Add utility functions to search for DbgStopPointInst corresponding to anTorok Edwin2008-12-161-0/+73
| | | | | | | instruction or BasicBlock, and to search for DbgDeclareInst corresponding to a variable. llvm-svn: 61084
* use different name for parameter to make it clear that we set DIDescriptor::GVTorok Edwin2008-12-161-2/+2
| | | | llvm-svn: 61083
* Generalize support for analyzing loops to include SLE/SGE loop exit conditionsNick Lewycky2008-12-161-24/+23
| | | | | | and support for non-unit strides with signed exit conditions. llvm-svn: 61082
* switch some std::set/std::map to SmallPtrSet/DenseMap.Chris Lattner2008-12-161-14/+13
| | | | llvm-svn: 61081
* fix PR3217: fully cached queries need to be verified against the Chris Lattner2008-12-161-1/+21
| | | | | | | | visited set before they are used. If used, their blocks need to be added to the visited set so that subsequent queries don't use conflicting pointer values in the cache result blocks. llvm-svn: 61080
* Enable anti-dependence breaking by default when post-RA scheduling is enabled.Dan Gohman2008-12-161-1/+1
| | | | llvm-svn: 61078
* When breaking an anti-dependency, don't use a register which has seenDan Gohman2008-12-161-0/+1
| | | | | | | one of its aliases defined. This is conservative, but tricky subreg corner cases are outside the primary aim of this pass. llvm-svn: 61077
* Add initial support for back-scheduling address computations,Dan Gohman2008-12-164-1/+157
| | | | | | | especially in the case of addresses computed from loop induction variables. llvm-svn: 61075
* Remove some special-case logic in ScheduleDAGSDNodes's Dan Gohman2008-12-161-10/+0
| | | | | | | latency computation code that is no longer needed with the new method for handling latencies. llvm-svn: 61074
* Fix some register-alias-related bugs in the post-RA scheduler livenessDan Gohman2008-12-168-267/+287
| | | | | | | | | | | | | | computation code. Also, avoid adding output-depenency edges when both defs are dead, which frequently happens with EFLAGS defs. Compute Depth and Height lazily, and always in terms of edge latency values. For the schedulers that don't care about latency, edge latencies are set to 1. Eliminate Cycle and CycleBound, and LatencyPriorityQueue's Latencies array. These are all subsumed by the Depth and Height fields. llvm-svn: 61073
* Add a simple target-independent heuristic to allow targets with noDan Gohman2008-12-161-0/+6
| | | | | | instruction itinerary data to back-schedule loads. llvm-svn: 61070
* Move addPred and removePred out-of-line.Dan Gohman2008-12-161-0/+61
| | | | llvm-svn: 61067
* Make addPred and removePred return void, since the return value is notDan Gohman2008-12-162-8/+8
| | | | | | currently used by anything. llvm-svn: 61066
* This getEdgeAttributes doesn't need a template argument.Dan Gohman2008-12-161-2/+2
| | | | llvm-svn: 61065
* enhance heap-sra to apply to fixed sized array allocations, not justChris Lattner2008-12-151-4/+43
| | | | | | variable sized array allocations. llvm-svn: 61051
* Added support for splitting and scalarizing vector shifts.Mon P Wang2008-12-152-0/+19
| | | | llvm-svn: 61050
* Use stripPointerCasts.Chris Lattner2008-12-151-7/+2
| | | | llvm-svn: 61047
* minor tweaks for formatting, allow bitcast in ↵Chris Lattner2008-12-151-12/+29
| | | | | | ValueIsOnlyUsedLocallyOrStoredToOneGlobal. llvm-svn: 61046
* refactor some code into a new TryToOptimizeStoreOfMallocToGlobal function.Chris Lattner2008-12-151-62/+66
| | | | | | Use GetElementPtrInst::hasAllZeroIndices where possible. llvm-svn: 61045
* Teach basicaa to use the nocapture attribute when possible. When theChris Lattner2008-12-151-6/+17
| | | | | | intrinsics are properly marked nocapture, the fixme should be addressed. llvm-svn: 61040
* Fix printing of PseudoSourceValues in SDNode graphs.Dan Gohman2008-12-151-5/+3
| | | | llvm-svn: 61036
* add some more notes.Chris Lattner2008-12-151-2/+53
| | | | llvm-svn: 61033
* Add a testcase for GCC PR 23455, which lpre handles now. Add someChris Lattner2008-12-151-4/+10
| | | | | | comments about why we're not getting other cases. llvm-svn: 61032
* Update generated files after nocapture syntax change.Nick Lewycky2008-12-153-1343/+1355
| | | | llvm-svn: 61031
* It turns out that "align 1" and unaligned are different. Add a bias to theNick Lewycky2008-12-153-2/+9
| | | | | | | | | | alignment attribute such that 0 means unaligned. This will probably require a rebuild of llvm-gcc because of the change to Attributes.h. If you see many test failures on "make check", please rebuild your llvm-gcc. llvm-svn: 61030
* Added support to LegalizeType for expanding the operands of scalar to vectorMon P Wang2008-12-153-9/+57
| | | | | | | and insert vector element. Modified extract vector element to extend the result to match the expected promoted type. llvm-svn: 61029
* gvn now hoists this load out of the hot non-call path.Chris Lattner2008-12-151-29/+0
| | | | llvm-svn: 61028
* Enable Load PRE. This teaches GVN to push partially redundant loads up theChris Lattner2008-12-151-1/+6
| | | | | | | | | CFG when there is exactly one predecessor where the load is not available. This is designed to not increase code size but still eliminate partially redundant loads. This fires 1765 times on 403.gcc even though it doesn't do critical edge splitting yet (the most common reason for it to fail). llvm-svn: 61027
* if we have a phi translation failure of the start block,Chris Lattner2008-12-151-0/+1
| | | | | | | return *just* a clobber of the start block, not other random stuff as well. llvm-svn: 61026
* Ifdef out some code that I didn't mean to enable by default yet.Owen Anderson2008-12-151-1/+8
| | | | llvm-svn: 61024
* make GVN try to rename inputs to the resultant replaced values, whichChris Lattner2008-12-151-1/+5
| | | | | | | cleans up the generated code a bit. This should have the added benefit of not randomly renaming functions/globals like my previous patch did. :) llvm-svn: 61023
* Implement initial support for PHI translation in memdep. This means thatChris Lattner2008-12-151-39/+166
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | memdep keeps track of how PHIs affect the pointer in dep queries, which allows it to eliminate the load in cases like rle-phi-translate.ll, which basically end up being: BB1: X = load P br BB3 BB2: Y = load Q br BB3 BB3: R = phi [P] [Q] load R turning "load R" into a phi of X/Y. In addition to additional exposed opportunities, this makes memdep safe in many cases that it wasn't before (which is required for load PRE) and also makes it substantially more efficient. For example, consider: bb1: // has many predecessors. P = some_operator() load P In this example, previously memdep would scan all the predecessors of BB1 to see if they had something that would mustalias P. In some cases (e.g. test/Transforms/GVN/rle-must-alias.ll) it would actually find them and end up eliminating something. In many other cases though, it would scan and not find anything useful. MemDep now stops at a block if the pointer is defined in that block and cannot be phi translated to predecessors. This causes it to miss the (rare) cases like rle-must-alias.ll, but makes it faster by not scanning tons of stuff that is unlikely to be useful. For example, this speeds up GVN as a whole from 3.928s to 2.448s (60%)!. IMO, scalar GVN should be enhanced to simplify the rle-must-alias pointer base anyway, which would allow the loads to be eliminated. In the future, this should be enhanced to phi translate through geps and bitcasts as well (as indicated by FIXMEs) making memdep even more powerful. llvm-svn: 61022
* Add support for slow-path GVN with full phi construction for scalars. This ↵Owen Anderson2008-12-151-7/+77
| | | | | | | | is disabled for now, as it actually pessimizes code in the abscence of phi translation for load elimination. This slow down GVN a bit, by about 2% on 403.gcc. llvm-svn: 61021
* Fix whitespace in comment.Nick Lewycky2008-12-151-2/+1
| | | | | | | Remove TODO; icmp isn't a binary operator, so this function will never deal with them. llvm-svn: 61020
* Introducing nocapture, a parameter attribute for pointers to indicate that theNick Lewycky2008-12-155-14/+42
| | | | | | | | | | | | | | | | | | | | | | | callee will not introduce any new aliases of that pointer. The attributes had all bits allocated already, so I decided to collapse alignment. Alignment was previously stored as a 16-bit integer from bits 16 to 32 of the attribute, but it was required to be a power of 2. Now it's stored in log2 encoded form in five bits from 16 to 21. That gives us 11 more bits of space. You may have already noticed that you only need four bits to encode a 16-bit power of two, so why five bits? Because the AsmParser accepted 32-bit alignments, even though we couldn't store them (they were silently discarded). Now we can store them in memory, but not in the bitcode. The bitcode format was already storing these as 64-bit VBR integers. So, the bitcode format stays the same, keeping the alignment values stored as 16 bit raw values. There's some hideous code in the reader and writer that deals with this, waiting to be ripped out the moment we run out of bits again and have to replace the parameter attributes table encoding. llvm-svn: 61019
* silence warning when asserts disabled.Chris Lattner2008-12-141-2/+2
| | | | llvm-svn: 61014
* silence warning when asserts disabled.Chris Lattner2008-12-141-1/+1
| | | | llvm-svn: 61013
* eliminate warning when asserts disabled.Chris Lattner2008-12-141-1/+1
| | | | llvm-svn: 61012
* Generalize GVN's phi construciton routine to work for things other than loads.Owen Anderson2008-12-141-3/+7
| | | | llvm-svn: 61009
OpenPOWER on IntegriCloud