summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter
Commit message (Collapse)AuthorAgeFilesLines
* Change the asmprinter to print the comment character before theChris Lattner2009-08-111-3/+4
| | | | | | | | | | "inlineasmstart/end" strings so that the contents of the directive are separate from the comment character. This lets elf targets get #APP/#NOAPP for free even if they don't use "#" as the comment character. This also allows hoisting the darwin stuff up to the shared TAI class. llvm-svn: 78737
* "TAI::JumpTableDirective" is always null for current arm targets, simplifyChris Lattner2009-08-111-14/+12
| | | | | | the code based on this and make it fall through better. llvm-svn: 78708
* SjLj based exception handling unwinding support. This patch is nasty, brutishJim Grosbach2009-08-112-46/+121
| | | | | | | | | | | | | and short. Well, it's kinda short. Definitely nasty and brutish. The front-end generates the register/unregister calls into the SjLj runtime, call-site indices and landing pad dispatch. The back end fills in the LSDA with the call-site information provided by the front end. Catch blocks are not yet implemented. Built on Darwin and verified no llvm-core "make check" regressions. llvm-svn: 78625
* Add support for printing loop structure information in asm comments.David Greene2009-08-101-3/+99
| | | | | | | | | | This definitely slows down asm output so put it under an -asm-exuberant flag. This information is useful when doing static analysis of performance issues. llvm-svn: 78567
* sink the 'name' and 'isdirective' state out of MCSection into its derived ↵Chris Lattner2009-08-081-4/+3
| | | | | | | | classes. This totally optimizes PIC16 sections by not having an 'isdirective' bit anymore!! ;-) llvm-svn: 78517
* 1. Make MCSection an abstract class.Chris Lattner2009-08-081-12/+1
| | | | | | | | | 2. Move section switch printing to MCSection virtual method which takes a TAI. This eliminates textual formatting stuff from TLOF. 3. Eliminate SwitchToSectionDirective, getSectionFlagsAsString, and TLOFELF::AtIsCommentChar. llvm-svn: 78510
* eliminate TargetLoweringObjectFileSparc in favor of a TAI hook.Chris Lattner2009-08-081-1/+1
| | | | | | | | A TAI hook is appropriate in this case because this is just an asm syntax issue, not a semantic difference. TLOF should model the semantics of the section. llvm-svn: 78498
* code cleanupChris Lattner2009-08-071-20/+18
| | | | llvm-svn: 78432
* remove a bunch of now-dead crud from the asmprinter and TAI interfaces.Chris Lattner2009-08-071-32/+0
| | | | llvm-svn: 78428
* tidy upChris Lattner2009-08-071-7/+4
| | | | llvm-svn: 78416
* Fix some column padding bugs, reorganize things as suggested by ChrisDavid Greene2009-08-051-2/+16
| | | | | | and eliminate complexity. Yay! llvm-svn: 78243
* remove the 'DataSectionStartSuffix' and 'TextSectionStartSuffix' knobs.Chris Lattner2009-08-051-15/+13
| | | | llvm-svn: 78242
* add a temporary hook to allow reuse of the asmprinter from the disassembler.Chris Lattner2009-08-051-0/+3
| | | | llvm-svn: 78154
* rip out SectionEndDirectiveSuffix support, only uses byChris Lattner2009-08-041-4/+0
| | | | | | | the masm backend. If anyone cares about masm in the future, we'll have semantic sections it can hang off of. llvm-svn: 78096
* eliminate CurrentSection, rename CurrentSection_ -> CurrentSection, make it ↵Chris Lattner2009-08-032-22/+15
| | | | | | | | private, eliminate IsInTextSection. llvm-svn: 78017
* Kill off SwitchToDataSection and SwitchToTextSection, woo.Chris Lattner2009-08-031-57/+3
| | | | llvm-svn: 78015
* make getObjFileLowering() return a non-const reference.Chris Lattner2009-08-031-1/+1
| | | | llvm-svn: 77984
* make SwitchToSection accept null sections for now.Chris Lattner2009-08-031-3/+8
| | | | llvm-svn: 77976
* move dwarf debug info section selection stuff from TAI toChris Lattner2009-08-021-24/+26
| | | | | | TLOF, unifying all the dwarf targets at the same time. llvm-svn: 77889
* convert EHFrameSection to be managed by TLOF instead of TAI.Chris Lattner2009-08-021-2/+2
| | | | llvm-svn: 77888
* Fix some fixme's in #if 0'd code by making it dependent on the structuralChris Lattner2009-08-021-29/+34
| | | | | | | behavior of the LSDA section instead of on some random target hook that needs to be kept in synch with other points of truth. llvm-svn: 77855
* move getDwarfExceptionSection from TAI to TLOF and rename it to Chris Lattner2009-08-021-5/+4
| | | | | | | | | | | getLSDASection() to be more specific. This makes it pretty obvious that the ELF LSDA section is being specified wrong in PIC mode. We're probably getting a lot of startup-time relocations to a readonly page, which is expensive and bad. Someone who cares about ELF C++ should investigate this. llvm-svn: 77847
* convert ctors/dtors section to be in TLOF instead ofChris Lattner2009-08-021-2/+2
| | | | | | TAI. llvm-svn: 77842
* (re)introduce new simpler apis for creation sectionkinds.Chris Lattner2009-08-011-8/+7
| | | | llvm-svn: 77834
* Remove "JumpTableDataSection" from TAI, instead, have AsmPrinterChris Lattner2009-08-011-11/+9
| | | | | | | | | | | | compute it based on what it knows. As part of this, rename getSectionForMergeableConstant to getSectionForConstant because it works for non-mergable constants also. The only functionality change from this is that Xcore will start dropping its jump tables into readonly section instead of data section in -static mode. This should be fine as the linker resolves the relocations. If this is a problem, let me know and we'll come up with another solution. llvm-svn: 77833
* loweringinfo is always non-null.Chris Lattner2009-08-011-1/+1
| | | | llvm-svn: 77821
* fix a problem Eli noticed where we would compile the attached ptrtointChris Lattner2009-08-011-13/+13
| | | | | | | | | | | | | | | to: .quad X even on a 32-bit system, where X is not 64-bits. There isn't much that we can do here, so we just print: .quad ((X) & 4294967295) instead. llvm-svn: 77818
* Change SectionKind to be a property that is true of a *section*, itChris Lattner2009-08-011-9/+8
| | | | | | | | | | | | | | | | | | should have no state that is specific to particular globals in the section. In this case, it means the removal of the "isWeak" and "ExplicitSection" bits. MCSection uses the new form of SectionKind. To handle isWeak, I introduced a new SectionInfo class, which is SectionKind + isWeak, and it is used by the part of the code generator that does classification of a specific global. The ExplicitSection disappears. It is moved onto MCSection as a new "IsDirective" bit. Since the Name of a section is either a section or directive, it makes sense to keep this bit in MCSection. Ultimately the creator of MCSection should canonicalize (e.g.) .text to whatever the actual section is. llvm-svn: 77803
* Use setPreservesAll and setPreservesCFG in CodeGen passes.Dan Gohman2009-07-311-0/+1
| | | | llvm-svn: 77754
* add some comments on how this is *supposed* to work. We don'tChris Lattner2009-07-311-0/+27
| | | | | | | need the PreferredEHDataFormat hook, but I have yet-more refactoring to do before I can zap it. llvm-svn: 77742
* rearrange a conditional. Even if this weren't #if 0'd out, this wouldChris Lattner2009-07-311-4/+5
| | | | | | have no functionality change. llvm-svn: 77741
* Simplify operand padding by keying off tabs in the asm stream. IfDavid Greene2009-07-311-1/+21
| | | | | | | | | | | | padding is disabled, tabs get replaced by spaces except in the case of the first operand, where the tab is output to line up the operands after the mnemonics. Add some better comments and eliminate redundant code. Fix some testcases to not assume tabs. llvm-svn: 77740
* PreferredEHDataFormat is always call with data and global, but this wholeChris Lattner2009-07-311-1/+1
| | | | | | | thing is #if0'd out anyway. Just simplify the code by reducing the interface. Not deleting this is essential for Bill's continuing happiness. llvm-svn: 77736
* move emitUsedDirectiveFor to TargetLoweringObjectFile and rename it toChris Lattner2009-07-311-1/+1
| | | | | | | indicate that it is a predicate, not an emitter. This eliminates TAI dependencies on Mangler and GlobalValue. llvm-svn: 77726
* switch off of 'Section' onto MCSection. We're not properly usingChris Lattner2009-07-313-11/+14
| | | | | | MCSection subclasses yet, but this is a step in the right direction. llvm-svn: 77708
* refactor section construction in TLOF to be through an explicitChris Lattner2009-07-311-0/+4
| | | | | | initialize method, which can be called when an MCContext is available. llvm-svn: 77687
* Start using DebugInfoFinder.Devang Patel2009-07-301-13/+11
| | | | llvm-svn: 77621
* Forgot to output the base offset.Bill Wendling2009-07-291-4/+8
| | | | llvm-svn: 77505
* pass the mangler down into the various SectionForGlobal methods.Chris Lattner2009-07-291-2/+3
| | | | | | No functionality change. llvm-svn: 77432
* Move comment to above method.Bill Wendling2009-07-291-21/+21
| | | | llvm-svn: 77412
* - Temporarily unbreak the build by forcing the TType "absptr", which isn'tBill Wendling2009-07-292-50/+75
| | | | | | | correct. But what are you going to do? I'll fix this in the future. - Move another large loop into its own method. llvm-svn: 77408
* Cleanup code to use iterators instead of ".size()".Bill Wendling2009-07-281-21/+25
| | | | | | Does any one else hate the name "const_reverse_iterator" as much as I do? llvm-svn: 77399
* Doxygenify comments.Bill Wendling2009-07-282-2/+4
| | | | llvm-svn: 77394
* Split out large loop into it's very own method. No intended functionality ↵Bill Wendling2009-07-282-42/+62
| | | | | | change. llvm-svn: 77393
* Output the EH TType format and base offset only if there are types that we'reBill Wendling2009-07-281-6/+15
| | | | | | going to emit. llvm-svn: 77382
* Use the preferred EH data format for the preferred EH data format.Bill Wendling2009-07-281-2/+2
| | | | llvm-svn: 77373
* Rip all of the global variable lowering logic out of TargetAsmInfo. SinceChris Lattner2009-07-283-18/+24
| | | | | | | | | | | | | | | | | | | | it is highly specific to the object file that will be generated in the end, this introduces a new TargetLoweringObjectFile interface that is implemented for each of ELF/MachO/COFF/Alpha/PIC16 and XCore. Though still is still a brutal and ugly refactoring, this is a major step towards goodness. This patch also: 1. fixes a bunch of dangling pointer problems in the PIC16 backend. 2. disables the TargetLowering copy ctor which PIC16 was accidentally using. 3. gets us closer to xcore having its own crazy target section flags and pic16 not having to shadow sections with its own objects. 4. fixes wierdness where ELF targets would set CStringSection but not CStringSection_. Factor the code better. 5. fixes some bugs in string lowering on ELF targets. llvm-svn: 77294
* hoist MCContext/MCStreamer up to AsmPrinter since we're going to start creatingChris Lattner2009-07-271-0/+11
| | | | | | | MCSections soon instead of Section for all targets, and we need something to own them. llvm-svn: 77252
* Eliminate SectionFlags, just embed a SectionKind into SectionChris Lattner2009-07-271-10/+10
| | | | | | instead and drive things based off of that. llvm-svn: 77184
* Remove Value::getName{Start,End}, the last of the old Name APIs.Daniel Dunbar2009-07-263-6/+5
| | | | llvm-svn: 77152
OpenPOWER on IntegriCloud