aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen
AgeCommit message (Collapse)AuthorFilesLines
2010-01-19Update CMake list.Benjamin Kramer1-1/+0
llvm-svn: 93905
2010-01-19Add some new debugging APIs to print out "raw" SelectionDAGs to makeDavid Greene2-29/+25
understanding CannotYTetSelect and other errors easier. llvm-svn: 93901
2010-01-19Generalize mcasmstreamer data emission APIs to take an address spaceChris Lattner1-13/+7
identifier. There is no way to work around it. llvm-svn: 93896
2010-01-19Do not extend extension results beyond the use of a PHI instruction at the ↵Evan Cheng1-0/+12
start of a use block. A PHI use is expected to kill its source values. llvm-svn: 93895
2010-01-19refactor code to be static functions instead of methods on AsmPrinter.Chris Lattner1-47/+39
This fixes some bugs handling address spaces. llvm-svn: 93891
2010-01-19mcstreamerize AsmPrinter::EmitZeros, at least when emitting to the Chris Lattner1-8/+6
default address space. llvm-svn: 93890
2010-01-19remove MAI::ZeroDirectiveSuffix, which is only used by MASM,Chris Lattner1-10/+6
which we don't support anymore. llvm-svn: 93886
2010-01-19For aligned load/store instructions, it's only required to know whether aJim Grosbach1-70/+0
function can support dynamic stack realignment. That's a much easier question to answer at instruction selection stage than whether the function actually will have dynamic alignment prologue. This allows the removal of the stack alignment heuristic pass, and improves code quality for cases where the heuristic would result in dynamic alignment code being generated when it was not strictly necessary. llvm-svn: 93885
2010-01-19mcstreamer'ize the rest of EmitGlobalVariable that is used on Chris Lattner1-6/+8
darwin. The next big piece to get global variables streamerized is EmitGlobalConstant. llvm-svn: 93870
2010-01-19stop using the .lcomm pseudoop on darwin, instead, directly use theChris Lattner1-9/+22
.zerofill directive. Streamerize its generation. llvm-svn: 93868
2010-01-19MDNodes are not expected to disappear or replaced by another MDNode, so ↵Devang Patel2-15/+16
there is no need to pay the cost of WeakVH and ValueMaps. llvm-svn: 93865
2010-01-19Avoid including DebugInfo.h in AsmPrinter.hDevang Patel2-2/+3
llvm-svn: 93864
2010-01-19mc'ize some stuff, don't comment out .lcomm directive in -fverbose-asm mode.Chris Lattner1-7/+4
llvm-svn: 93860
2010-01-19factor this code better.Chris Lattner1-21/+13
llvm-svn: 93859
2010-01-19Now that we have everything nicely factored (e.g. asmprinter is notChris Lattner1-2/+122
doing global variable classification anymore) and hookized, sink almost all target targets global variable emission code into AsmPrinter and out of each target. Some notes: 1. PIC16 does completely custom and crazy stuff, so it is not changed. 2. XCore has some custom handling for extra directives. I'll look at it next. 3. This switches linux/ppc to use .globl instead of .global. If .globl is actually wrong, let me know and I'll fix it. 4. This makes linux/ppc get a lot of random cases right which were obviously wrong before, it is probably now a bit healthier. 5. Blackfin will probably start getting .comm and other things that it didn't before. If this is undesirable, it should explicitly opt out of these things by clearing the relevant fields of MCAsmInfo. This leads to a nice diffstat: 14 files changed, 127 insertions(+), 830 deletions(-) llvm-svn: 93858
2010-01-19hoist handling of external globals and special globals up to common code.Chris Lattner1-1/+15
This makes a similar code dead in all the other targets, I'll clean it up in a bit. This also moves handling of lcomm up before acquisition of a section, since lcomm never needs a section. llvm-svn: 93851
2010-01-19move production of .reference directives for static ctor/dtor list onChris Lattner1-0/+8
darwin into common code. llvm-svn: 93849
2010-01-19Revert accident check-in from r93165.Devang Patel1-8/+6
llvm-svn: 93832
2010-01-19Revert 93811 per request.Dale Johannesen1-3/+0
llvm-svn: 93818
2010-01-18Enable code to emit dbg.declare as DEBUG_VALUEDale Johannesen1-0/+3
comments (fast isel, X86). This doesn't seem to break any functionality, but will introduce cases where -g affects the generated code. I'll be fixing that. llvm-svn: 93811
2010-01-18Canonicalize -1 - x to ~x.Evan Cheng1-0/+3
Instcombine does this but apparently there are situations where this pattern will escape the optimizer and / or created by isel. Here is a case that's seen in JavaScriptCore: %t1 = sub i32 0, %a %t2 = add i32 %t1, -1 The dag combiner pattern: ((c1-A)+c2) -> (c1+c2)-A will fold it to -1 - %a. llvm-svn: 93773
2010-01-18- Add a comment to the callback indicating that it's *extremely* not a goodBill Wendling1-1/+1
idea, but unfortunately necessary. - Default to using 4-bytes for the LSDA pointer encoding to agree with the encoded value in the CIE. llvm-svn: 93753
2010-01-18remove the MAI argument to MCExpr::print and switch overthing to use << when ↵Chris Lattner1-2/+1
printing them. llvm-svn: 93699
2010-01-17now that MCSymbol::print doesn't use it's MAI argument, we can Chris Lattner3-79/+41
remove it and change all the code that prints MCSymbols to use << instead, which is much simpler and cleaner. llvm-svn: 93695
2010-01-17now that mangler is in libtarget, it can use MCAsmInfo instead of clientsChris Lattner2-3/+2
having to pass various fields from it in. Simplify. llvm-svn: 93686
2010-01-17Switch some functions to take Twines, eliminate uses of StringExtras.h.Benjamin Kramer4-36/+16
llvm-svn: 93680
2010-01-17Add a note for the macho streamer and remove a used of the mangler from the ↵Nate Begeman1-6/+0
soon to be defunct machowriter pass. llvm-svn: 93670
2010-01-16When checking for sret-demotion, it needs to use legal types. When using ↵Kenneth Uildriks1-11/+41
the return value of an sret-demoted call, it needs to use possibly illegal types that match the declared Type of the callee. llvm-svn: 93667
2010-01-16move the mangler into libtarget from vmcore.Chris Lattner5-6/+6
llvm-svn: 93664
2010-01-16reapply the mangler gutting patch.Chris Lattner1-6/+0
llvm-svn: 93656
2010-01-16unbreak the build.Chris Lattner1-6/+0
llvm-svn: 93654
2010-01-16Revert 93648.Rafael Espindola1-0/+6
Mangler::getMangledName is used from lto Mangler::setUseQuotes is used in the AsmPrinter Mangler::setSymbolsCanStartWithDigit is used in the AsmPrinter llvm-svn: 93652
2010-01-16Mangler::getMangledName is now dead, remove it and all the other stuff in ↵Chris Lattner1-6/+0
Mangler that is now transitively dead. woo. llvm-svn: 93648
2010-01-16Change DIEObjectLabel to take an MCSymbol instead of std::string.Chris Lattner6-10/+23
llvm-svn: 93647
2010-01-16rename GetPrivateGlobalValueSymbolStub -> GetSymbolWithGlobalValueBase,Chris Lattner3-26/+45
and add an explicit ForcePrivate argument. Switch FunctionEHFrameInfo to be MCSymbol based instead of string based. llvm-svn: 93646
2010-01-16eliminate uses of getMangledName from AsmPrinter.cpp, last up is Chris Lattner1-5/+9
dwarf emission which is going to be more invasive. llvm-svn: 93645
2010-01-16No need to use WeakVH here.Devang Patel1-2/+1
llvm-svn: 93631
2010-01-16Replace DebugLocTuple with DILocation.Devang Patel4-32/+38
llvm-svn: 93630
2010-01-16remove a couple of actively incorrect uses of getMangledName.Chris Lattner1-4/+6
llvm-svn: 93627
2010-01-16Retrying r91337:Bill Wendling1-8/+19
The CIE says that the LSDA point in the FDE section is an "sdata4". That's fine, but we need it to actually be 4-bytes in the FDE for some platforms. Allow individual platforms to decide for themselves. llvm-svn: 93616
2010-01-16fix inverted conditionalChris Lattner1-1/+1
llvm-svn: 93614
2010-01-16CurrentFnName is now dead, remove it.Chris Lattner1-2/+1
llvm-svn: 93612
2010-01-16remove the string form of printVisibility.Chris Lattner1-20/+18
llvm-svn: 93609
2010-01-16Treat indirect branches specially only during pre-regalloc tail duplication,Bob Wilson1-13/+13
not during the later post-alloc tail duplication. llvm-svn: 93600
2010-01-16Run the pre-register allocation tail duplication pass by default. RemoveBob Wilson1-5/+3
the -pre-regalloc-taildup command-line option, and add a new -disable-early-taildup option. llvm-svn: 93597
2010-01-15supplement CurrentFnName with CurrentFnSym, which will eventuallyChris Lattner1-0/+1
replace it. Upgrade Alpha, Blackfin, and part of CellSPU to not use mangler anymore. CellSPU needs more invasive surgery. llvm-svn: 93589
2010-01-15add a version of AsmPrinter::printVisibility that takes an MCSymbol.Chris Lattner1-0/+17
llvm-svn: 93587
2010-01-15add another helperChris Lattner1-0/+11
llvm-svn: 93577
2010-01-15add a AsmPrinter::GetGlobalValueSymbol and GetExternalSymbolSymbolChris Lattner1-0/+16
helper method, use it to simplify some code. llvm-svn: 93575
2010-01-15Update CMake build.Ted Kremenek1-1/+0
llvm-svn: 93571