summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix the third (and last known) case of code update problems due Chris Lattner2010-03-161-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | to LLVM IR changes with addr label weirdness. In the testcase, we generate references to the two bb's when codegen'ing the first function: _test1: ## @test1 leaq Ltmp0(%rip), %rax .. leaq Ltmp1(%rip), %rax Then continue to codegen the second function where the blocks get merged. We're now smart enough to emit both labels, producing this code: _test_fun: ## @test_fun ## BB#0: ## %entry Ltmp1: ## Block address taken Ltmp0: ## BB#1: ## %ret movl $-1, %eax ret Rejoice. llvm-svn: 98595
* Implement support for the case when a reference to a addr-of-bb Chris Lattner2010-03-151-0/+10
| | | | | | | | | label is generated, but then the block is deleted. Since the value is undefined, we just emit the label right after the entry label of the function. It might matter that the label is in the same section as the function was afterall. llvm-svn: 98579
* Emit dwarf variable info communicated by code generator through DBG_VALUE ↵Devang Patel2010-03-151-0/+2
| | | | | | | | machine instructions. This is a work in progress. llvm-svn: 98556
* remove dead method.Chris Lattner2010-03-151-7/+0
| | | | llvm-svn: 98526
* fix AsmPrinter::GetBlockAddressSymbol to always return a uniqueChris Lattner2010-03-141-21/+4
| | | | | | | label instead of trying to form one based on the BB name (which causes collisions if the name is empty). This fixes PR6608 llvm-svn: 98495
* change the DBG_LABEL MachineInstr to always be createdChris Lattner2010-03-141-7/+1
| | | | | | with an MCSymbol instead of an immediate. llvm-svn: 98481
* switch GC_LABEL to use an MCSymbol operand instead of a label ID operand.Chris Lattner2010-03-141-3/+1
| | | | llvm-svn: 98474
* change the LabelSDNode to be EHLabelSDNode and make it holdChris Lattner2010-03-141-1/+6
| | | | | | | | an MCSymbol. Make the EH_LABEL MachineInstr hold its label with an MCSymbol instead of ID. Fix a bug in MMI.cpp which would return labels named "Label4" instead of "label4". llvm-svn: 98463
* eliminate the now-unneeded context argument of MBB::getSymbol()Chris Lattner2010-03-131-6/+6
| | | | llvm-svn: 98451
* rearrange MCContext ownership. Before LLVMTargetMachine created it Chris Lattner2010-03-131-8/+9
| | | | | | | | | | | and passing off ownership to AsmPrinter. Now MachineModuleInfo creates it and owns it by value. This allows us to use MCSymbols more consistently throughout the rest of the code generator, and simplifies a bit of code. This also allows MachineFunction to keep an MCContext reference handy, and cleans up the TargetRegistry interfaces for AsmPrinters. llvm-svn: 98450
* remove gone method, grr symlinks.Chris Lattner2010-03-121-6/+0
| | | | llvm-svn: 98392
* inline the now-trivial implementation of GetGlobalValueSymbol intoChris Lattner2010-03-121-11/+8
| | | | | | some of its callers. llvm-svn: 98388
* give Mangler access to TargetData.Chris Lattner2010-03-121-1/+1
| | | | llvm-svn: 98378
* finally give Mangler a getSymbol method, which returns an MCSymbolChris Lattner2010-03-121-6/+1
| | | | | | for a global instead of messing around with string buffers. llvm-svn: 98366
* make the mangler take an MCContext instead of an MAI.Chris Lattner2010-03-121-1/+1
| | | | | | No functionality change. llvm-svn: 98363
* Add a new jump table encoding to indicate jump tables entriesRichard Osborne2010-03-111-0/+3
| | | | | | are inside the function by the target at the point of use. llvm-svn: 98255
* set the temporary bit on MCSymbols correctly.Chris Lattner2010-03-101-16/+19
| | | | llvm-svn: 98124
* reapply r98035:Chris Lattner2010-03-091-4/+3
| | | | | | | Now that setStartLabel takes an MCSymbol, we can de-ID'ize beginScope and RecordSourceLine. llvm-svn: 98047
* Speculatively revert r98035. It appears to have caused a set of buildbotEric Christopher2010-03-091-3/+4
| | | | | | failures. llvm-svn: 98039
* Now that setStartLabel takes an MCSymbol, we can de-ID'izeChris Lattner2010-03-091-4/+3
| | | | | | beginScope and RecordSourceLine. llvm-svn: 98035
* 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
OpenPOWER on IntegriCloud