aboutsummaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Don't assume a tail call can't reference a byvalDale Johannesen2008-04-151-2/+4
| | | | | | | | argument to the outer function, this isn't correct. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49731 91177308-0d34-0410-b5e6-96231b3b80d8
* Use gv's --spartan option, which trades away an extra row of UI buttonsDan Gohman2008-04-151-0/+1
| | | | | | | for more space for displaying the graph. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49730 91177308-0d34-0410-b5e6-96231b3b80d8
* Change Divided flag to Split, as suggested by EvanNicolas Geoffray2008-04-152-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49715 91177308-0d34-0410-b5e6-96231b3b80d8
* Treat EntryToken nodes as "passive" so that they aren't added to theDan Gohman2008-04-153-35/+51
| | | | | | | | | | | | | | | | | | ScheduleDAG; they don't correspond to any actual instructions so they don't need to be scheduled. This fixes a bug where the EntryToken was being scheduled multiple times in some cases, though it ended up not causing any trouble because EntryToken doesn't expand into anything. With this fixed the schedulers reliably schedule the expected number of units, so we can check this with an assertion. This requires a tweak to test/CodeGen/X86/loop-hoist.ll because it ends up getting scheduled differently in a trivial way, though it was enough to fool the prcontext+grep that the test does. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49701 91177308-0d34-0410-b5e6-96231b3b80d8
* In -view-sunit-dags, display "special" chain dependencies as cyanDan Gohman2008-04-141-0/+2
| | | | | | | instead of blue to distinguish them from regular dependencies. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49696 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unnecessary <sstream> includes.Dan Gohman2008-04-142-2/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49681 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid creating MERGE_VALUES nodes for single values.Dan Gohman2008-04-141-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49676 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach AliasSetTracker about VAArgInst.Dan Gohman2008-04-141-0/+17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49674 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor whitespace and comment cleanups.Dan Gohman2008-04-141-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49671 91177308-0d34-0410-b5e6-96231b3b80d8
* In the special case, call the comparison function instead ofDan Gohman2008-04-141-2/+2
| | | | | | | | | manually performing the comparison. This allows the special case to work correctly even in the case where someone is experimenting with a different comparison function :-). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49670 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix const-correctness issues with the SrcValue handling in theDan Gohman2008-04-145-18/+18
| | | | | | | memory intrinsic expansion code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49666 91177308-0d34-0410-b5e6-96231b3b80d8
* Reverse sense of unwind-tables option. This meansDale Johannesen2008-04-144-9/+9
| | | | | | | | | stack tracebacks on Darwin x86-64 won't work by default; nevertheless, everybody but me thinks this is a good idea. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49663 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r49614. As Dan pointed out, some of these aren't correct.Owen Anderson2008-04-145-6/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49657 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix /test/CodeGen/PowerPC/big-endian-actual-args.ll for linux/ppc32Nicolas Geoffray2008-04-141-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49652 91177308-0d34-0410-b5e6-96231b3b80d8
* VAArg may trap.Dan Gohman2008-04-141-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49646 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial libcall support for LegalizeTypes. This isDuncan Sands2008-04-143-0/+116
| | | | | | | | | much simpler than in LegalizeDAG because calls are not yet expanded into call sequences: that happens after type legalization has finished. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49634 91177308-0d34-0410-b5e6-96231b3b80d8
* add a new CallGraphNode::removeCallEdgeFor method, tidy some comments.Chris Lattner2008-04-131-0/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49617 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace calls of the form V1->setName(V2->getName()) with V1->takeName(V2), Owen Anderson2008-04-135-6/+6
| | | | | | | which is significantly more efficient. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49614 91177308-0d34-0410-b5e6-96231b3b80d8
* LegalizeTypes can sometimes have deleted nodesDuncan Sands2008-04-132-0/+51
| | | | | | | | | | in its maps. Add some sanity checks that catch this kind of thing. Hopefully these can be removed one day (once all problems are fixed!) but for the moment it seems wise to have them in. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49612 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a divided flag for the first piece of an argument divided into mulitple ↵Nicolas Geoffray2008-04-132-14/+19
| | | | | | parts. Fixes PR1643 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49611 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix some serious logic errors that broke the jit on darwin/x86-64.Chris Lattner2008-04-131-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49606 91177308-0d34-0410-b5e6-96231b3b80d8
* Merge LLVMBuilder and FoldingBuilder, callingDuncan Sands2008-04-132-12/+20
| | | | | | | the result IRBuilder. Patch by Dominic Hamon. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49604 91177308-0d34-0410-b5e6-96231b3b80d8
* Gabor points out that reserveOperandSpace takes # of values, Chris Lattner2008-04-131-1/+1
| | | | | | | not # of operands as an input. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49599 91177308-0d34-0410-b5e6-96231b3b80d8
* Provide option for stack alignment overrideAnton Korobeynikov2008-04-121-0/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49593 91177308-0d34-0410-b5e6-96231b3b80d8
* This patch corrects the handling of byval arguments for tailcallArnold Schwaighofer2008-04-122-29/+148
| | | | | | | | | | | | | | | | | | | | | | | | optimized x86-64 (and x86) calls so that they work (... at least for my test cases). Should fix the following problems: Problem 1: When i introduced the optimized handling of arguments for tail called functions (using a sequence of copyto/copyfrom virtual registers instead of always lowering to top of the stack) i did not handle byval arguments correctly e.g they did not work at all :). Problem 2: On x86-64 after the arguments of the tail called function are moved to their registers (which include ESI/RSI etc), tail call optimization performs byval lowering which causes xSI,xDI, xCX registers to be overwritten. This is handled in this patch by moving the arguments to virtual registers first and after the byval lowering the arguments are moved from those virtual registers back to RSI/RDI/RCX. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49584 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor some libcall code.Duncan Sands2008-04-121-61/+49
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49583 91177308-0d34-0410-b5e6-96231b3b80d8
* Drop ISD::MEMSET, ISD::MEMMOVE, and ISD::MEMCPY, which are not LegalDan Gohman2008-04-1219-711/+553
| | | | | | | | | | | | | | | | | | | | | | | | | | | | on any current target and aren't optimized in DAGCombiner. Instead of using intermediate nodes, expand the operations, choosing between simple loads/stores, target-specific code, and library calls, immediately. Previously, the code to emit optimized code for these operations was only used at initial SelectionDAG construction time; now it is used at all times. This fixes some cases where rep;movs was being used for small copies where simple loads/stores would be better. This also cleans up code that checks for alignments less than 4; let the targets make that decision instead of doing it in target-independent code. This allows x86 to use rep;movs in low-alignment cases. Also, this fixes a bug that resulted in the use of rep;stos for memsets of 0 with non-constant memory size when the alignment was at least 4. It's better to use the library in this case, which can be significantly faster when the size is large. This also preserves more SourceValue information when memory intrinsics are lowered into simple loads/stores. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49572 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bug that prevented x86-64 from using rep.movsq forDan Gohman2008-04-121-2/+2
| | | | | | | 8-byte-aligned data. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49571 91177308-0d34-0410-b5e6-96231b3b80d8
* 80 col fixNate Begeman2008-04-121-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49569 91177308-0d34-0410-b5e6-96231b3b80d8
* Restore code to disable crash catcher on older OS X systemsNate Begeman2008-04-121-1/+25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49568 91177308-0d34-0410-b5e6-96231b3b80d8
* Add debugging code.Evan Cheng2008-04-121-3/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49566 91177308-0d34-0410-b5e6-96231b3b80d8
* Reenable JIT symbol table.Chris Lattner2008-04-111-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49548 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not add empty live intervals to handled_. They should never be undone for ↵Evan Cheng2008-04-111-2/+1
| | | | | | backtracking. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49544 91177308-0d34-0410-b5e6-96231b3b80d8
* If a PHI node has a single implicit_def source, replace it with an ↵Evan Cheng2008-04-111-5/+19
| | | | | | implicit_def instead of a copy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49543 91177308-0d34-0410-b5e6-96231b3b80d8
* Use of implicit_def is not part of live interval. Create empty intervals for ↵Evan Cheng2008-04-113-12/+53
| | | | | | the uses when the live interval is being spilled. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49542 91177308-0d34-0410-b5e6-96231b3b80d8
* detabifyGabor Greif2008-04-111-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49524 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR2213 by simultaneously making GVN more aggressive with the return valuesOwen Anderson2008-04-111-29/+20
| | | | | | | of calls and less aggressive with non-readnone calls. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49516 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove implicit_def instructions that become dead as result of coalescing.Evan Cheng2008-04-101-19/+37
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49513 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow registers defined by implicit_def to be clobbered.Evan Cheng2008-04-101-6/+15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49512 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a typo in a comment.Dan Gohman2008-04-101-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49504 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix for PR2190. Memdep's non-local caching was checking dirtied blocks in theOwen Anderson2008-04-101-2/+4
| | | | | | | wrong order. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49499 91177308-0d34-0410-b5e6-96231b3b80d8
* Make several symbols static.Dan Gohman2008-04-104-40/+40
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49496 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach InstCombine's ComputeMaskedBits to handle pointer expressionsDan Gohman2008-04-101-140/+299
| | | | | | | | | | | | | | | | in addition to integer expressions. Rewrite GetOrEnforceKnownAlignment as a ComputeMaskedBits problem, moving all of its special alignment knowledge to ComputeMaskedBits as low-zero-bits knowledge. Also, teach ComputeMaskedBits a few basic things about Mul and PHI instructions. This improves ComputeMaskedBits-based simplifications in a few cases, but more noticeably it significantly improves instcombine's alignment detection for loads, stores, and memory intrinsics. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49492 91177308-0d34-0410-b5e6-96231b3b80d8
* A copy instruction may use a register multiple times on some targets. Change ↵Evan Cheng2008-04-101-2/+6
| | | | | | them all. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49491 91177308-0d34-0410-b5e6-96231b3b80d8
* Add comment.Evan Cheng2008-04-101-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49469 91177308-0d34-0410-b5e6-96231b3b80d8
* add a note, this is actually not too bad to implement.Chris Lattner2008-04-101-1/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49466 91177308-0d34-0410-b5e6-96231b3b80d8
* move the x86-32 part of PR2108 here.Chris Lattner2008-04-101-0/+48
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49465 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the x86-64 side of PR2108 by adding a v2f64 version ofChris Lattner2008-04-101-0/+10
| | | | | | | | | MOVZQI2PQIrr. This would be better handled as a dag combine (with the goal of eliminating the bitconvert) but I don't know how to do that safely. Thoughts welcome. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49463 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach branch folding pass about implicit_def instructions. Unfortunately we ↵Evan Cheng2008-04-101-1/+56
| | | | | | can't just eliminate them since register scavenger expects every register use to be defined. However, we can delete them when there are no intra-block uses. Carefully removing some implicit def's which enable more blocks to be optimized away. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49461 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable an xform we've had for a long time, pow(x,0.5) -> sqrt.Chris Lattner2008-04-101-0/+8
| | | | | | | This is not safe for all inputs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49458 91177308-0d34-0410-b5e6-96231b3b80d8