summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* add a new AsmPrinter::EmitFunctionEntryLabel virtual function,Chris Lattner2010-01-271-2/+9
| | | | | | | which allows targets to override function entry label emission. Use it to convert linux/ppc to use EmitFunctionHeader(). llvm-svn: 94667
* mcize label emission for functions.Chris Lattner2010-01-261-5/+5
| | | | llvm-svn: 94624
* use EmitLinkage for functions as well as globals. One outputChris Lattner2010-01-261-31/+4
| | | | | | | | | change is that we now use ".linkonce discard" for global variables instead of ".linkonce samesize". These should be the same, just less strict. If anyone is interested in mcizing MCSection for COFF targets, this should be easy to fix. llvm-svn: 94623
* pull linkage emission code out to a new EmitLinkage function.Chris Lattner2010-01-261-43/+46
| | | | llvm-svn: 94621
* rearrange some directives, no functionality change.Chris Lattner2010-01-261-3/+3
| | | | llvm-svn: 94620
* now that enough stuff is constified, move function header printingChris Lattner2010-01-261-1/+69
| | | | | | | logic up from X86 into the common code. The other targets will hopefully start using this soon. llvm-svn: 94614
* emit jump table an alias ".set" directives through MCStreamer as Chris Lattner2010-01-261-4/+8
| | | | | | | | | | | | assignments. .set x, a-b is the same as: x = a-b llvm-svn: 94596
* Eliminate SetDirective, and replace it with HasSetDirective.Chris Lattner2010-01-261-5/+5
| | | | | | | | | | | Default HasSetDirective to true, since most targets have it. The targets that claim to not have it probably do, or it is spelled differently. These include Blackfin, Mips, Alpha, and PIC16. All of these except pic16 are normal ELF targets, so they almost certainly have it. llvm-svn: 94585
* eliminate the TargetLowering::UsesGlobalOffsetTable bool, which isChris Lattner2010-01-261-8/+9
| | | | | | | subsumed by TargetLowering::getJumpTableEncoding(). Change uses of it to be more specific. llvm-svn: 94529
* Now that printPICJumpTableSetLabel is not overloaded,Chris Lattner2010-01-261-22/+18
| | | | | | | inline it into its only caller, allowing us to simplify it and hoist bits out of the loop. llvm-svn: 94528
* Move getJTISymbol from MachineJumpTableInfo to MachineFunction,Chris Lattner2010-01-261-3/+2
| | | | | | | | | | | | | | | | | | which is more convenient, and change getPICJumpTableRelocBaseExpr to take a MachineFunction to match. Next, move the X86 code that create a PICBase symbol to X86TargetLowering::getPICBaseSymbol from X86MCInstLower::GetPICBaseSymbol, which was an asmprinter specific library. This eliminates a 'gross hack', and allows us to implement X86ISelLowering::getPICJumpTableRelocBaseExpr which now calls it. This in turn allows us to eliminate the X86AsmPrinter::printPICJumpTableSetLabel method, which was the only overload of printPICJumpTableSetLabel. llvm-svn: 94526
* add a new MachineJumpTableInfo::getJTISymbol method,Chris Lattner2010-01-261-10/+8
| | | | | | use it to implement the default TargetLowering::getPICJumpTableRelocBaseExpr llvm-svn: 94523
* simplify asmprinter: only emit .set directives when entries haveChris Lattner2010-01-261-5/+7
| | | | | | | EK_LabelDifference32 kind and the target has .set support. Simplify X86AsmPrinter::printPICJumpTableSetLabel to make use of recent helpers. llvm-svn: 94518
* rename printPICJumpTableEntry -> EmitJumpTableEntry,Chris Lattner2010-01-261-19/+10
| | | | | | | make it private and non-virtual. It handles the non-pic case too, so just use it, simplifying EmitJumpTableInfo. llvm-svn: 94517
* add a new MachineBasicBlock::getSymbol method, replacingChris Lattner2010-01-261-14/+7
| | | | | | the AsmPrinter::GetMBBSymbol. llvm-svn: 94515
* make MachineFunction keep track of its ID and make Chris Lattner2010-01-261-2/+8
| | | | | | | | MachineFunctionAnalysis dole them out, instead of having AsmPrinter do both. Have the AsmPrinter::SetupMachineFunction method set the 'AsmPrinter::MF' variable. llvm-svn: 94509
* Add support for target-specific 32-bit custom-lowered Chris Lattner2010-01-261-5/+6
| | | | | | jump table entries. llvm-svn: 94505
* switch jump table entry emission to be based on EntryKindChris Lattner2010-01-261-16/+39
| | | | | | instead of magic variables. llvm-svn: 94500
* Rearrange handling of jump tables. Highlights:Chris Lattner2010-01-251-4/+5
| | | | | | | | | | | | | | | | | | 1. MachineJumpTableInfo is now created lazily for a function the first time it actually makes a jump table instead of for every function. 2. The encoding of jump table entries is now described by the MachineJumpTableInfo::JTEntryKind enum. This enum is determined by the TLI::getJumpTableEncoding() hook, instead of by lots of code scattered throughout the compiler that "knows" that jump table entries are always 32-bits in pic mode (for example). 3. The size and alignment of jump table entries is now calculated based on their kind, instead of at machinefunction creation time. Future work includes using the EntryKind in more places in the compiler, eliminating other logic that "knows" the layout of jump tables in various situations. llvm-svn: 94470
* eliminate redundant argument to EmitJumpTableInfoChris Lattner2010-01-251-2/+3
| | | | llvm-svn: 94464
* mcstreamerize gprel32 emission.Chris Lattner2010-01-251-2/+3
| | | | llvm-svn: 94452
* mcize the non-gprel cases of AsmPrinter::printPICJumpTableEntryChris Lattner2010-01-251-13/+13
| | | | llvm-svn: 94450
* handle the _set_ symbol with an MCSymbol.Chris Lattner2010-01-251-5/+12
| | | | llvm-svn: 94449
* rename MAI::PICJumpTableDirective to MAI::GPRel32Directive toChris Lattner2010-01-251-9/+7
| | | | | | make it clear what it is, instead of how it is used. llvm-svn: 94448
* pull the non-pic jump table case out of printPICJumpTableEntryChris Lattner2010-01-251-10/+13
| | | | | | | and MCize the non-pic case. Now printPICJumpTableEntry really is just about printing PIC entries. llvm-svn: 94446
* remove JumpTableDirective, it is always null.Chris Lattner2010-01-251-1/+2
| | | | llvm-svn: 94445
* sink an arm specific method out of asmprinter into the ARMAsmPrinter andChris Lattner2010-01-251-13/+0
| | | | | | rename it to avoid shadowing. llvm-svn: 94440
* mcstreamerize .file and .file. This also fixes an issue where theChris Lattner2010-01-251-46/+7
| | | | | | | normal form of .file would fail if the filename had a weird character in it. llvm-svn: 94437
* emit ELF .type directives through MCStreamer instead of doing it textually.Chris Lattner2010-01-251-7/+2
| | | | llvm-svn: 94436
* add a commentChris Lattner2010-01-251-0/+1
| | | | llvm-svn: 94417
* emit the .size directive for global variables on ELF throughChris Lattner2010-01-251-1/+1
| | | | | | mcstreamer. llvm-svn: 94416
* mcize lcomm, simplify .comm, extend both to support 64-bit sizes.Chris Lattner2010-01-231-2/+2
| | | | llvm-svn: 94299
* resolve a fixme: the "nonexecutable stack directive" is actuallyChris Lattner2010-01-231-5/+2
| | | | | | | | | a .section. Switch to it with SwitchSection. However, I think that this directive should be safe on any ELF target. If so, we should hoist it up out of the X86 and SystemZ targets. llvm-svn: 94298
* mcize visibility directives.Chris Lattner2010-01-231-8/+14
| | | | llvm-svn: 94295
* move the various directive enums out of the MCStreamer classChris Lattner2010-01-231-14/+14
| | | | | | into a new MCDirectives.h file. llvm-svn: 94294
* Change constantexpr global variable initializers to convert the constantsChris Lattner2010-01-231-116/+71
| | | | | | | to MCExpr then emit them through MCStreamer with EmitValue. I think all global variable initializers are now going through mcstreamer. llvm-svn: 94293
* mcstreamerize .no_dead_strip and .reference for static ctors/dtors.Chris Lattner2010-01-231-14/+17
| | | | llvm-svn: 94290
* mcize jump table and constant pool entry labels, .local on elf,Chris Lattner2010-01-231-29/+45
| | | | | | and some .weak directives. llvm-svn: 94284
* emit .ascii and .asciz through MCStreamer.Chris Lattner2010-01-231-34/+12
| | | | llvm-svn: 94282
* remove one form of EmitString, just use EmitBytes instead. We mustChris Lattner2010-01-231-23/+0
| | | | | | | be careful to add a \0 at the end though, because EmitString didn't do this. llvm-svn: 94277
* move "EOL" from asmprinter to dwarfprinter. It should eventuallyChris Lattner2010-01-221-10/+0
| | | | | | be completely eliminated, but today is not that day. llvm-svn: 94253
* move uleb printing from asmprinter to dwarfprinter, mcize,Chris Lattner2010-01-221-29/+0
| | | | | | cleanup and eliminate a bunch more uses of "EOL". llvm-svn: 94250
* move sleb printing out of asmprinter into dwarf printer, make clientsChris Lattner2010-01-221-30/+1
| | | | | | handle the comment better, MCize the non-.sleb case. llvm-svn: 94244
* add a new DwarfPrinter::EmitEncodingByte method which handlesChris Lattner2010-01-221-50/+0
| | | | | | | | | | | | | | pretty printing encoding comments and eliminates redundancy on the client side. We now get pretty dwarf like this again: .byte 255 ## @LPStart Encoding = omit .byte 0 ## @TType Encoding = absptr .byte 0x28 ## @TType base offset .byte 3 ## Call site Encoding = udata4 .byte 0x1a ## Call site table size ... llvm-svn: 94239
* inline away the trivial AsmPrinter::EOL() method.Chris Lattner2010-01-221-4/+0
| | | | llvm-svn: 94230
* inline AsmPrinter::PrintHex into its two trivial callers.Chris Lattner2010-01-221-9/+4
| | | | llvm-svn: 94228
* change this to be a static function instead of a method on asmprinter.Chris Lattner2010-01-221-66/+68
| | | | llvm-svn: 94227
* make the loop comment printer print out a much better structuredChris Lattner2010-01-221-15/+23
| | | | | | | | | | | | | output. An example: .align 4, 0x90 LBB1_5: ## %while.cond3 ## Parent Loop BB1_1 Depth=1 ## => This Loop Header: Depth=2 ## Child Loop BB1_8 Depth 3 ## Child Loop BB1_6 Depth 3 llvm-svn: 94225
* For blocks that are not loop headers, just print their loop depth and header BB.Chris Lattner2010-01-221-13/+16
| | | | | | | | | | | | | | | | | | | | | | For loop headers, print Inner loop along with the other stuff so it doesn't take an extra line. We now get stuff like this: LBB1_4: ## %land.end ## in Loop: Header=BB1_1 Depth=1 notb %al testb $1, %al jne LBB1_8 and: LBB1_6: ## %while.cond7 ## Inner Loop Header: Depth=3 ## Inside Loop BB1_5 Depth 2 ## Inside Loop BB1_1 Depth 1 which still isn't great for loop headers, but is much less verbose. llvm-svn: 94221
* reenable the label loop comments and switch them to use the formattedChris Lattner2010-01-221-67/+40
| | | | | | | comment emission stuff. I'm going to rewrite this though because the current output doesn't make sense. llvm-svn: 94215
OpenPOWER on IntegriCloud