summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Do not fold reload into an instruction with multiple uses. It issues one ↵Evan Cheng2007-11-301-75/+86
| | | | | | extra load. llvm-svn: 44467
* Provide a way to update DescGlobals cache directly.Devang Patel2007-11-301-0/+6
| | | | llvm-svn: 44446
* Do not lose rematerialization info when spilling already split live intervals.Evan Cheng2007-11-291-14/+9
| | | | llvm-svn: 44443
* Fix a major performance issue with splitting. If there is a def (not def/use)Evan Cheng2007-11-291-60/+133
| | | | | | | | | | | | | | | in the middle of a split basic block, create a new live interval starting at the def. This avoid artifically extending the live interval over a number of cycles where it is dead. e.g. bb1: = vr1204 (use / kill) <= new interval starts and ends here. ... ... vr1204 = (new def) <= start a new interval here. = vr1204 (use) llvm-svn: 44436
* Replace the odd kill# hack with something less fragile.Evan Cheng2007-11-293-16/+17
| | | | llvm-svn: 44434
* Fixed various live interval splitting bugs / compile time issues.Evan Cheng2007-11-293-157/+266
| | | | llvm-svn: 44428
* Kill info update bug.Evan Cheng2007-11-291-0/+3
| | | | llvm-svn: 44427
* Add some convenience methods for querying attributes, andDuncan Sands2007-11-281-12/+11
| | | | | | use them. llvm-svn: 44403
* Add missing newlines at EOF.Duncan Sands2007-11-281-1/+1
| | | | llvm-svn: 44399
* Recover compile time regression.Evan Cheng2007-11-283-86/+73
| | | | llvm-svn: 44386
* Add MachineLoopInfo. This is not yet tested.Owen Anderson2007-11-271-0/+41
| | | | llvm-svn: 44384
* Support returning non-power-of-2 vectors to unblock some workNate Begeman2007-11-271-0/+7
| | | | llvm-svn: 44371
* Fix PR1146: parameter attributes are longer part ofDuncan Sands2007-11-271-12/+10
| | | | | | | | | | | | the function type, instead they belong to functions and function calls. This is an updated and slightly corrected version of Reid Spencer's original patch. The only known problem is that auto-upgrading of bitcode files doesn't seem to work properly (see test/Bitcode/AutoUpgradeIntrinsics.ll). Hopefully a bitcode guru (who might that be? :) ) will fix it. llvm-svn: 44359
* err, no really.Chris Lattner2007-11-271-1/+1
| | | | llvm-svn: 44352
* don't depend on ADL.Chris Lattner2007-11-271-1/+1
| | | | llvm-svn: 44351
* Don't lower srem/urem X%C to X-X/C*C unless the division is actuallyDan Gohman2007-11-261-14/+18
| | | | | | | | | optimized. This avoids creating illegal divisions when the combiner is running after legalize; this fixes PR1815. Also, it produces better code in the included testcase by avoiding the subtract and multiply when the division isn't optimized. llvm-svn: 44341
* Implement expand support for MERGE_VALUEs that only produces one result.Chris Lattner2007-11-241-0/+4
| | | | llvm-svn: 44304
* Implement support for custom legalization in DAGTypeLegalizer::ExpandOperand.Chris Lattner2007-11-241-30/+43
| | | | | | | | Improve a comment. Unbreak Duncan's carefully written path compression where I didn't realize what was happening! llvm-svn: 44301
* Several changes:Chris Lattner2007-11-243-45/+118
| | | | | | | | | | | | | | | | | | | | | 1) Change the interface to TargetLowering::ExpandOperationResult to take and return entire NODES that need a result expanded, not just the value. This allows us to handle things like READCYCLECOUNTER, which returns two values. 2) Implement (extremely limited) support in LegalizeDAG::ExpandOp for MERGE_VALUES. 3) Reimplement custom lowering in LegalizeDAGTypes in terms of the new ExpandOperationResult. This makes the result simpler and fully general. 4) Implement (fully general) expand support for MERGE_VALUES in LegalizeDAGTypes. 5) Implement ExpandOperationResult support for ARM f64->i64 bitconvert and ARM i64 shifts, allowing them to work with LegalizeDAGTypes. 6) Implement ExpandOperationResult support for X86 READCYCLECOUNTER and FP_TO_SINT, allowing them to work with LegalizeDAGTypes. LegalizeDAGTypes now passes several more X86 codegen tests when enabled and when type legalization in LegalizeDAG is ifdef'd out. llvm-svn: 44300
* Fix a bug in which node A is replaced by node B, but laterDuncan Sands2007-11-211-7/+30
| | | | | | | | node A gets back into the DAG again because it was hiding in one of the node maps: make sure that node replacement happens in those maps too. llvm-svn: 44263
* Fix .eh table linkage issues on Darwin. Some EH supportDale Johannesen2007-11-201-7/+21
| | | | | | for Darwin PPC, but it's not fully working yet. llvm-svn: 44258
* ExpandUnalignedLoad doesn't handle vectors right at all apparently.Chris Lattner2007-11-191-8/+22
| | | | | | | | | | | | | | | Fix a couple of problems: 1. Don't assume the VT-1 is a VT that is half the size. 2. Treat vectors of FP in the vector path, not the FP path. This has a couple of remaining problems before it will work with the code in PR1811: the code below this change assumes that it can use extload/shift/or to construct the result, which isn't right for vectors. This also doesn't handle vectors of 1 or vectors that aren't pow-2. llvm-svn: 44243
* Implement vector expand support for shuffle_vector. This fixes PR1811.Chris Lattner2007-11-191-0/+35
| | | | llvm-svn: 44242
* Implement splitting of UNDEF nodes. This is the first step towards fixing PR1811Chris Lattner2007-11-191-0/+4
| | | | llvm-svn: 44239
* Add support in SplitVectorOp for remainder operators.Dan Gohman2007-11-191-1/+4
| | | | llvm-svn: 44233
* Add support for vectors to int <-> float casts.Nate Begeman2007-11-171-1/+5
| | | | llvm-svn: 44204
* Live interval splitting:Evan Cheng2007-11-176-139/+588
| | | | | | | | | | | | | | | | | | | When a live interval is being spilled, rather than creating short, non-spillable intervals for every def / use, split the interval at BB boundaries. That is, for every BB where the live interval is defined or used, create a new interval that covers all the defs and uses in the BB. This is designed to eliminate one common problem: multiple reloads of the same value in a single basic block. Note, it does *not* decrease the number of spills since no copies are inserted so the split intervals are *connected* through spill and reloads (or rematerialization). The newly created intervals can be spilled again, in that case, since it does not span multiple basic blocks, it's spilled in the usual manner. However, it can reuse the same stack slot as the previously split interval. This is currently controlled by -split-intervals-at-bb. llvm-svn: 44198
* Implement necessary bits for flt_rounds gcc builtin. Anton Korobeynikov2007-11-154-0/+24
| | | | | | Codegen bits and llvm-gcc support will follow. llvm-svn: 44182
* Basic non-power-of-2 vector supportNate Begeman2007-11-151-29/+37
| | | | llvm-svn: 44181
* This assertion was bogus.Duncan Sands2007-11-151-3/+2
| | | | llvm-svn: 44167
* Fix a thinko in post-allocation coalescer.Evan Cheng2007-11-151-3/+10
| | | | llvm-svn: 44166
* Adding debug output during coalescing.Bill Wendling2007-11-151-0/+1
| | | | llvm-svn: 44154
* Need to increment the iterator.Bill Wendling2007-11-151-1/+1
| | | | llvm-svn: 44153
* Fix PIC jump table codegen on x86-32/linux. In fact, such thing should be ↵Anton Korobeynikov2007-11-141-28/+41
| | | | | | | | applied to all targets uses GOT-relative offsets for PIC (Alpha?) llvm-svn: 44108
* Clean up sub-register implementation by moving subReg information back toEvan Cheng2007-11-144-38/+24
| | | | | | | | | | | MachineOperand auxInfo. Previous clunky implementation uses an external map to track sub-register uses. That works because register allocator uses a new virtual register for each spilled use. With interval splitting (coming soon), we may have multiple uses of the same register some of which are of using different sub-registers from others. It's too fragile to constantly update the information. llvm-svn: 44104
* Run computeDomForest() on the set of registers that need to be tested forOwen Anderson2007-11-131-5/+6
| | | | | | interference. llvm-svn: 44064
* Preserve LiveVariables when doing critical edge splitting.Owen Anderson2007-11-131-2/+13
| | | | llvm-svn: 44063
* Add parameter to getDwarfRegNum to permit targetsDale Johannesen2007-11-131-11/+11
| | | | | | | | to use different mappings for EH and debug info; no functional change yet. Fix warning in X86CodeEmitter. llvm-svn: 44056
* Unify CALLSEQ_{START,END}. They take 4 parameters: the chain, two stackBill Wendling2007-11-131-2/+23
| | | | | | | | | | | adjustment fields, and an optional flag. If there is a "dynamic_stackalloc" in the code, make sure that it's bracketed by CALLSEQ_START and CALLSEQ_END. If not, then there is the potential for the stack to be changed while the stack's being used by another instruction (like a call). This can only result in tears... llvm-svn: 44037
* Break critical edges coming into blocks with PHI nodes.Owen Anderson2007-11-121-0/+26
| | | | llvm-svn: 44019
* Refactor some code.Evan Cheng2007-11-123-297/+331
| | | | llvm-svn: 44010
* As Chris and Evan pointed out, BreakCriticalMachineEdges doesn't really needOwen Anderson2007-11-123-132/+1
| | | | | | to be a pass of its own. Instead, move it out into a helper method. llvm-svn: 44002
* Fixed a strange construct. Please review.Hartmut Kaiser2007-11-091-1/+1
| | | | llvm-svn: 43960
* Move MinAlign to MathExtras.h.Duncan Sands2007-11-093-3/+1
| | | | llvm-svn: 43944
* Fix some load/store logic that would be wrong forDuncan Sands2007-11-092-6/+10
| | | | | | | | apints on big-endian machines if the bitwidth is not a multiple of 8. Introduce a new helper, MVT::getStoreSizeInBits, and use it. llvm-svn: 43934
* Add terminating newline.Duncan Sands2007-11-091-1/+1
| | | | llvm-svn: 43933
* Much improved pic jumptable codegen:Evan Cheng2007-11-093-20/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Then: call "L1$pb" "L1$pb": popl %eax ... LBB1_1: # entry imull $4, %ecx, %ecx leal LJTI1_0-"L1$pb"(%eax), %edx addl LJTI1_0-"L1$pb"(%ecx,%eax), %edx jmpl *%edx .align 2 .set L1_0_set_3,LBB1_3-LJTI1_0 .set L1_0_set_2,LBB1_2-LJTI1_0 .set L1_0_set_5,LBB1_5-LJTI1_0 .set L1_0_set_4,LBB1_4-LJTI1_0 LJTI1_0: .long L1_0_set_3 .long L1_0_set_2 Now: call "L1$pb" "L1$pb": popl %eax ... LBB1_1: # entry addl LJTI1_0-"L1$pb"(%eax,%ecx,4), %eax jmpl *%eax .align 2 .set L1_0_set_3,LBB1_3-"L1$pb" .set L1_0_set_2,LBB1_2-"L1$pb" .set L1_0_set_5,LBB1_5-"L1$pb" .set L1_0_set_4,LBB1_4-"L1$pb" LJTI1_0: .long L1_0_set_3 .long L1_0_set_2 llvm-svn: 43924
* Didn't mean to check these in.Evan Cheng2007-11-092-14/+11
| | | | llvm-svn: 43923
* Bug fix. Passive nodes are not in SUnitMap.Evan Cheng2007-11-093-14/+20
| | | | llvm-svn: 43922
* This preserves critical edge breaking.Owen Anderson2007-11-081-0/+1
| | | | llvm-svn: 43911
OpenPOWER on IntegriCloud