aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Fix a compile-time regression introduced by my heuristic-changing patch. I ↵Owen Anderson2008-07-234-4/+5
| | | | | | | | | | forgot to multiply the instruction count by a constant factor in a few places, which caused the register allocator to require many more iterations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53959 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable first-class aggregates support.Dan Gohman2008-07-231-20/+0
| | | | | | | | | | | | | Remove the GetResultInst instruction. It is still accepted in LLVM assembly and bitcode, where it is now auto-upgraded to ExtractValueInst. Also, remove support for return instructions with multiple values. These are auto-upgraded to use InsertValueInst instructions. The IRBuilder still accepts multiple-value returns, and auto-upgrades them to InsertValueInst instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53941 91177308-0d34-0410-b5e6-96231b3b80d8
* LegalizeTypes support for VSETCC. Fixes PR2575.Duncan Sands2008-07-222-9/+38
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53938 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the heuristics used in the coalescer, register allocator, and withinOwen Anderson2008-07-224-11/+16
| | | | | | | | live intervals itself to use an instruction count approximation that is not affected by inserting empty indices. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53937 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix pr2566: incorrect assumption about bit_convert. It doesn't not have to ↵Evan Cheng2008-07-221-1/+2
| | | | | | output a vector value. Patch by Nicolas Capens! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53932 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the GraphRoot edge look like a chain edge, which is more accurate,Dan Gohman2008-07-221-1/+2
| | | | | | | | and use the right result number, in the off chance that the graph root has multiple result values. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53923 91177308-0d34-0410-b5e6-96231b3b80d8
* Another buildbot test commit.Bill Wendling2008-07-221-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53896 91177308-0d34-0410-b5e6-96231b3b80d8
* Trivial check-in to test buildbot. No functionality change.Bill Wendling2008-07-221-3/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53889 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix grammaros in comments.Dan Gohman2008-07-211-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53884 91177308-0d34-0410-b5e6-96231b3b80d8
* Enhance the GraphWriter support for edge destinations, and teach theDan Gohman2008-07-211-6/+31
| | | | | | | | | SelectionDAG graph writer to make use of them. Now, nodes with multiple values are displayed as such, with incoming edges pointing to the specific value they use. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53875 91177308-0d34-0410-b5e6-96231b3b80d8
* After early-lowering the FORMAL_ARGUMENTS node, delete it.Dan Gohman2008-07-211-0/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53874 91177308-0d34-0410-b5e6-96231b3b80d8
* Add titles to the various SelectionDAG viewGraph callsDan Gohman2008-07-215-52/+64
| | | | | | | | that include useful information like the name of the block being viewed and the current phase of compilation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53872 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix uses of underscore-capital names.Dan Gohman2008-07-211-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53870 91177308-0d34-0410-b5e6-96231b3b80d8
* Now that the MachineInstr leaks are fixed, enable leak checkingDan Gohman2008-07-211-0/+2
| | | | | | | in the MachineInstr clone code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53868 91177308-0d34-0410-b5e6-96231b3b80d8
* Add VerifyNode, a place to put sanity checks onDuncan Sands2008-07-213-6/+44
| | | | | | | | | | | | | generic SDNode's (nodes with their own constructors should do sanity checking in the constructor). Add sanity checks for BUILD_VECTOR and fix all the places that were producing bogus BUILD_VECTORs, as found by "make check". My favorite is the BUILD_VECTOR with only two operands that was being used to build a vector with four elements! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53850 91177308-0d34-0410-b5e6-96231b3b80d8
* Pull r53795 from Gaz into mainline:Bill Wendling2008-07-201-14/+29
| | | | | | | | | | If .loc and .file aren't used, always emit the "debug_line" section. This requires at least one entry in the line matrix. So if there's nothing to emit into the matrix, emit an end of matrix value anyway. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53803 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a memory leak in LiveIntervalAnalysis.Evan Cheng2008-07-192-11/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53779 91177308-0d34-0410-b5e6-96231b3b80d8
* Softfloat support for FDIV. Patch by Duncan Sands2008-07-182-0/+14
| | | | | | | Richard Pennington. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53773 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate unused variable.Duncan Sands2008-07-181-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53772 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 53729, after waking up in the middle ofDuncan Sands2008-07-181-4/+3
| | | | | | | | | | | | | | | | | the night realising that it was wrong :) I think the reason the same type was being used for the shufflevec of indices as for the actual indices is so that if one of them needs splitting then so does the other. After my patch it might be that the indices need splitting but not the rest, yet there is no good way of handling that. I think the right solution is to not have the shufflevec be an operand at all: just have it be the list of numbers it actually is, stored as extra info in the node. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53768 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a LocalSpiller leak. This fixes tramp3d-v4.Dan Gohman2008-07-181-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53766 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-introduce LeakDetector support for MachineInstrs and MachineBasicBlocks.Dan Gohman2008-07-174-6/+26
| | | | | | | | Fix a leak that this turned up in LowerSubregs.cpp. And, comment a leak in LiveIntervalAnalysis.cpp. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53746 91177308-0d34-0410-b5e6-96231b3b80d8
* When printing MemOperand nodes, only use print() forDan Gohman2008-07-171-3/+10
| | | | | | | | | PseudoSourceValue values, which never have names. Use getName() for all other values, because we want to print just a short summary of the value, not the entire instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53738 91177308-0d34-0410-b5e6-96231b3b80d8
* Subreg live interval valno may not have a corresponding def machineinstr ↵Evan Cheng2008-07-171-1/+1
| | | | | | since it's less precise. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53734 91177308-0d34-0410-b5e6-96231b3b80d8
* Use a legal type for elements of the vector_shuffleDuncan Sands2008-07-171-3/+4
| | | | | | | | | | | | | | | | | | | mask. These are just indices into the shuffled vector so their type is unrelated to the type of the shuffled elements (which is what was being used before). This fixes vec_shuffle-11.ll when using LegalizeTypes. What seems to have happened is that Dan's recent change r53687, which corrected the result type of the shuffle, somehow caused LegalizeTypes to notice that the mask operand was a BUILD_VECTOR with a legal type but elements of an illegal type (i64). LegalizeTypes legalized this by introducing a new BUILD_VECTOR of i32 and bitcasting it to the old type. But the mask operand is not supposed to be a bitcast but a straight BUILD_VECTOR of constants, causing a crash. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53729 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new function, ReplaceAllUsesOfValuesWith, which handles bulkDan Gohman2008-07-174-225/+365
| | | | | | | | | | | | | | | | | | | | | | | | | | | | replacement of multiple values. This is slightly more efficient than doing multiple ReplaceAllUsesOfValueWith calls, and theoretically could be optimized even further. However, an important property of this new function is that it handles the case where the source value set and destination value set overlap. This makes it feasible for isel to use SelectNodeTo in many very common cases, which is advantageous because SelectNodeTo avoids a temporary node and it doesn't require CSEMap updates for users of values that don't change position. Revamp MorphNodeTo, which is what does all the work of SelectNodeTo, to handle operand lists more efficiently, and to correctly handle a number of corner cases to which its new wider use exposes it. This commit also includes a change to the encoding of post-isel opcodes in SDNodes; now instead of being sandwiched between the target-independent pre-isel opcodes and the target-dependent pre-isel opcodes, post-isel opcodes are now represented as negative values. This makes it possible to test if an opcode is pre-isel or post-isel without having to know the size of the current target's post-isel instruction set. These changes speed up llc overall by 3% and reduce memory usage by 10% on the InstructionCombining.cpp testcase with -fast and -regalloc=local. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53728 91177308-0d34-0410-b5e6-96231b3b80d8
* LegalizeTypes support for what seems to be theDuncan Sands2008-07-172-0/+18
| | | | | | | | only missing ppc long double operations: FNEG and FP_EXTEND. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53723 91177308-0d34-0410-b5e6-96231b3b80d8
* Turn LegalizeTypes back off again for the moment:Duncan Sands2008-07-171-6/+4
| | | | | | | | it is breaking Darwin bootstrap due to missing functionality. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53721 91177308-0d34-0410-b5e6-96231b3b80d8
* Factorize some code for determining which libcall to use.Duncan Sands2008-07-174-562/+204
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53713 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the result type of a VECTOR_SHUFFLE+BIT_CONVERT dagcombine. ThisDan Gohman2008-07-161-3/+2
| | | | | | | | was turned up by some new SelectionDAG assertion checks that I'm working on. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53687 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for promoting and expanding AssertZextDuncan Sands2008-07-162-0/+42
| | | | | | | | and AssertSext. Needed when passing huge integer parameters with the zeroext or signext attributes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53684 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a comment to say nonnegative instead of positive.Dan Gohman2008-07-161-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53681 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an assert to check for empty flags for MachineMemOperand.Dan Gohman2008-07-161-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53680 91177308-0d34-0410-b5e6-96231b3b80d8
* Reorder methods alphabetically. No functionality change.Duncan Sands2008-07-163-922/+913
| | | | | | | | | While this is not a wonderful organizing principle, it does make it easy to find routines, and clear where to insert new ones. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53672 91177308-0d34-0410-b5e6-96231b3b80d8
* Turn on LegalizeTypes by default.Duncan Sands2008-07-161-4/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53671 91177308-0d34-0410-b5e6-96231b3b80d8
* SelectionDAG::AssignNodeIds is unused.Dan Gohman2008-07-151-11/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53636 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't sort SDNodes by their addresses in SelectionDAG::dump. Instead,Dan Gohman2008-07-151-9/+5
| | | | | | | | just use the AllNodes order, which is at least relatively stable across runs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53632 91177308-0d34-0410-b5e6-96231b3b80d8
* LegalizeTypes support for fabs on ppc long double.Duncan Sands2008-07-152-0/+15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53613 91177308-0d34-0410-b5e6-96231b3b80d8
* LegalizeTypes support for promotion of bswap.Duncan Sands2008-07-152-0/+12
| | | | | | | | | | | | | In LegalizeDAG the value is zero-extended to the new type before byte swapping. It doesn't matter how the extension is done since the new bits are shifted off anyway after the swap, so extend by any old rubbish bits. This results in the final assembler for the testcase being one line shorter. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53604 91177308-0d34-0410-b5e6-96231b3b80d8
* LegalizeTypes support for promotion of SIGN_EXTEND_INREG.Duncan Sands2008-07-152-0/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53603 91177308-0d34-0410-b5e6-96231b3b80d8
* Reorder the integer promotion methods alphabetically.Duncan Sands2008-07-151-365/+356
| | | | | | | No change in functionality. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53602 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed potential bug if the source and target of a bit convert have different ↵Mon P Wang2008-07-151-1/+3
| | | | | | alignment git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53590 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply 53476 and 53480, with a fix so that it properly updatesDan Gohman2008-07-144-33/+41
| | | | | | | | the BB member to the current basic block after emitting instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53567 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve debug output for MemOperandSDNode. PseudoSourceValue nodesDan Gohman2008-07-141-4/+7
| | | | | | | | don't have value names, so use print instead of getName() to get a useful string. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53563 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix edito in the PseudoSourceValue name list.Dan Gohman2008-07-141-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53562 91177308-0d34-0410-b5e6-96231b3b80d8
* I don't think BUILD_PAIR can have a vector result.Duncan Sands2008-07-141-12/+0
| | | | | | | Remove support for this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53559 91177308-0d34-0410-b5e6-96231b3b80d8
* Tighten up some checks. Fix FPOWI splitting forDuncan Sands2008-07-141-3/+3
| | | | | | | non-power-of-two vectors. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53558 91177308-0d34-0410-b5e6-96231b3b80d8
* An INSERT_VECTOR_ELT can insert a larger valueDuncan Sands2008-07-141-4/+5
| | | | | | | | | than the vector element type. Don't forget to handle this when the insertion index is not a constant. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53556 91177308-0d34-0410-b5e6-96231b3b80d8
* According to the docs, it is possible to have anDuncan Sands2008-07-141-11/+19
| | | | | | | | | | | extending load of a vector. Handle this case when splitting vector loads. I'm not completely sure what is supposed to happen, but I think it means hi should be set to undef. LegalizeDAG does not consider this case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53555 91177308-0d34-0410-b5e6-96231b3b80d8
* There should be no extending loads or truncatingDuncan Sands2008-07-141-4/+4
| | | | | | | | | stores of one-element vectors. Also, neaten the handling of INSERT_VECTOR_ELT when the inserted type is larger than the vector element type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53554 91177308-0d34-0410-b5e6-96231b3b80d8