summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Back out r130862; it appears to be breaking bootstrap.Eli Friedman2011-05-041-43/+27
| | | | llvm-svn: 130867
* Teach MachineCSE how to do simple cross-block CSE involving physregs. This ↵Eli Friedman2011-05-041-27/+43
| | | | | | allows, for example, eliminating duplicate cmpl's on x86. Part of rdar://problem/8259436 . llvm-svn: 130862
* Producing a DW_FORM_addr for DW_AT_stmt_list is probably correct, butRafael Espindola2011-05-041-2/+2
| | | | | | | | | | | it is both inefficient and unexpected by dwarfdump. Change to a DW_FORM_data4. While in here, change the predicate name to reflect that the position is not really absolute (it is an offset), just that the linker needs a relocation. llvm-svn: 130846
* Rename -disable-physical-join to -join-physregs and invert it.Jakob Stoklund Olesen2011-05-041-4/+4
| | | | | | Physreg joining is still on by default, but I will turn it off shortly. llvm-svn: 130844
* Tighten up check for empty (i.e. no meaningful debug info) module. This ↵Devang Patel2011-05-041-15/+17
| | | | | | fixes dwarf-die2.c test case from gcc test suite. llvm-svn: 130842
* Even if the subprogram is going to use AT_specification, emit ↵Devang Patel2011-05-031-5/+5
| | | | | | DW_AT_MIPS_linkage_name. This helps gdb and fixes var-path-expr.exp regression reported by gdb testsuite. llvm-svn: 130794
* Gracefully handle invalid live ranges. Fix PR9831.Jakob Stoklund Olesen2011-05-033-0/+23
| | | | | | | | | | | | | | | | Register coalescing can sometimes create live ranges that end in the middle of a basic block without any killing instruction. When SplitKit detects this, it will repair the live range by shrinking it to its uses. Live range splitting also needs to know about this. When the range shrinks so much that it becomes allocatable, live range splitting fails because it can't find a good split point. It is paranoid about making progress, so an allocatable range is considered an error. The coalescer should really not be creating these bad live ranges. They appear when coalescing dead copies. llvm-svn: 130787
* If the front end has emitted llvm.dbg.cu and other debug info anchors (clang ↵Devang Patel2011-05-031-27/+49
| | | | | | does it now) then use them directly. This saves one scan of entire module, to collect debug info, which in turns saves few machine cycles at compile time. llvm-svn: 130759
* Other parts of the SelectionDAG framework assume that targets use their ↵Owen Anderson2011-05-021-1/+1
| | | | | | pointer type for vector indices. Make the vector unrolling code respect that. llvm-svn: 130733
* Handle <def,undef> in the second loop as well.Jakob Stoklund Olesen2011-05-021-1/+3
| | | | llvm-svn: 130718
* Use the PrintReg adaptor to correctly print live-in registers in debug output.Jakob Stoklund Olesen2011-05-021-17/+5
| | | | llvm-svn: 130715
* Only ignore <undef> use operands, keep the <def,undef> ops.Jakob Stoklund Olesen2011-05-021-1/+4
| | | | | | | | Def operands may also have an <undef> flag, but that just means that a sub-register redef doesn't actually read the super-register. For physical registers, it has no meaning. llvm-svn: 130714
* Emit debug info for global variables first.Devang Patel2011-05-021-5/+5
| | | | | | | | | | | | | This works around a limitation in gdb which is reported by following inherit.exp test failures from gdb testsuite. gdb.cp/inherit.exp: print g_vB.vB::vb gdb.cp/inherit.exp: print g_vB.vB::vx gdb.cp/inherit.exp: print g_vC.vC::vc gdb.cp/inherit.exp: print g_vC.vC::vx gdb.cp/inherit.exp: print g_vD.vB::vb ... llvm-svn: 130702
* Only produce the eh_frame section if we have at least one personality function.Rafael Espindola2011-05-021-7/+9
| | | | llvm-svn: 130692
* Minimize the slot indexes spanned by register ranges created when splitting.Jakob Stoklund Olesen2011-05-023-5/+13
| | | | | | | | | | | | | When an interfering live range ends at a dead slot index between two instructions, make sure that the inserted copy instruction gets a slot index after the dead ones. This makes it possible to avoid the interference. Ideally, there shouldn't be interference ending at a deleted instruction, but physical register coalescing can sometimes do that to sub-registers. This fixes PR9823. llvm-svn: 130687
* GCC uses a different encoding of pointers in the FDE when usingRafael Espindola2011-05-012-3/+3
| | | | | | -fno-dwarf2-cfi-asm. Implement the same behavior. llvm-svn: 130637
* When a physreg is live-in and live through a basic block, make sure its liveJakob Stoklund Olesen2011-04-301-1/+1
| | | | | | | | range covers the entire block. The live range can't be terminated at a random instruction. llvm-svn: 130619
* Avoid using stale entries form the sibling value map.Jakob Stoklund Olesen2011-04-301-5/+21
| | | | | | | This could happen when trying to use a value that had been eliminated after dead code elimination and folding loads. llvm-svn: 130597
* Use hysteresis for local live range splitting as well.Jakob Stoklund Olesen2011-04-301-4/+4
| | | | llvm-svn: 130596
* Add all the plumbing needed for MC to expand cfi to the old tables inRafael Espindola2011-04-301-0/+1
| | | | | | | the final assembly. It is the same technique used when targeting assemblers that don't support .loc. llvm-svn: 130587
* Update comment.Jakob Stoklund Olesen2011-04-301-2/+2
| | | | llvm-svn: 130582
* Use a greedy algorithm for allocating registers.Jakob Stoklund Olesen2011-04-301-3/+3
| | | | llvm-svn: 130568
* Print out the 'nontemporal' info on a store.Bill Wendling2011-04-291-0/+4
| | | | llvm-svn: 130562
* Make FastEmit_ri_ try a bit harder to succeed for supported operations; ↵Eli Friedman2011-04-291-2/+7
| | | | | | FastEmit_i can fail for non-Thumb2 ARM. Makes ARMSimplifyAddress work correctly, and reduces the number of fast-isel bailouts on non-Thumb ARM. llvm-svn: 130560
* Hoist MCLineEntry construction AsmPrinter so that anyone who derives from ↵Devang Patel2011-04-291-0/+3
| | | | | | | | AsmPrinter can have line number entries. PR 9810 llvm-svn: 130518
* The last hack for producing bit identical output with cfi on OS X.Rafael Espindola2011-04-291-0/+8
| | | | llvm-svn: 130504
* Change DwarfCFIException's member variables to track what it actuallyRafael Espindola2011-04-292-34/+38
| | | | | | emmits: .cfi_personality, .cfi_lsda and the moves. llvm-svn: 130503
* Factor some code to needsCFIMoves. Avoid printing moves when we don't have to.Rafael Espindola2011-04-292-4/+19
| | | | llvm-svn: 130501
* Teach dwarf writer to handle complex address expression for .debug_loc entries.Devang Patel2011-04-284-27/+84
| | | | | | | This fixes clang generated blocks' variables' debug info. Radar 9279956. llvm-svn: 130373
* Fix a silly mistake in r130338.Eli Friedman2011-04-281-1/+1
| | | | llvm-svn: 130360
* Remove unnecessary argument.Rafael Espindola2011-04-272-4/+3
| | | | llvm-svn: 130343
* Rename getPersonalityPICSymbol to getCFIPersonalitySymbol, document it, andRafael Espindola2011-04-272-16/+44
| | | | | | | | | | | | | | | | | | give it a bit more responsibility. Also implement it for MachO. If hacked to use cfi, 32 bit MachO will produce .cfi_personality 155, L___gxx_personality_v0$non_lazy_ptr and 64 bit will produce .cfi_presonality ___gxx_personality_v0 The general idea is that .cfi_personality gets passed the final symbol. It is up to codegen to produce it if using indirect representation (like 32 bit MachO), but it is up to MC to decide which relocations to create. llvm-svn: 130341
* Simplify handling of variables with complex address (i.e. blocks variables)Devang Patel2011-04-273-44/+32
| | | | llvm-svn: 130339
* Make the fast-isel code for literal 0.0 a bit shorter/faster, since 0.0 is ↵Eli Friedman2011-04-271-2/+6
| | | | | | common. rdar://problem/9303592 . llvm-svn: 130338
* Remove unused function.Eli Friedman2011-04-271-47/+0
| | | | llvm-svn: 130337
* Fix indentation.Rafael Espindola2011-04-271-21/+21
| | | | llvm-svn: 130331
* Revert r130178. It turned out to be not the optimal path to emit complex ↵Devang Patel2011-04-271-4/+3
| | | | | | location expressions. llvm-svn: 130326
* If converter was being too cute. It look for root BBs (which don't haveEvan Cheng2011-04-271-18/+3
| | | | | | | | | | successors) and use inverse depth first search to traverse the BBs. However that doesn't work when the CFG has infinite loops. Simply do a linear traversal of all BBs work just fine. rdar://9344645 llvm-svn: 130324
* Also add <imp-def> operands for defined and dead super-registers when rewriting.Jakob Stoklund Olesen2011-04-271-6/+15
| | | | | | | We cannot rely on the <imp-def> operands added by LiveIntervals in all cases as demonstrated by the test case. llvm-svn: 130313
* Add a safe-guard against repeated splitting for some rare cases.Jakob Stoklund Olesen2011-04-263-3/+43
| | | | | | | The number of blocks covered by a live range must be strictly decreasing when splitting, otherwise we can't allow repeated splitting. llvm-svn: 130249
* Be careful about scheduling nodes above previous calls. It increase usages ofEvan Cheng2011-04-262-1/+61
| | | | | | | | | | | | more callee-saved registers and introduce copies. Only allows it if scheduling a node above calls would end up lessen register pressure. Call operands also has added ABI restrictions for register allocation, so be extra careful with hoisting them above calls. rdar://9329627 llvm-svn: 130245
* Print the label if we will use it in debug_frame.Rafael Espindola2011-04-261-2/+5
| | | | llvm-svn: 130232
* Refactor code. Keep dwarf register operation selection logic at one place.Devang Patel2011-04-262-72/+66
| | | | llvm-svn: 130231
* Use the new TRI->getLargestLegalSuperClass hook to constrain register class ↵Jakob Stoklund Olesen2011-04-261-50/+29
| | | | | | | | | | inflation. This has two effects: 1. We never inflate to a larger register class than what the sub-target can handle. 2. Completely unconstrained virtual registers get the largest possible register class. llvm-svn: 130229
* Fast-isel support for simple inline asms.Dan Gohman2011-04-261-10/+31
| | | | llvm-svn: 130205
* don't emit the symbol name twice for local bss and commonChris Lattner2011-04-261-6/+0
| | | | | | | | | | | symbols. For example, don't emit: .comm _i,4,2 ## @i ## @i instead emit: .comm _i,4,2 ## @i llvm-svn: 130192
* Fix typoEvan Cheng2011-04-261-1/+1
| | | | llvm-svn: 130190
* Print all the moves at a given label instead of just the first one.Rafael Espindola2011-04-262-6/+6
| | | | | | Remove previous DwarfCFI hack. llvm-svn: 130187
* Let dwarf writer allocate extra space in the debug location expression. This ↵Devang Patel2011-04-261-3/+4
| | | | | | space, if requested, will be used for complex addresses of the Blocks' variables. llvm-svn: 130178
* Rename a local variable.Devang Patel2011-04-251-17/+21
| | | | llvm-svn: 130171
OpenPOWER on IntegriCloud