summaryrefslogtreecommitdiffstats
path: root/llvm/test/DebugInfo/X86/gnu-public-names.ll
Commit message (Collapse)AuthorAgeFilesLines
...
* Move the complex address expression out of DIVariable and into an extraAdrian Prantl2014-10-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | argument of the llvm.dbg.declare/llvm.dbg.value intrinsics. Previously, DIVariable was a variable-length field that has an optional reference to a Metadata array consisting of a variable number of complex address expressions. In the case of OpPiece expressions this is wasting a lot of storage in IR, because when an aggregate type is, e.g., SROA'd into all of its n individual members, the IR will contain n copies of the DIVariable, all alike, only differing in the complex address reference at the end. By making the complex address into an extra argument of the dbg.value/dbg.declare intrinsics, all of the pieces can reference the same variable and the complex address expressions can be uniqued across the CU, too. Down the road, this will allow us to move other flags, such as "indirection" out of the DIVariable, too. The new intrinsics look like this: declare void @llvm.dbg.declare(metadata %storage, metadata %var, metadata %expr) declare void @llvm.dbg.value(metadata %storage, i64 %offset, metadata %var, metadata %expr) This patch adds a new LLVM-local tag to DIExpressions, so we can detect and pretty-print DIExpression metadata nodes. What this patch doesn't do: This patch does not touch the "Indirect" field in DIVariable; but moving that into the expression would be a natural next step. http://reviews.llvm.org/D4919 rdar://problem/17994491 Thanks to dblaikie and dexonsmith for reviewing this patch! Note: I accidentally committed a bogus older version of this patch previously. llvm-svn: 218787
* Revert r218778 while investigating buldbot breakage.Adrian Prantl2014-10-011-2/+2
| | | | | | "Move the complex address expression out of DIVariable and into an extra" llvm-svn: 218782
* Move the complex address expression out of DIVariable and into an extraAdrian Prantl2014-10-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | argument of the llvm.dbg.declare/llvm.dbg.value intrinsics. Previously, DIVariable was a variable-length field that has an optional reference to a Metadata array consisting of a variable number of complex address expressions. In the case of OpPiece expressions this is wasting a lot of storage in IR, because when an aggregate type is, e.g., SROA'd into all of its n individual members, the IR will contain n copies of the DIVariable, all alike, only differing in the complex address reference at the end. By making the complex address into an extra argument of the dbg.value/dbg.declare intrinsics, all of the pieces can reference the same variable and the complex address expressions can be uniqued across the CU, too. Down the road, this will allow us to move other flags, such as "indirection" out of the DIVariable, too. The new intrinsics look like this: declare void @llvm.dbg.declare(metadata %storage, metadata %var, metadata %expr) declare void @llvm.dbg.value(metadata %storage, i64 %offset, metadata %var, metadata %expr) This patch adds a new LLVM-local tag to DIExpressions, so we can detect and pretty-print DIExpression metadata nodes. What this patch doesn't do: This patch does not touch the "Indirect" field in DIVariable; but moving that into the expression would be a natural next step. http://reviews.llvm.org/D4919 rdar://problem/17994491 Thanks to dblaikie and dexonsmith for reviewing this patch! llvm-svn: 218778
* Fix typosAlp Toker2014-06-071-1/+1
| | | | llvm-svn: 210401
* DebugInfo: pubnames: include file-local (static or anonymous namespace) ↵David Blaikie2014-06-061-48/+164
| | | | | | | | | variables and anonymous namespaces themselves. Still some issues with name qualification, FIXMEs added to test cases and fixes will come next. llvm-svn: 210378
* Match the full hex offsets in test/DebugInfo/X86/gnu-public-names.llDavid Blaikie2014-06-061-24/+24
| | | | | | | | | | | | | | | | | These checks were accidentally skipping the 0x prefix in the hex offsets, then cunningly ignoring the prefix in the use of those captured values. Except in the case of the unit length, where the match was only matching the leading '0' before the x in the 0x prefix, then matching that against the length. We can't actually express the length association here, as the length field in the Compile Unit header does not include the length field itself, but the length field in the pubnames section /does/ include the size of the length field in the Compile Unit header - so the two numbers are actually 4 bytes different. Just skip matching that. llvm-svn: 210364
* Remove DWARF3 testing of test/DebugInfo/X86/gnu-public-names.llDavid Blaikie2014-06-061-88/+1
| | | | | | | | | | | | | | | | | This was added to test that DW_AT_GNU_pubnames used sec_offset in DWARF4 and data4 in DWARF3 and below. Since then we've updated DW_AT_GNU_pubnames to be a flag, rather than a section offset anyway. Granted this still differs between DWARF 3 and DWARF 4 (FORM_flag_present versun FORM_flag) but it doesn't seem worthwhile testing that codepath again here. It's covered adequately in many other test cases. And while I'm here, don't hardcode the byte size of the compile unit - it's not relevant to this test and just makes it brittle if/when anything changes in the way this CU is emitted. llvm-svn: 210362
* DebugInfo: Generalize some tests to handle variations in attribute ordering.David Blaikie2014-05-231-12/+24
| | | | | | | | | | | | | | | | In an effort to fix inlined debug info in situations where the out of line definition of a function preceeds any inlined usage, the order in which some attributes are added to subprogram DIEs may change. (in essence, definition-necessary attributes like DW_AT_low_pc/high_pc will be added immediately, but the names, types, and other features will be delayed to module end where they may either be added to the subprogram DIE or instead reference an abstract definition for those values) These tests can be generalized to be resilient to this change. 5 or so tests actually have to be incompatibly changed to cope with this reordering and will go along with the change that affects the order. llvm-svn: 209554
* DebugInfo: Tag units as having been indexed in GNU pubnames by using a ↵David Blaikie2014-03-061-4/+4
| | | | | | | | | | DW_AT_GNU_pubnames of DW_FORM_flag(_present) rather than sec_offsets to the pubnames/types sections This is consistent with GDB ToT and reduces the number of relocations in (type and compile) units, substantially reducing relocations and debug size in fission + type units builds. llvm-svn: 203082
* DebugInfo: Remove some unneeded conditionals now that DIBuilder no longer ↵David Blaikie2014-02-041-1/+1
| | | | | | | | | | | 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
* Make these two tests resilient in the face of compile unit sizeEric Christopher2013-12-051-2/+4
| | | | | | changes. llvm-svn: 196444
* Debug Info: update testing cases to specify the debug info version number.Manman Ren2013-11-221-1/+2
| | | | | | | | We are going to drop debug info without a version number or with a different version number, to make sure we don't crash when we see bitcode files with different debug info metadata format. llvm-svn: 195504
* In Dwarf 3 (and Dwarf 2) attributes whose value are offsets into aEric Christopher2013-11-211-0/+80
| | | | | | | | | | | | | | | | | | | | | section use the form DW_FORM_data4 whilst in Dwarf 4 and later they use the form DW_FORM_sec_offset. This patch updates the places where such attributes are generated to use the appropriate form depending on the Dwarf version. The DIE entries affected have the following tags: DW_AT_stmt_list, DW_AT_ranges, DW_AT_location, DW_AT_GNU_pubnames, DW_AT_GNU_pubtypes, DW_AT_GNU_addr_base, DW_AT_GNU_ranges_base It also adds a hidden command line option "--dwarf-version=<uint>" to llc which allows the version of Dwarf to be generated to override what is specified in the metadata; this makes it possible to update existing tests to check the debugging information generated for both Dwarf 4 (the default) and Dwarf 3 using the same metadata. Patch (slightly modified) by Keith Walker! llvm-svn: 195391
* DebugInfo: Make pubnames header printing similar to unit header printingDavid Blaikie2013-11-011-9/+2
| | | | | | | | | | | | | | | In a failed attempt to allow the gnu-public-names.ll test case to not hardcode the size of the unit that the pubnames section referred to I've at least managed to have unit headers and pubnames headers print out in a similar style. This failed to achieve the desired goal because the header in a unit specifies the length of the unit without the length element of the header whereas the length in the pubnames includes this element, so the numbers are off by 4 bytes. I don't know of any arithmetic powers in FileCheck so the test case can't simply say "CU_LENGTH + 4". llvm-svn: 193872
* DebugInfo: Emit member variable locations as data instead of expressions in ↵David Blaikie2013-11-011-1/+1
| | | | | | | | | blocks Drive by space optimization. Also makes the DIEs more regular which might speed up DWARF parsing. llvm-svn: 193835
* Debug Info: instead of calling addToContextOwner which constructs the contextManman Ren2013-10-291-3/+3
| | | | | | | | | | | | | | | after the DIE creation, we construct the context first. Ensure that we create the context before we create a type so that we can add the newly created type to the parent. Remove last use of addToContextOwner now that it's not needed. We use createAndAddDIE to wrap around "new DIE(". Now all shareable DIEs should be added to their parents right after the creation. Reviewed off-list by Eric, Thanks. llvm-svn: 193657
* Debug Info: instead of calling addToContextOwner which constructs the contextManman Ren2013-10-291-3/+3
| | | | | | | | | | | | after the DIE creation, we construct the context first. This touches creation of namespaces and global variables. The purpose is to handle all DIE creations similarly: constructs the context first, then creates the DIE and immediately adds the DIE to its parent. We use createAndAddDIE to wrap around "new DIE(". llvm-svn: 193589
* According to the dwarf standard pubnames and pubtypes for languagesEric Christopher2013-10-171-45/+69
| | | | | | | | | | | like C++ should be the fully qualified names for the type. Add a routine that does a language specific context walk to build up the qualified name and use it when we add types/names to the tables. Expand the gnu pubnames testcase as it's the most complex to make sure that qualified types are also being added. llvm-svn: 192865
* Fix a pair of bugs in the emission of pubname tables:Eric Christopher2013-10-161-23/+46
| | | | | | | | | | | | | | | | 1) Make sure we emit static member variables by checking at the end of createGlobalVariableDIE rather than piecemeal in the function. (As a note, createGlobalVariableDIE needs rewriting.) 2) Make sure we use the definition rather than declaration DIE for two things: a) determining linkage for gnu pubnames, and b) as the address of the DIE for global variables. (As a note, createGlobalVariableDIE really needs rewriting.) Adjust the testcase to make sure we're checking the correct DIEs. llvm-svn: 192761
* The DW_AT_GNU_pubnames/pubtypes attributes are actually formEric Christopher2013-09-301-22/+24
| | | | | | | SEC_OFFSET from the beginning of the section so go ahead and emit a label at the beginning of each one. llvm-svn: 191710
* llvm-dwarfdump support for gnu_pubtypesDavid Blaikie2013-09-241-3/+15
| | | | llvm-svn: 191329
* Add namespaces to the list of items that we expose via pubnames.Eric Christopher2013-09-241-0/+1
| | | | llvm-svn: 191257
* Regenerate testcase from source.Eric Christopher2013-09-241-64/+70
| | | | llvm-svn: 191256
* Add more external types to the pubtypes table. Expand the asmEric Christopher2013-09-231-0/+3
| | | | | | checking patch until we get full dumping support. llvm-svn: 191239
* Handle gnu pubtypes sections:Eric Christopher2013-09-231-1/+4
| | | | | | | | | | | a) Make sure we are emitting the correct section in our section labels when we begin the module. b) Make sure we are emitting the correct pubtypes section in the presence of gnu pubtypes. c) For C++ struct, union, class, and enumeration types are default external. llvm-svn: 191225
* DebugInfo: constrain gnu pubnames test furtherDavid Blaikie2013-09-191-10/+32
| | | | | | | | | | Ensures that the pubnames entries actually refer to the intended entities. This test could be more flexible if there was a way to do multiline FileCheck matches with captures (in that way the test wouldn't need to have hardcoded offset values and would thus be resilient to changes in the layout of the DIEs in this CU). llvm-svn: 191055
* DebugInfo: llvm-dwarfdump support for gnu_pubnames sectionDavid Blaikie2013-09-191-13/+16
| | | | llvm-svn: 191050
* DebugInfo: Improve IR annotation comments for GNU pubthings.David Blaikie2013-09-191-11/+11
| | | | llvm-svn: 191043
* Add initial support for handling gnu style pubnames accepted by someEric Christopher2013-09-131-0/+126
versions of gold. This support is designed to allow gold to produce gdb_index sections similar to the accelerator tables and consumable by gdb. llvm-svn: 190649
OpenPOWER on IntegriCloud