summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter
Commit message (Collapse)AuthorAgeFilesLines
* Add a DIELoc class to cover the DW_FORM_exprloc set of expressionsEric Christopher2014-02-165-73/+180
| | | | | | | | | | | | | alongside DIEBlock and replace uses accordingly. Use DW_FORM_exprloc in DWARF4 and later code. Update testcases. Adding a DIELoc instead of using extra forms inside DIEBlock so that we can keep location expressions separate from other uses. No direct use at the moment, however, it's not a lot of code and using a separately named class keeps it somewhat more obvious what's going on in various locations. llvm-svn: 201481
* DebugInfo: Deduplicate entries in the fission address tableDavid Blaikie2014-02-153-18/+20
| | | | | | | | | | | | This broke in r185459 while TLS support was being generalized to handle non-symbol TLS representations. I thought about/tried having an enum rather than a bool to track the TLS-ness of the address table entry, but namespaces and naming seemed more hassle than it was worth for only one caller that needed to specify this. llvm-svn: 201469
* DwarfDebug: Remove dead code.David Blaikie2014-02-151-7/+3
| | | | llvm-svn: 201467
* DebugInfo: Implement DW_AT_stmt_list for type unitsDavid Blaikie2014-02-143-2/+22
| | | | | | | | | Type units will share the statement list of their defining compile unit. This is a tradeoff that reduces .o debug info size at the cost of some linked debug info size (since the contents of those string tables won't be deduplicated along with the type unit) which seems right for now. llvm-svn: 201445
* DwarfUnit: Remove unnecessarily explicit/out of line virtual dtors.David Blaikie2014-02-142-6/+0
| | | | | | | These types have an out of line virtual function each (emitHeader at least) so they won't have weak vtables - no need for more than that. llvm-svn: 201444
* DwarfUnit: Remove unnecessary (void)t; that was previously used to suppress ↵David Blaikie2014-02-141-1/+0
| | | | | | -Wunused-member-variable llvm-svn: 201442
* DwarfUnit: Refactor out DW_AT_stmt_list creation into common function for ↵David Blaikie2014-02-143-30/+31
| | | | | | | | | | | | | | | fission and non-fission cases This probably also addresses the FIXME in the fission case regarding multiple compile units, though I haven't tested that. This code still confuses me (the literal zero offset makes little sense, the limitations surrounding asm output I'm not sure about either - but perhaps we should just always emit one line table? Or should we not rely on .loc/.file even in assembly so we can produce the same output between asm and object output?) but this maintains the existing functionality. llvm-svn: 201441
* DebugInfo: Don't include the name of the CU file in the line table file list ↵David Blaikie2014-02-141-3/+0
| | | | | | | | | | | | | | | | | | | | when it's unneeded Recommitting r201380 (reverted in r201389) Recommitting r201351 and r201355 (reverted in r201351 and r201355) We weren't emitting the an empty (header only) line table when the line table was empty - this made the DWARF invalid (the compile unit would point to the zero-size debug_lines section where there should've been an empty line table but there was nothing at all). Fix that, and as a consequence this works around/addresses PR18809. Also, we emit a non-empty line table to workaround a darwin linker bug, so XFAILing on darwin too. Also, mark the test as 'REQUIRES: object-emission' because it does. llvm-svn: 201429
* Generate the DWARF stack frame decode operations in the function prologue ↵Artyom Skrobov2014-02-143-2/+25
| | | | | | | | for ARM/Thumb functions. Patch by Keith Walker! llvm-svn: 201423
* Revert "DebugInfo: Don't include the name of the CU file in the line table ↵Eric Christopher2014-02-141-0/+3
| | | | | | | | file list when it's unneeded" This reverts commit r201380 for now while we investigate. llvm-svn: 201389
* DebugInfo: Don't include the name of the CU file in the line table file list ↵David Blaikie2014-02-141-3/+0
| | | | | | | | | | | | | | when it's unneeded Recommitting r201351 and r201355 (reverted in r201351 and r201355) We weren't emitting the an empty (header only) line table when the line table was empty - this made the DWARF invalid (the compile unit would point to the zero-size debug_lines section where there should've been an empty line table but there was nothing at all). Fix that, and as a consequence this works around/addresses PR18809. llvm-svn: 201380
* Disable emission of aranges by default and add a command lineEric Christopher2014-02-141-1/+7
| | | | | | | option to enable again that will be matched with a commit to enable in clang. llvm-svn: 201378
* [PR18809] Revert r201187, "DebugInfo: Don't include the name of the CU file ↵NAKAMURA Takumi2014-02-131-0/+3
| | | | | | | | in the line table file list when it's unneeded" It really crashes cygwin's stage2 configure with "clang -g". llvm-svn: 201351
* Re-commit: Demote EmitRawText call in AsmPrinter::EmitInlineAsm() and remove ↵Daniel Sanders2014-02-131-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | hasRawTextSupport() call Summary: AsmPrinter::EmitInlineAsm() will no longer use the EmitRawText() call for targets with mature MC support. Such targets will always parse the inline assembly (even when emitting assembly). Targets without mature MC support continue to use EmitRawText() for assembly output. The hasRawTextSupport() check in AsmPrinter::EmitInlineAsm() has been replaced with MCAsmInfo::UseIntegratedAs which when true, causes the integrated assembler to parse inline assembly (even when emitting assembly output). UseIntegratedAs is set to true for targets that consider any failure to parse valid assembly to be a bug. Target specific subclasses generally enable the integrated assembler in their constructor. The default value can be overridden with -no-integrated-as. All tests that rely on inline assembly supporting invalid assembly (for example, those that use mnemonics such as 'foo' or 'hello world') have been updated to disable the integrated assembler. Changes since review (and last commit attempt): - Fixed test failures that were missed due to configuration of local build. (fixes crash.ll and a couple others). - Fixed tests that happened to pass because the local build was on X86 (should fix 2007-12-17-InvokeAsm.ll) - mature-mc-support.ll's should no longer require all targets to be compiled. (should fix ARM and PPC buildbots) - Object output (-filetype=obj and similar) now forces the integrated assembler to be enabled regardless of default setting or -no-integrated-as. (should fix SystemZ buildbots) Reviewers: rafael Reviewed By: rafael CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2686 llvm-svn: 201333
* Reformat a few lines with clang-format.Eric Christopher2014-02-121-4/+8
| | | | llvm-svn: 201265
* 80-col.Eric Christopher2014-02-121-1/+2
| | | | llvm-svn: 201264
* Debug info: Bugfix for r201190: DW_OP_piece takes bytes, not bits.Adrian Prantl2014-02-122-3/+5
| | | | | | rdar://problem/16015314 llvm-svn: 201253
* Revert r201237+r201238: Demote EmitRawText call in ↵Daniel Sanders2014-02-121-6/+2
| | | | | | | | AsmPrinter::EmitInlineAsm() and remove hasRawTextSupport() call It introduced multiple test failures in the buildbots. llvm-svn: 201241
* Demote EmitRawText call in AsmPrinter::EmitInlineAsm() and remove ↵Daniel Sanders2014-02-121-2/+6
| | | | | | | | | | | | | | | | | | | | | hasRawTextSupport() call Summary: AsmPrinter::EmitInlineAsm() will no longer use the EmitRawText() call for targets with mature MC support. Such targets will always parse the inline assembly (even when emitting assembly). Targets without mature MC support continue to use EmitRawText() for assembly output. The hasRawTextSupport() check in AsmPrinter::EmitInlineAsm() has been replaced with MCAsmInfo::UseIntegratedAs which when true, causes the integrated assembler to parse inline assembly (even when emitting assembly output). UseIntegratedAs is set to true for targets that consider any failure to parse valid assembly to be a bug. Target specific subclasses generally enable the integrated assembler in their constructor. The default value can be overridden with -no-integrated-as. All tests that rely on inline assembly supporting invalid assembly (for example, those that use mnemonics such as 'foo' or 'hello world') have been updated to disable the integrated assembler. Reviewers: rafael Reviewed By: rafael CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2686 llvm-svn: 201237
* DwarfUnit: Include type unit's file strings in the defining compile unit's ↵David Blaikie2014-02-121-1/+2
| | | | | | | | | | file_names table There's still one piece missing here, which is adding the DW_AT_stmt_list to the type unit that refer's to the compile unit's line table. Working on that. llvm-svn: 201198
* Fix some formatting in my last commit (r201196)David Blaikie2014-02-122-10/+7
| | | | llvm-svn: 201197
* DwarfUnit: Provide a reference to a defining DwarfCompileUnit from ↵David Blaikie2014-02-124-14/+26
| | | | | | | | | DwarfTypeUnit. Type units need to insert their file strings into the compile unit's line/file table. This is preliminary work to that end. llvm-svn: 201196
* DwarfUnit: Refactor DW_AT_file creation into a common function.David Blaikie2014-02-122-51/+20
| | | | | | | | This is preliminary work to fix type unit file strings so they appear in their originating CU's line table - but it's also just good/simple cleanup, so I'm committing it ahead of time. llvm-svn: 201195
* DwarfUnit: Replace unnecessary conditionals with asserts.David Blaikie2014-02-111-18/+6
| | | | | | | | We used to be pretty vague about what debug entities were what, with many conditionals to silently drop/skip/accept things. These don't seem to be relevant anymore. llvm-svn: 201194
* Reapply r201180 with an additional error path.Adrian Prantl2014-02-112-4/+61
| | | | | | | | | | | | Debug info: Emit values in subregisters that do not have a separate DWARF register number by emitting a super-register + DW_OP_bit_piece. This is necessary because on x86_64, there are no DWARF register numbers for i386-style subregisters. Fixes a bunch of FIXMEs. rdar://problem/16015314 llvm-svn: 201190
* Revert "Debug info: Emit values in subregisters that do not have a separate"Adrian Prantl2014-02-112-56/+4
| | | | | | This reverts commit r201179 for buildbot breakage. llvm-svn: 201188
* DebugInfo: Don't include the name of the CU file in the line table file list ↵David Blaikie2014-02-111-3/+0
| | | | | | | | | | when it's unneeded This comes up in empty files or files containing #file directives that never reference the actual source file name. Came up in a small test of line tables I was playing with. llvm-svn: 201187
* whitespaceAdrian Prantl2014-02-111-1/+1
| | | | llvm-svn: 201181
* Debug info: Emit values in subregisters that do not have a separateAdrian Prantl2014-02-112-4/+56
| | | | | | | | | | | DWARF register number by emitting a super-register + DW_OP_bit_piece. This is necessary because on x86_64, there are no DWARF register numbers for i386-style subregisters. Fixes a bunch of FIXMEs. rdar://problem/16015314 llvm-svn: 201180
* DebugInfo: Use existing symbol rather than creating it again.David Blaikie2014-02-111-1/+1
| | | | llvm-svn: 201119
* Remove some prototype code accidentally committed in r201043David Blaikie2014-02-102-14/+0
| | | | | | Thanks to Chandler for the catch. llvm-svn: 201095
* Use a consistent argument order in TargetLoweringObjectFile.Rafael Espindola2014-02-092-3/+3
| | | | | | | | | These methods normally call each other and it is really annoying if the arguments are in different order. The more common rule was that the arguments specific to call are first (GV, Encoding, Suffix) and the auxiliary objects (Mang, TM) come after. This patch changes the exceptions. llvm-svn: 201044
* Fix formatting introduced in r200941David Blaikie2014-02-092-0/+14
| | | | llvm-svn: 201043
* Pass the Mangler by reference.Rafael Espindola2014-02-084-10/+12
| | | | | | | It is never null and it is not used in casts, so there is no reason to use a pointer. This matches how we pass TM. llvm-svn: 201025
* Fix a bug with .weak_def_can_be_hidden: Mutable variables cannot use it.Rafael Espindola2014-02-071-0/+12
| | | | | | Thanks to John McCall for noticing it. llvm-svn: 200977
* Refactor logic into a function predicate.Rafael Espindola2014-02-071-14/+19
| | | | | | No functionality change. llvm-svn: 200976
* Remove const_cast for STI when parsing inline asmDavid Peixotto2014-02-061-10/+13
| | | | | | | | | | | | | | | | | | | | | In a previous commit (r199818) we added a const_cast to an existing subtarget info instead of creating a new one so that we could reuse it when creating the TargetAsmParser for parsing inline assembly. This cast was necessary because we needed to reuse the existing STI to avoid generating incorrect code when the inline asm contained mode-switching directives (e.g. .code 16). The root cause of the failure was that there was an implicit sharing of the STI between the parser and the MCCodeEmitter. To fix a different but related issue, we now explicitly pass the STI to the MCCodeEmitter (see commits r200345-r200351). The const_cast is no longer necessary and we can now create a fresh STI for the inline asm parser to use. Differential Revision: http://llvm-reviews.chandlerc.com/D2709 llvm-svn: 200929
* Remove support for not using .loc directives.Rafael Espindola2014-02-052-10/+6
| | | | | | Clang itself was not using this. The only way to access it was via llc. llvm-svn: 200862
* Use the default values.Rafael Espindola2014-02-041-1/+1
| | | | llvm-svn: 200781
* DebugInfo: Remove some unneeded conditionals now that DIBuilder no longer ↵David Blaikie2014-02-042-6/+3
| | | | | | | | | | | emits zero-length arrays as {i32 0} A bunch of test cases needed to be cleaned up for this, many my fault - when implementid imported modules I updated test cases by simply duplicating the prior metadata field - which wasn't always the empty metadata entry. llvm-svn: 200731
* Remove some unused #includesEli Bendersky2014-02-011-1/+0
| | | | llvm-svn: 200611
* Remove a redundant call to hasRawTextSupport.Rafael Espindola2014-01-311-1/+1
| | | | | | The code path it was guarding was already using emitRawComment. llvm-svn: 200591
* If we're not producing DWARF accel tables, don't waste memoryPaul Robinson2014-01-311-0/+4
| | | | | | keeping track of those entries. llvm-svn: 200572
* Add support for DW_FORM_flag and DW_FORM_flag_present to the DIE hashingEric Christopher2014-01-311-10/+19
| | | | | | | | algorithm. Sink the 'A' + Attribute hash into each form so we don't have to check valid forms before deciding whether or not we're going to hash which will let the default be to return without doing anything. llvm-svn: 200571
* DebugInfo: Flag type unit references as declarationsDavid Blaikie2014-01-311-0/+5
| | | | | | | | | This ensures DWARF consumers don't confuse these references for definitions. I'd argue it might be nice to improve debuggers so we don't need this, but it's just one field in an abbreviation anyway - so it doesn't seem worth the fight. llvm-svn: 200569
* Reland r200340 - 'Add line table debug info to COFF files when using a win32 ↵Timur Iskhodzhanov2014-01-305-28/+490
| | | | | | | | triple' This incorporates a couple of fixes reviewed at http://llvm-reviews.chandlerc.com/D2651 llvm-svn: 200440
* Move range handling for a function to endFunction rather thanEric Christopher2014-01-291-5/+5
| | | | | | when we create the subprogram DIE. llvm-svn: 200426
* If we use DW_AT_ranges we need to specify a base address that rangesEric Christopher2014-01-291-2/+8
| | | | | | | | are relative to in the compile unit. Currently let's just use 0... Thanks to Greg Clayton for the catch! llvm-svn: 200425
* Turn on CU ranges if we've got multiple compile units in the sameEric Christopher2014-01-291-4/+6
| | | | | | | | module since there's no range guarantee that we could make given output order. This also fixes up the testcases that have multiple CUs to have the correct range offset. llvm-svn: 200422
* Make the compile unit map a MapVector so that we can assume a stableEric Christopher2014-01-292-3/+5
| | | | | | output ordering. llvm-svn: 200421
OpenPOWER on IntegriCloud