summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* mcstreamerize AsmPrinter::printLabel.Chris Lattner2010-03-091-4/+8
| | | | llvm-svn: 98025
* add a EmitSymbolValue convenience method to MCStreamer.Chris Lattner2010-03-091-3/+1
| | | | llvm-svn: 98017
* move .set generation out of DwarfPrinter into AsmPrinter and Chris Lattner2010-03-081-1/+28
| | | | | | MCize it. llvm-svn: 98010
* Avoid using DIDescriptor.isNull(). Devang Patel2010-03-081-2/+2
| | | | | | This is a first step towards eliminating checks in Descriptor constructors. llvm-svn: 97975
* Revert r97947.Devang Patel2010-03-081-2/+2
| | | | llvm-svn: 97963
* Avoid using DIDescriptor.isNull().Devang Patel2010-03-081-2/+2
| | | | | | This is a first step towards eliminating unncessary constructor checks in light weight DIDescriptor wrappers. llvm-svn: 97947
* use OutStreamer.EmitCodeAlignment for alignment in the textChris Lattner2010-02-231-4/+3
| | | | | | segment. llvm-svn: 96967
* move isOnlyReachableByFallthrough out of MachineBasicBlock into AsmPrinter,Chris Lattner2010-02-171-1/+34
| | | | | | | and add a sparc implementation that knows about delay slots. Patch by Nathan Keynes! llvm-svn: 96492
* Fix "the the" and similar typos.Dan Gohman2010-02-101-1/+1
| | | | llvm-svn: 95781
* fix a layering violation: VirtRegRewriter.cpp shouldn't use AsmPrinter.h.Chris Lattner2010-02-101-1/+1
| | | | llvm-svn: 95748
* Move verbose asm instruction comments to using MCStreamer.Chris Lattner2010-02-101-74/+61
| | | | | | | | | | | | The major win of this is that the code is simpler and they print on the same line as the instruction again: movl %eax, 96(%esp) ## 4-byte Spill movl 96(%esp), %eax ## 4-byte Reload cmpl 92(%esp), %eax ## 4-byte Folded Reload jl LBB7_86 llvm-svn: 95738
* print all the newlines at the end of instructions withChris Lattner2010-02-101-4/+6
| | | | | | OutStreamer.AddBlankLine instead of textually. llvm-svn: 95734
* move target-independent opcodes out of TargetInstrInfoChris Lattner2010-02-091-6/+6
| | | | | | | | | into TargetOpcodes.h. #include the new TargetOpcodes.h into MachineInstr. Add new inline accessors (like isPHI()) to MachineInstr, and start using them throughout the codebase. llvm-svn: 95687
* Implement AsmPrinter support for several more operators which haveDan Gohman2010-02-091-0/+10
| | | | | | | direct MCExpr equivalents. Don't use MCExpr::Shr because it isn't consistent between targets. llvm-svn: 95620
* now that @GOTOFF is no longer represented as a suffix on aChris Lattner2010-02-081-6/+4
| | | | | | | MCSymbol, we can remove the 'suffix' argument of GetBlockAddressSymbol. Do so. llvm-svn: 95601
* ConstantFoldConstantExpression can theoretically return the originalDan Gohman2010-02-081-2/+4
| | | | | | expression; don't go into an infinite loop if it does. llvm-svn: 95591
* When CodeGen'ing unoptimized code, there may be unfolded constant expressionsDan Gohman2010-02-081-9/+11
| | | | | | | | | in global initializers. Instead of aborting, attempt to fold them on the spot. If folding succeeds, emit the folded expression instead. This fixes PR6255. llvm-svn: 95583
* An empty global constant (one of size 0) may have a section immediatelyBill Wendling2010-02-051-0/+1
| | | | | | | | | | | following it. However, the EmitGlobalConstant method wasn't emitting a body for the constant. The assembler doesn't like that. Before, we were generating this: .zerofill __DATA, __common, __cmd, 1, 3 This fix puts us back to that semantic. llvm-svn: 95336
* don't emit \n's at the start of X86AsmPrinter::runOnMachineFunction,Chris Lattner2010-02-031-0/+2
| | | | | | .o files don't like that. llvm-svn: 95187
* privatize a bunch of methods and move \n printing into them.Chris Lattner2010-02-031-8/+6
| | | | llvm-svn: 95186
* rejigger the world so that EmitInstruction prints the \n atChris Lattner2010-02-031-19/+11
| | | | | | | | the end of the instruction instead of expecting the caller to do it. This currently causes the asm-verbose instruction comments to be on the next line. llvm-svn: 95178
* sink handling of target-independent machine instrs (otherChris Lattner2010-02-031-2/+19
| | | | | | | | than DEBUG_VALUE :( ) into the target indep AsmPrinter.cpp file. This allows elimination of the NO_ASM_WRITER_BOILERPLATE hack among other things. llvm-svn: 95177
* refactor code so that LLVMTargetMachine creates the asmstreamer and Chris Lattner2010-02-021-9/+4
| | | | | | | mccontext instead of having AsmPrinter do it. This allows other types of MCStreamer's to be passed in. llvm-svn: 95155
* move handling of asm-verbose out of AsmPrinter.cpp into ↵Chris Lattner2010-02-021-16/+3
| | | | | | LLVMTargetMachine.cpp with the rest of the command line options. llvm-svn: 95152
* add target hooks for emitting random gunk before and after the function body.Chris Lattner2010-01-281-0/+6
| | | | llvm-svn: 94732
* Give AsmPrinter the most common expected implementation of Chris Lattner2010-01-281-3/+2
| | | | | | | | runOnMachineFunction, and switch PPC to use EmitFunctionBody. The two ppc asmprinters now don't heave to define runOnMachineFunction. llvm-svn: 94722
* emit a 0 byte instead of a noop if a function is empty on darwin.Chris Lattner2010-01-281-4/+2
| | | | | | "0" is nice and target independent. llvm-svn: 94718
* Remove the argument from EmitJumpTableInfo, because it doesn't need it.Chris Lattner2010-01-281-11/+66
| | | | | | | | Move the X86 implementation of function body emission up to AsmPrinter::EmitFunctionBody, which works by calling the virtual EmitInstruction method. llvm-svn: 94716
* Drop the argument to AsmPrinter::EmitConstantPool and make it virtual.Chris Lattner2010-01-281-2/+3
| | | | | | | Overload it in the ARM backend to do nothing, since is does insane constant pool emission. llvm-svn: 94708
* rename printVisibility to EmitVisibility and make it private,Chris Lattner2010-01-281-6/+5
| | | | | | constify EmitLinkage. llvm-svn: 94705
* 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
OpenPOWER on IntegriCloud