summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* 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
* In option typo correction, consider -foo=VALUE flags as two distinct parts. TheNick Lewycky2011-05-021-5/+12
| | | | | | | | | | comments claimed it did this, but the LHS value was actually an unused variable. The new system considers only the '-foo' part when comparing it for typos against flags that have values, but still look at the whole string for flags that don't. That way, we'll still correct '-inst=combine' to '-instcombine'. llvm-svn: 130685
* Remove dead variable pointed out by GCC 4.6 warnings, and reflow this a littleNick Lewycky2011-05-021-4/+1
| | | | | | to scope a variable more tightly per llvm coding style. No functional change. llvm-svn: 130684
* enhance memcpyopt to obey -fno-builtin and friends. This addresses aChris Lattner2011-05-011-0/+17
| | | | | | problem reported on cfe-dev. llvm-svn: 130661
* Add r130623 back now that ELF has been fixed to work with -fno-dwarf2-cfi-asm.Rafael Espindola2011-05-012-1/+4
| | | | llvm-svn: 130658
* Windows/DynamicLibrary.inc: Clean up ELM_Callback. We may check the decl ↵NAKAMURA Takumi2011-05-011-31/+2
| | | | | | | | | instead of the versions of individual libraries. autoconf: Add checking ELM_Callback decl for mingw32 and mingw-w64. cmake/config-ix.cmake: Add checking ELM_Callback decl for win32. llvm-svn: 130657
* Remove an unused variable from this function introduced in r130637,Chandler Carruth2011-05-011-1/+0
| | | | | | likely a result of copy/paste. llvm-svn: 130640
* GCC uses a different encoding of pointers in the FDE when usingRafael Espindola2011-05-018-18/+32
| | | | | | -fno-dwarf2-cfi-asm. Implement the same behavior. llvm-svn: 130637
* I forgot these files in the previous commit.Rafael Espindola2011-05-012-0/+2
| | | | llvm-svn: 130635
* Simplify the handling of pcrel relocations on ELF. Now we do the right thingRafael Espindola2011-05-0110-54/+37
| | | | | | | | | | for all symbol differences and can drop the old EmitPCRelSymbolValue method. This also make getExprForFDESymbol on ELF equal to the one on MachO, and it can be made non-virtual. llvm-svn: 130634
* Revert the previous patch while I figure out how to make llvm-gccRafael Espindola2011-04-303-7/+1
| | | | | | less agressive about disabling cfi on linux :-( llvm-svn: 130626
* X86AsmPrinter doesn't know how to handle the X86II::MO_GOT_ABSOLUTE_ADDRESS flagJakob Stoklund Olesen2011-04-301-0/+12
| | | | | | | | | | | | | | after folding ADD32ri to ADD32mi, so don't do that. This only happens when the greedy register allocator gets itself in trouble and spills %vreg9 here: 16L %vreg9<def> = MOVPC32r 0, %ESP<imp-use>; GR32:%vreg9 48L %vreg9<def> = ADD32ri %vreg9, <es:_GLOBAL_OFFSET_TABLE_>[TF=1], %EFLAGS<imp-def,dead>; GR32:%vreg9 That should never happen, the live range should be split instead. llvm-svn: 130625
* Enable CFI on OS X.Rafael Espindola2011-04-303-1/+7
| | | | | | | | | | | | | | | Currently the output should be almost identical to the one produced by CodeGen to make the transition easier. The only two differences I know of are: * Some files get an extra advance loc of size 0. This will be fixed when relaxations are enabled. * The optimization of declaring an EH symbol as an external variable is not implemented. This is a subset of adding the nounwind attribute, so we if really this at -O0 we should probably do it at the IL level. llvm-svn: 130623
* 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
* InstCombine: Turn (zext A) udiv (zext B) into (zext (A udiv B)). Same for ↵Benjamin Kramer2011-04-301-1/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | urem or constant B. This obviously helps a lot if the division would be turned into a libcall (think i64 udiv on i386), but div is also one of the few remaining instructions on modern CPUs that become more expensive when the bitwidth gets bigger. This also helps register pressure on i386 when dividing chars, divb needs two 8-bit parts of a 16 bit register as input where divl uses two registers. int foo(unsigned char a) { return a/10; } int bar(unsigned char a, unsigned char b) { return a/b; } compiles into (x86_64) _foo: imull $205, %edi, %eax shrl $11, %eax ret _bar: movzbl %dil, %eax divb %sil, %al movzbl %al, %eax ret llvm-svn: 130615
* Use SimplifyDemandedBits on div instructions.Benjamin Kramer2011-04-301-0/+4
| | | | | | This folds away silly stuff like (a&255)/1000 -> 0. llvm-svn: 130614
* Implement MCAsmStreamer::EmitEHSymAttributes. Doing this in the asm streamerRafael Espindola2011-04-301-3/+31
| | | | | | | is a bit ugly, but doing it on the base MCStreamer would be redundant with the object streamer which does it using SD. llvm-svn: 130611
* Handle PrivateExtern eh symbols.Rafael Espindola2011-04-301-0/+2
| | | | llvm-svn: 130609
* 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-305-6/+49
| | | | | | | the final assembly. It is the same technique used when targeting assemblers that don't support .loc. llvm-svn: 130587
* Implement MCAsmStreamer::EmitDwarfAdvanceFrameAddr.Rafael Espindola2011-04-303-22/+34
| | | | llvm-svn: 130585
* 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
* 80-col.Eric Christopher2011-04-291-8/+9
| | | | llvm-svn: 130558
* Zap a couple now-unused functions.Eli Friedman2011-04-291-10/+0
| | | | llvm-svn: 130557
* Switch to ImmLeaf (which can be used by FastISel) for a few more common ↵Eli Friedman2011-04-293-2/+7
| | | | | | ARM/Thumb2 patterns. llvm-svn: 130552
* Assing line number info to new PHIs created by SSA updater.Devang Patel2011-04-292-0/+17
| | | | llvm-svn: 130551
* Add FastEmitInst_ii for the arm fast isel generator. It doesn't use it, butEric Christopher2011-04-291-0/+23
| | | | | | if it ever did it needs the def machinery. llvm-svn: 130549
* Some cleanup and optimize fallthrough more.Eric Christopher2011-04-291-8/+13
| | | | llvm-svn: 130546
* Avoid some uses of .uleb128. This is a small speedup and more importantlyRafael Espindola2011-04-291-17/+22
| | | | | | | lets this code be used when producing assembly code for old assemblers without uleb support. llvm-svn: 130544
* Implement MCAsmStreamer::EmitCFIDefCfa.Rafael Espindola2011-04-291-1/+4
| | | | llvm-svn: 130543
* Print new instructions without DebugLoc.Devang Patel2011-04-291-0/+9
| | | | llvm-svn: 130542
* Re-committing r130454, which does not in fact break anything.Eli Friedman2011-04-291-19/+2
| | | | | | | Fix a rather obscure crash caused by ARM fast-isel generating code which redefines a register. rdar://problem/9338332 . llvm-svn: 130539
* Preserve line number information.Devang Patel2011-04-291-1/+2
| | | | llvm-svn: 130536
* Add trunc->branch support, this won't help with clang's i8->i1 truncationsEric Christopher2011-04-291-1/+24
| | | | | | for bools, but is a start. llvm-svn: 130534
* SimplifyCFG: Expose phi node folding cost threshold as command line parameterPeter Collingbourne2011-04-291-1/+6
| | | | llvm-svn: 130528
* SimplifyCFG: Add CostRemaining parameter to DominatesMergePointPeter Collingbourne2011-04-291-9/+38
| | | | llvm-svn: 130527
* SimplifyCFG: Add Trunc, ZExt and SExt to the list of cheap instructions for ↵Peter Collingbourne2011-04-291-0/+3
| | | | | | phi node folding llvm-svn: 130526
* MCAsmLayout: Add support for computing the symbol offset of variables. NotDaniel Dunbar2011-04-291-0/+27
| | | | | | currently used, because variables don't get reported as being "defined". llvm-svn: 130524
* MC: Change variable symbols to be recognized as defined, by assigning their ↵Daniel Dunbar2011-04-291-3/+7
| | | | | | sections based on FindAssociatedSection(). llvm-svn: 130523
* MC/Mach-O: Update getSymbolAddress() to support evaluation of variables.Daniel Dunbar2011-04-291-0/+27
| | | | llvm-svn: 130522
* MC/Mach-O: Allow emission of relocations for variables in some more cases.Daniel Dunbar2011-04-291-19/+19
| | | | llvm-svn: 130520
* MC/Mach-O: Find section ordinal's by looking at the symbol, instead of ↵Daniel Dunbar2011-04-291-4/+8
| | | | | | assuming they are present in a fragment. llvm-svn: 130519
* Hoist MCLineEntry construction AsmPrinter so that anyone who derives from ↵Devang Patel2011-04-292-3/+3
| | | | | | | | AsmPrinter can have line number entries. PR 9810 llvm-svn: 130518
* MCExpr: Add FindAssociatedSection, which attempts to mirror the 'as' semanticsDaniel Dunbar2011-04-292-0/+45
| | | | | | that associate sections with expressions. llvm-svn: 130517
* MC/AsmParser: Generalize a check.Daniel Dunbar2011-04-291-1/+1
| | | | llvm-svn: 130515
* Fix a C++0x portability issue with std::make_pair. Explicitly providing ↵Douglas Gregor2011-04-291-1/+1
| | | | | | template arguments no longer works when the call arguments are lvalues. llvm-svn: 130513
OpenPOWER on IntegriCloud