aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Connect successors before creating the DAG node for the branch. This hasOwen Anderson2008-06-071-22/+24
| | | | | | | | no visible functionality change, but enables a future patch where node creation will update the CFG if it decides to create an unconditional rather than a conditional branch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52067 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable stack coloring by default.Evan Cheng2008-06-062-8/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52057 91177308-0d34-0410-b5e6-96231b3b80d8
* Tighten up the abstraction slightly.Duncan Sands2008-06-061-10/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52045 91177308-0d34-0410-b5e6-96231b3b80d8
* Wrap MVT::ValueType in a struct to get type safetyDuncan Sands2008-06-0616-1279/+1255
| | | | | | | | | | | | | | | | | and better control the abstraction. Rename the type to MVT. To update out-of-tree patches, the main thing to do is to rename MVT::ValueType to MVT, and rewrite expressions like MVT::getSizeInBits(VT) in the form VT.getSizeInBits(). Use VT.getSimpleVT() to extract a MVT::SimpleValueType for use in switch statements (you will get an assert failure if VT is an extended value type - these shouldn't exist after type legalization). This results in a small speedup of codegen and no new testsuite failures (x86-64 linux). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52044 91177308-0d34-0410-b5e6-96231b3b80d8
* Refine stack slot interval weight computation.Evan Cheng2008-06-062-23/+58
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52040 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove debugging code.Owen Anderson2008-06-051-4/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52016 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the newly created helper on LiveIntervals.Owen Anderson2008-06-051-116/+21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52013 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a helper for constructing new live ranges that ended from an instruction ↵Owen Anderson2008-06-051-0/+15
| | | | | | to the end of its MBB. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52012 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a memcpy lowering bug. Even though the memcpy alignment is smaller than ↵Evan Cheng2008-06-041-2/+3
| | | | | | the desired alignment, the frame destination alignment may still be larger than the desired alignment. Don't change its alignment to something smaller. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51970 91177308-0d34-0410-b5e6-96231b3b80d8
* Oops. Should not be enabled by default.Evan Cheng2008-06-041-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51953 91177308-0d34-0410-b5e6-96231b3b80d8
* Correctly construct live intervals for the copies we inserted into the ↵Owen Anderson2008-06-041-1/+38
| | | | | | predecessors of a block containing a PHI. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51950 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert this.Evan Cheng2008-06-041-4/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51949 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a stack slot coloring pass. Not yet enabled.Evan Cheng2008-06-046-38/+412
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51934 91177308-0d34-0410-b5e6-96231b3b80d8
* LowerSubregs should not clobber any analysis.Evan Cheng2008-06-041-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51933 91177308-0d34-0410-b5e6-96231b3b80d8
* Move #include to right place.Evan Cheng2008-06-042-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51932 91177308-0d34-0410-b5e6-96231b3b80d8
* Register if-converter pass for -debug-pass.Evan Cheng2008-06-041-1/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51931 91177308-0d34-0410-b5e6-96231b3b80d8
* Change packed struct layout so that field sizesDuncan Sands2008-06-041-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | are the same as in unpacked structs, only field positions differ. This only matters for structs containing x86 long double or an apint; it may cause backwards compatibility problems if someone has bitcode containing a packed struct with a field of one of those types. The issue is that only 10 bytes are needed to hold an x86 long double: the store size is 10 bytes, but the ABI size is 12 or 16 bytes (linux/ darwin) which comes from rounding the store size up by the alignment. Because it seemed silly not to pack an x86 long double into 10 bytes in a packed struct, this is what was done. I now think this was a mistake. Reserving the ABI size for an x86 long double field even in a packed struct makes things more uniform: the ABI size is now always used when reserving space for a type. This means that developers are less likely to make mistakes. It also makes life easier for the CBE which otherwise could not represent all LLVM packed structs (PR2402). Front-end people might need to adjust the way they create LLVM structs - see following change to llvm-gcc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51928 91177308-0d34-0410-b5e6-96231b3b80d8
* We need to subtract one from this index because live ranges are open at the end.Owen Anderson2008-06-041-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51922 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix spellnig errorScott Michel2008-06-031-6/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51917 91177308-0d34-0410-b5e6-96231b3b80d8
* Find a better place to output hex constants corresponding to integers.Scott Michel2008-06-031-0/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51904 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed bug in bad behavior in calculateFrameObjectOffsets,Bruno Cardoso Lopes2008-06-031-1/+2
| | | | | | | | the solution commited is different from the previous patch to avoid int and unsigned comparison git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51899 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not run loop-aligner at -fast (e.g. -O0).Evan Cheng2008-06-031-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51898 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert this patchScott Michel2008-06-031-3/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51897 91177308-0d34-0410-b5e6-96231b3b80d8
* Fold adds and subtracts of zero immediately, instead of waitingDan Gohman2008-06-021-4/+4
| | | | | | | for dagcombine to do this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51886 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor cosmetic patch so that the hex equivalent of a decimalScott Michel2008-06-021-1/+3
| | | | | | | | constant shows up in the assembly language output. Helps with debugging without a HP calculator having to be handy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51885 91177308-0d34-0410-b5e6-96231b3b80d8
* Add necessary 64-bit support so that gcc frontend compiles (mostly). CurrentScott Michel2008-06-021-1/+10
| | | | | | | | issue is operand promotion for setcc/select... but looks like the fundamental stuff is implemented for CellSPU. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51884 91177308-0d34-0410-b5e6-96231b3b80d8
* Correctly handle removed instructions at the beginning of MBBs when renumbering.Owen Anderson2008-06-021-12/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51876 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove an unused variable.Dan Gohman2008-05-311-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51807 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix indentation.Evan Cheng2008-05-301-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51793 91177308-0d34-0410-b5e6-96231b3b80d8
* The coalescer doesn't need LiveVariables now that we have register use ↵Owen Anderson2008-05-302-15/+6
| | | | | | iterators. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51790 91177308-0d34-0410-b5e6-96231b3b80d8
* Preserve the register coallescer, and update live intervals more correctly ↵Owen Anderson2008-05-301-1/+4
| | | | | | by triggering a renumbering after phi elimination. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51780 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove an unused variable.Dan Gohman2008-05-301-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51721 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the renumbering correct in the face of deleted instructions that have ↵Owen Anderson2008-05-291-7/+73
| | | | | | been removed from the LiveIntervals maps. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51714 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove <iostream>.Bill Wendling2008-05-291-2/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51704 91177308-0d34-0410-b5e6-96231b3b80d8
* Expand small memmovs using inline code. Set the X86 threshold for expandingDan Gohman2008-05-291-5/+73
| | | | | | | memmove to a more plausible value, now that it's actually being used. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51696 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert part of my last patch that I didn't intend to commit yet.Owen Anderson2008-05-291-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51694 91177308-0d34-0410-b5e6-96231b3b80d8
* Renumbering needs to account for instruction slot offsets when performing ↵Owen Anderson2008-05-291-7/+20
| | | | | | lookups in the index maps. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51691 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement vector shift up / down and insert zero with ps{rl}lq / ps{rl}ldq.Evan Cheng2008-05-291-3/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51667 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement "AsCheapAsAMove" for some obviously cheap instructions: xor and theBill Wendling2008-05-291-1/+4
| | | | | | | like. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51662 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a flag to indicate that an instruction is as cheap (or cheaper) than a moveBill Wendling2008-05-281-3/+3
| | | | | | | | | | instruction to execute. This can be used for transformations (like two-address conversion) to remat an instruction instead of generating a "move" instruction. The idea is to decrease the live ranges and register pressure and all that jazz. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51660 91177308-0d34-0410-b5e6-96231b3b80d8
* Check the "isSafeToMove" predicate, which has a series of tests to make sureBill Wendling2008-05-281-1/+3
| | | | | | | that it's safe to remat an instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51659 91177308-0d34-0410-b5e6-96231b3b80d8
* Remap VNInfo data as well when doing renumbering.Owen Anderson2008-05-281-0/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51658 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor the numbering computation into a separate method, and add the ↵Owen Anderson2008-05-281-11/+29
| | | | | | slightest attempt at some renumbering logic, which is currently unused. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51652 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR2289: vr defined by multiple implicit_def as result of coalescing.Evan Cheng2008-05-281-6/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51648 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach local register allocator to deal with landing pad MBB's.Evan Cheng2008-05-281-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51647 91177308-0d34-0410-b5e6-96231b3b80d8
* Incorporated feedback: Check that the implicitly defined operands aren't usedBill Wendling2008-05-271-9/+8
| | | | | | | before deleting the instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51609 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix some constructs that gcc-4.4 warns about.Duncan Sands2008-05-272-2/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51591 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51563 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51562 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 51440 as it breaks a bunch of PIC tests.Evan Cheng2008-05-231-3/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51513 91177308-0d34-0410-b5e6-96231b3b80d8