summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* DAGCombiner: fix use-counting issue when forming zextloadTim Northover2013-07-021-1/+1
| | | | | | | | | | DAGCombiner was counting all uses of a load node when considering whether it's worth combining into a zextload. Really, it wants to ignore the chain and just count real uses. rdar://problem/13896307 llvm-svn: 185419
* PR14728: DebugInfo: TLS variables with -gsplit-dwarfDavid Blaikie2013-07-013-17/+26
| | | | llvm-svn: 185398
* Tweak some comments that referred to the old bias computations.Jakob Stoklund Olesen2013-07-011-13/+13
| | | | llvm-svn: 185395
* Remove floating point computations form SpillPlacement.cpp.Jakob Stoklund Olesen2013-07-012-69/+67
| | | | | | | | | | | | | | | | | | Patch by Benjamin Kramer! Use the BlockFrequency class instead of floats in the Hopfield network computations. This rescales the node Bias field from a [-2;2] float range to two block frequencies BiasN and BiasP pulling in opposite directions. This construct has a more predictable behavior when block frequencies saturate. The per-node scaling factors are no longer necessary, assuming the block frequencies around a bundle are consistent. This patch can cause the register allocator to make different spilling decisions. The differences should be small. llvm-svn: 185393
* PR16493: DebugInfo with TLS on PPC crashing due to invalid relocationDavid Blaikie2013-07-011-4/+0
| | | | | | | | Restrict the current TLS support to X86 ELF for now. Test that we don't produce it on PPC & we can flesh that test case out with the right thing once someone implements it. llvm-svn: 185389
* Make PBQP require/preserve MachineLoopInfo - the spiller requires it.Lang Hames2013-07-011-0/+3
| | | | llvm-svn: 185378
* Fix the build after r185363. Use llvm::next instead of raw next.Cameron Zwarich2013-07-011-1/+1
| | | | llvm-svn: 185367
* Fix PR16508.Cameron Zwarich2013-07-011-4/+8
| | | | | | | | | | | | When phis get lowered, destination copies are inserted using an iterator that is determined once for all phis in the block, which BuildMI interprets as a request to insert an instruction directly before the iterator. In the case of a cyclic phi, source copies may also be inserted directly before this iterator, which can cause source copies to be inserted before destination copies. The fix is to keep an iterator to the last phi and then advance it while lowering each phi in order to insert destination copies directly after the phis. llvm-svn: 185363
* Added c++ mode selector to head of SelectionDAGBuilder.h so editors open it ↵Michael Gottesman2013-07-011-1/+1
| | | | | | in c++ mode instead of c mode. llvm-svn: 185348
* misched: Compress pairs returned by getUnderlyingObjectsForInstr.Benjamin Kramer2013-06-291-12/+15
| | | | llvm-svn: 185266
* DebugInfo: PR14728: TLS supportDavid Blaikie2013-06-282-3/+22
| | | | | | | | | | | | | | Based on GCC's output for TLS variables (OP_constNu, x@dtpoff, OP_lo_user), this implements debug info support for TLS in ELF. Verified that this output is correct/sufficient on Linux (using gold - if you're using binutils-ld, you'll need something with the fix for http://sourceware.org/bugzilla/show_bug.cgi?id=15685 in it). Support on non-ELF is sort of "arbitrary" at the moment - if Apple folks want to discuss (or just go ahead & implement) how this should work in MachO, etc, I'm open. llvm-svn: 185203
* DebugInfo: Pass MCSymbolRefExprs for labels instead of MCSymbolsDavid Blaikie2013-06-285-13/+26
| | | | | | | This is a precursor to adding debug info support for TLS which requires non-default relocations applied to TLS symbols. llvm-svn: 185202
* DebugInfo: Revise r185189 to avoid subtle 'unsigned += bool'David Blaikie2013-06-281-1/+2
| | | | llvm-svn: 185190
* DebugInfo: Simplify the AddressPool representationDavid Blaikie2013-06-282-18/+12
| | | | llvm-svn: 185189
* DebugInfo: constify the AddressPool MCSymbol pointersDavid Blaikie2013-06-282-12/+13
| | | | llvm-svn: 185188
* Add missing case to switch statement - DAGTypeLegalizer::ExpandIntegerResultLang Hames2013-06-281-1/+2
| | | | | | | | | | | | should expand ATOMIC_CMP_SWAP nodes the same way that it does for ATOMIC_SWAP. Since ATOMIC_LOADs on some targets (e.g. older ARM variants) get legalized to ATOMIC_CMP_SWAPs, the missing case had been causing i64 atomic loads to crash during isel. <rdar://problem/14074644> llvm-svn: 185186
* Debug Info: clean up usage of Verify.Manman Ren2013-06-285-6/+22
| | | | | | | | | | | No functionality change. It should suffice to check the type of a debug info metadata, instead of calling Verify. For cases where we know the type of a DI metadata, use assert. Also update testing cases to make them conform to the format of DI classes. llvm-svn: 185135
* Remove unused variable.Benjamin Kramer2013-06-271-2/+0
| | | | llvm-svn: 185072
* Fixed a comment.Elena Demikhovsky2013-06-261-2/+2
| | | | llvm-svn: 184933
* Optimized integer vector multiplication operation by replacing it with ↵Elena Demikhovsky2013-06-261-20/+59
| | | | | | shift/xor/sub when it is possible. Fixed a bug in SDIV, where the const operand is not a splat constant vector. llvm-svn: 184931
* Remove unused code. No functionality change.Manman Ren2013-06-251-4/+0
| | | | llvm-svn: 184866
* BlockFrequency: Bump up the entry frequency a bit.Benjamin Kramer2013-06-251-5/+0
| | | | | | | This is a band-aid to fix the most severe regressions we're seeing from basing spill decisions on block frequencies, until we have a better solution. llvm-svn: 184835
* 80-column and tab character fixes.Eric Christopher2013-06-243-5/+8
| | | | llvm-svn: 184792
* Formatting.Eric Christopher2013-06-241-3/+2
| | | | llvm-svn: 184788
* Use const references instead of pointers to references that areEric Christopher2013-06-242-21/+23
| | | | | | never modified. No functional change. llvm-svn: 184781
* Fix tail merging to assign the (more) correct BasicBlock when splitting.Andrew Trick2013-06-242-5/+14
| | | | | | | | | | | This makes it possible to write unit tests that are less susceptible to minor code motion, particularly copy placement. block-placement.ll covers this case with -pre-RA-sched=source which will soon be default. One incorrectly named block is already fixed, but without this fix, enabling new coalescing and scheduling would cause more failures. llvm-svn: 184680
* DebugInfo: PR14404: Avoid truncating 64 bit values into 32 bits for ↵David Blaikie2013-06-231-2/+2
| | | | | | ULEB128/SLEB128 generation llvm-svn: 184669
* DebugInfo: Support (using GNU extensions) for template template parameters ↵David Blaikie2013-06-221-2/+11
| | | | | | and parameter packs llvm-svn: 184643
* The getRegForInlineAsmConstraint function should only accept MVT value types.Chad Rosier2013-06-221-1/+1
| | | | llvm-svn: 184642
* Prevent LiveRangeEdit from deleting bundled instructions.Andrew Trick2013-06-221-0/+4
| | | | | | | | | We have no targets on trunk that bundle before regalloc. However, we have been advertising regalloc as bundle safe for use with out-of-tree targets. We need to at least contain the parts of the code that are still unsafe. llvm-svn: 184620
* DebugInfo: Don't lose unreferenced non-trivial by-value parametersDavid Blaikie2013-06-211-6/+4
| | | | | | | | | | | | A FastISel optimization was causing us to emit no information for such parameters & when they go missing we end up emitting a different function type. By avoiding that shortcut we not only get types correct (very important) but also location information (handy) - even if it's only live at the start of a function & may be clobbered later. Reviewed/discussion by Evan Cheng & Dan Gohman. llvm-svn: 184604
* Fix PR16360Michael Liao2013-06-211-3/+5
| | | | | | | When (srl (anyextend x), c) is folded into (anyextend (srl x, c)), the high bits are not cleared. Add 'and' to clear off them. llvm-svn: 184575
* Update physreg live intervals during remat.Andrew Trick2013-06-211-0/+28
| | | | llvm-svn: 184574
* Added -precompute-phys-liveness for testing LiveIntervals updates.Andrew Trick2013-06-211-0/+14
| | | | llvm-svn: 184573
* Handle more cases in LiveRangeEdit::eliminateDeadDefs.Andrew Trick2013-06-211-0/+9
| | | | | | | | | | Live intervals for dead physregs may be created during coalescing. We need to update these in the event that their instruction goes away. crash.ll is the unit test that catches it when MI sched is enabled on X86. llvm-svn: 184572
* Refactor LiveRangeEdit::eliminateDeadDefs.Andrew Trick2013-06-211-95/+95
| | | | | | I want to add logic to handle more cases. llvm-svn: 184571
* whitespaceAndrew Trick2013-06-211-2/+2
| | | | llvm-svn: 184570
* Fix a -join-globalcopies bug; handle undef operands.Andrew Trick2013-06-211-0/+3
| | | | llvm-svn: 184569
* Modify the -join-globalcopies option (off by default).Andrew Trick2013-06-211-2/+2
| | | | | | | Always coalesce in forward order to propagate rematerialization. I'm fixing this option so I can enable it by default soon. llvm-svn: 184568
* Make rematerialization in the coalescer less sensitive to LRG order.Andrew Trick2013-06-211-4/+15
| | | | llvm-svn: 184567
* MI-Sched: cleanup DEBUG output.Andrew Trick2013-06-211-5/+6
| | | | llvm-svn: 184565
* MI-Sched: Adjust regpressure limits for reserved regs.Andrew Trick2013-06-213-6/+39
| | | | llvm-svn: 184564
* DebugInfo: don't use location lists when the location covers the whole ↵David Blaikie2013-06-203-9/+12
| | | | | | | | | | | | | function anyway Fix up three tests - one that was relying on abbreviation number, another relying on a location list in this case (& testing raw asm, changed that to use dwarfdump on the debug_info now that that's where the location is), and another which was added in r184368 - exposing a bug in that fix that is exposed when we emit the location inline rather than through a location list. Fix that bug while I'm here. llvm-svn: 184387
* This is now a duplicate.Bill Wendling2013-06-191-26/+0
| | | | llvm-svn: 184376
* Make the comparison operators non-member functions.Bill Wendling2013-06-191-2/+2
| | | | llvm-svn: 184373
* DebugInfo: PR14763/r183329 correct the location of indirect parametersDavid Blaikie2013-06-192-7/+10
| | | | | | | | | | | | | | | | We had been papering over a problem with location info for non-trivial types passed by value by emitting their type as references (this caused the debugger to interpret the location information correctly, but broke the type of the function). r183329 corrected the type information but lead to the debugger interpreting the pointer parameter as the value - the debug info describing the location needed an extra dereference. Use a new flag in DIVariable to add the extra indirection (either by promoting an existing DW_OP_reg (parameter passed in a register) to DW_OP_breg + 0 or by adding DW_OP_deref to an existing DW_OP_breg + n (parameter passed on the stack). llvm-svn: 184368
* Access the TargetLoweringInfo from the TargetMachine object instead of ↵Bill Wendling2013-06-194-236/+289
| | | | | | caching it. The TLI may change between functions. No functionality change. llvm-svn: 184360
* Access the TargetLoweringInfo from the TargetMachine object instead of ↵Bill Wendling2013-06-191-2/+2
| | | | | | caching it. The TLI may change between functions. No functionality change. llvm-svn: 184352
* Access the TargetLoweringInfo from the TargetMachine object instead of ↵Bill Wendling2013-06-196-39/+49
| | | | | | caching it. The TLI may change between functions. No functionality change. llvm-svn: 184349
* Don't cache the TLI object since we have access to it through TargetMachine ↵Bill Wendling2013-06-191-6/+8
| | | | | | already. llvm-svn: 184346
OpenPOWER on IntegriCloud