summaryrefslogtreecommitdiffstats
path: root/llvm/test/DebugInfo
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Reapply: Teach SROA how to update debug info for fragmented variables."Adrian Prantl2015-01-084-266/+4
| | | | | | | This reverts commit r225379 while investigating an assertion failure reported by Alexey. llvm-svn: 225424
* Reapply: Teach SROA how to update debug info for fragmented variables.Adrian Prantl2015-01-074-4/+266
| | | | | | | | The two buildbot failures were addressed in LLVM r225378 and CFE r225359. This rapplies commit 225272 without modifications. llvm-svn: 225379
* Debug info: Allow aggregate types to be described by constants.Adrian Prantl2015-01-071-0/+118
| | | | llvm-svn: 225378
* Revert "Reapply: Teach SROA how to update debug info for fragmented variables."Adrian Prantl2015-01-064-266/+4
| | | | | | | | | because of a tsan buildbot failure. This reverts commit 225272. Fix should be coming soon. llvm-svn: 225288
* Reapply: Teach SROA how to update debug info for fragmented variables.Adrian Prantl2015-01-064-4/+266
| | | | | | | | | | This also rolls in the changes discussed in http://reviews.llvm.org/D6766. Defers migrating the debug info for new allocas until after all partitions are created. Thanks to Chandler for reviewing! llvm-svn: 225272
* Reverting 225045 and 225043 and XFAIL multiline.ll on hexagonColin LeMahieu2014-12-311-0/+1
| | | | llvm-svn: 225047
* Fix a test case to not depend on asm comment syntax, so as to be portableDavid Blaikie2014-12-301-9/+9
| | | | | | | | Too many different comment characters - instead of trying to account for them all, instead disable the comments and just check for end-of-line instead. llvm-svn: 225020
* Generalize even further, for ARM comment syntax (@)David Blaikie2014-12-301-8/+8
| | | | llvm-svn: 225019
* Generalize test case to handle different asm syntax (# or // comments)David Blaikie2014-12-301-8/+8
| | | | llvm-svn: 225017
* DebugInfo: Omit is_stmt from line table entries on the same line.David Blaikie2014-12-302-1/+82
| | | | | | | | | | | | | | | | | | | | | | GCC does this for non-zero discriminators and since GCC doesn't produce column info, that was the only place it comes up there. For LLVM, since we can emit discriminators and/or column info, it makes more sense to invert the condition and just test for changes in line number. This should resolve at least some of the GDB 7.5 test suite failures created by recent Clang changes that increase the location fidelity (which, since Clang defaults to including column info on Linux by default created a bunch of cases that confused GDB). In theory we could do this better/differently by grouping actual source statements together in a similar manner to the way lexical scopes are handled but given that GDB isn't really in a position to consume that (& users are probably somewhat used to different lines being different 'statements') this seems the safest and cheapest change. (I'm concerned that doing this 'right' would bloat the debugloc data even further - something Duncan's working hard to address) llvm-svn: 225011
* Band-aid fix for PR22032: don't emit DWARF debug info if AddressSanitizer is ↵Timur Iskhodzhanov2014-12-261-0/+3
| | | | | | enabled on Windows llvm-svn: 224860
* IAS: correct debug line info for asm macrosSaleem Abdulrasool2014-12-241-0/+20
| | | | | | | | | | | | | | | | | Correct the line information generation for preprocessed assembly. Although we tracked the source information for the macro instantiation, we failed to account for the fact that we were instantiating a macro, which is populated into a new buffer and that the line information would be relative to the definition rather than the actual instantiation location. This could cause the line number associated with the statement to be very high due to wrapping of the difference calculated for the preprocessor line information emitted into the stream. Properly calculate the line for the macro instantiation, referencing the line where the macro is actually used as GCC/gas do. The test case uses x86, though the same problem exists on any other target using the LLVM IAS. llvm-svn: 224810
* Debug Info: In symmetry to DW_TAG_pointer_type, do not emit the byte sizeAdrian Prantl2014-12-241-0/+44
| | | | | | | of a DW_TAG_ptr_to_member_type. This restores the behavior from before r224780-r224781. llvm-svn: 224799
* Revert r224739: Debug info: Teach SROA how to update debug info forChandler Carruth2014-12-233-203/+4
| | | | | | | | | | | fragmented variables. This caused codegen to start crashing when we built somewhat large programs with debug info and optimizations. 'check-msan' hit in, and I suspect a bootstrap would as well. I mailed a test case to the review thread. llvm-svn: 224750
* Thumb1 frame lowering: Mark CFI instructions with the FrameSetup flag.Adrian Prantl2014-12-221-1/+2
| | | | | | | | | | | | | Followup to r224294: ARM/AArch64: Attach the FrameSetup MIFlag to CFI instructions. Debug info marks the first instruction without the FrameSetup flag as being the end of the function prologue. Any CFI instructions in the middle of the function prologue would cause debug info to end the prologue too early and worse, attach the line number of the CFI instruction, which incidentally is often 0. llvm-svn: 224743
* Debug info: Teach SROA how to update debug info for fragmented variables.Adrian Prantl2014-12-223-4/+203
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows us to generate debug info for extremely advanced code such as typedef struct { long int a; int b;} S; int foo(S s) { return s.b; } which at -O1 on x86_64 is codegen'd into define i32 @foo(i64 %s.coerce0, i32 %s.coerce1) #0 { ret i32 %s.coerce1, !dbg !24 } with this patch we emit the following debug info for this TAG_formal_parameter [3] AT_location( 0x00000000 0x0000000000000000 - 0x0000000000000006: rdi, piece 0x00000008, rsi, piece 0x00000004 0x0000000000000006 - 0x0000000000000008: rdi, piece 0x00000008, rax, piece 0x00000004 ) AT_name( "s" ) AT_decl_file( "/Volumes/Data/llvm/_build.ninja.release/test.c" ) Thanks to chandlerc, dblaikie, and echristo for their feedback on all previous iterations of this patch! llvm-svn: 224739
* PR21875: codegen for non-type template parameters of nullptr_t typeDavid Blaikie2014-12-171-46/+50
| | | | llvm-svn: 224399
* ARM/AArch64: Attach the FrameSetup MIFlag to CFI instructions.Adrian Prantl2014-12-162-0/+226
| | | | | | | | | | Debug info marks the first instruction without the FrameSetup flag as being the end of the function prologue. Any CFI instructions in the middle of the function prologue would cause debug info to end the prologue too early and worse, attach the line number of the CFI instruction, which incidentally is often 0. llvm-svn: 224294
* IR: Make metadata typeless in assemblyDuncan P. N. Exon Smith2014-12-15218-5832/+5832
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that `Metadata` is typeless, reflect that in the assembly. These are the matching assembly changes for the metadata/value split in r223802. - Only use the `metadata` type when referencing metadata from a call intrinsic -- i.e., only when it's used as a `Value`. - Stop pretending that `ValueAsMetadata` is wrapped in an `MDNode` when referencing it from call intrinsics. So, assembly like this: define @foo(i32 %v) { call void @llvm.foo(metadata !{i32 %v}, metadata !0) call void @llvm.foo(metadata !{i32 7}, metadata !0) call void @llvm.foo(metadata !1, metadata !0) call void @llvm.foo(metadata !3, metadata !0) call void @llvm.foo(metadata !{metadata !3}, metadata !0) ret void, !bar !2 } !0 = metadata !{metadata !2} !1 = metadata !{i32* @global} !2 = metadata !{metadata !3} !3 = metadata !{} turns into this: define @foo(i32 %v) { call void @llvm.foo(metadata i32 %v, metadata !0) call void @llvm.foo(metadata i32 7, metadata !0) call void @llvm.foo(metadata i32* @global, metadata !0) call void @llvm.foo(metadata !3, metadata !0) call void @llvm.foo(metadata !{!3}, metadata !0) ret void, !bar !2 } !0 = !{!2} !1 = !{i32* @global} !2 = !{!3} !3 = !{} I wrote an upgrade script that handled almost all of the tests in llvm and many of the tests in cfe (even handling many `CHECK` lines). I've attached it (or will attach it in a moment if you're speedy) to PR21532 to help everyone update their out-of-tree testcases. This is part of PR21532. llvm-svn: 224257
* A fix for PR21176. Ekaterina Romanova2014-12-121-0/+77
| | | | | | | | | | | DW_OP_const <const> doesn't describe a constant value, but a value at a constant address. The proper way to describe a constant value is DW_OP_constu <const>, DW_OP_stack_value. Added DW_OP_stack_value to the stack. Marked incorrect-variable-debugloc1.ll to xfail for PowerPC64, while the the failure (PR21881) is being investigated. llvm-svn: 224098
* Reverting commit 223981, because the test that I added ↵Ekaterina Romanova2014-12-111-72/+0
| | | | | | | | (incorrect-variable-debugloc1.ll) failed for llvm-ppc64. The test is failing for llvm-ppc64 because for this platform the location list is not being generated at all (most likely because of the bug in PPC code optimization or generation). I will file a bug agains PPC compiler, but meanwhile, until PPC bug is fixed, I will have to revert my change. llvm-svn: 224000
* A fix for PR21176.Ekaterina Romanova2014-12-101-0/+72
| | | | | | | | | | | | | | DW_OP_const <const> doesn't describe a constant value, but a value at a constant address. The proper way to describe a constant value is DW_OP_constu <const>, DW_OP_stack_value. Added DW_OP_stack_value to the stack. -This line, and those below, will be ignored-- M lib/CodeGen/AsmPrinter/DwarfDebug.cpp A test/DebugInfo/incorrect-variable-debugloc1.ll llvm-svn: 223981
* Correctly handle complex locations expressions in replaceDbgDeclareForAlloca()Frederic Riss2014-12-091-0/+87
| | | | | | | | | | | | | | | | replaceDbgDeclareForAlloca() replaces an alloca by a value storing the address of what was the alloca. If there is a dbg.declare corresponding to that alloca, we need to lower it to a dbg.value describing the additional dereference operation to be performed to get to the underlying variable. This is done by adding a DW_OP_deref to the complex location part of the location description. This deref was added to the end of the operation list, which is wrong. The expression applies to what is described by the dbg.{declare,value}, and as we are changing this, we need to apply the DW_OP_deref as the first operation in the list. Part of the fix for rdar://19162268. llvm-svn: 223799
* Fix a bug when pretty-printing DW_OP_deref.Adrian Prantl2014-12-052-1/+4
| | | | llvm-svn: 223493
* Regenerate this stale testcase from source.Adrian Prantl2014-12-051-114/+112
| | | | llvm-svn: 223492
* Add a comment.Adrian Prantl2014-12-051-1/+1
| | | | llvm-svn: 223427
* Simplify implementation and testcase of r223401 based on feedback from dblaikie.Adrian Prantl2014-12-041-23/+18
| | | | llvm-svn: 223405
* Debug info: If the RegisterCoalescer::reMaterializeTrivialDef() isAdrian Prantl2014-12-041-0/+70
| | | | | | | eliminating all uses of a vreg, update any DBG_VALUE describing that vreg to point to the rematerialized register instead. llvm-svn: 223401
* Switch lowering: Fix broken 'Figure out which block is next' codeHans Wennborg2014-11-291-2/+3
| | | | | | | This doesn't seem to have worked in a long time, but other optimizations would clean it up. llvm-svn: 222961
* Debug Info: revert r222195, r222210 and r222239.Manman Ren2014-11-211-74/+0
| | | | | | | This is no longer needed after David's fix at r222377 + r222485. rdar://18958417 llvm-svn: 222563
* Remove triple in testing case to recover an arm bot.Manman Ren2014-11-181-3/+0
| | | | llvm-svn: 222239
* Allow DwarfCompileUnit::constructImportedEntityDIE to instanciate a ↵Frederic Riss2014-11-181-96/+209
| | | | | | | | | | | | | | | GlobalVariable DIE. Usually global variables are in a retain list and instanciated before any call to constructImportedEntityDIE is made. This isn't true for forward declarations though. The testcase for this change is generated by a clang patched to emit such forward declarations (patch at http://reviews.llvm.org/D6173 which will land soon). The updated testcase tests more than just global variables, it now tests every type of 'using' clause we support. llvm-svn: 222217
* Update testing case that was accidently duplicated.Manman Ren2014-11-181-77/+0
| | | | llvm-svn: 222210
* Debug Info: In DIBuilder, the context field of a global variable is updated toManman Ren2014-11-181-0/+154
| | | | | | | | | | | use DIScopeRef. A paired commit at clang will follow to show cases where we will use an identifer for the context of a global variable. rdar://18958417 llvm-svn: 222195
* Add a test for r222029 that doesn't rely on the default target being a COFF ↵Frederic Riss2014-11-141-3/+5
| | | | | | platform. llvm-svn: 222041
* [dwarfdump] Handle relocations in Dwarf accelerator tablesFrederic Riss2014-11-141-1/+1
| | | | | | | | | | | ELF targets (and maybe COFF) use relocations when referring to strings in the .debug_str section. Handle that in the accelerator table dumper. This commit restores the test/DebugInfo/cross-cu-inlining.ll test to its expected platform independant form, validating that the fix works (this test failed on linux boxes). llvm-svn: 222029
* Tentatively appease the bots.Frederic Riss2014-11-141-1/+1
| | | | | | | | If this workaround gets the bots green, then we have to find out why the -dwarf-accel-tables=Enable option doesn't work as expected on non-darwin platforms. llvm-svn: 222007
* Reapply "[dwarfdump] Add support for dumping accelerator tables."Frederic Riss2014-11-143-0/+76
| | | | | | | | | | | | | This reverts commit r221842 which was a revert of r221836 and of the test parts of r221837. This new version fixes an UB bug pointed out by David (along with addressing some other review comments), makes some dumping more resilient to broken input data and forces the accelerator tables to be dumped in the tests where we use them (this decision is platform specific otherwise). llvm-svn: 222003
* Add an assert and a test that verify r221709's fix.Frederic Riss2014-11-131-0/+105
| | | | llvm-svn: 221854
* Revert "[dwarfdump] Add support for dumping accelerator tables."Frederic Riss2014-11-133-169/+0
| | | | | | | | | | This reverts commit r221836. The tests are asserting on some buildbots. This also reverts the test part of r221837 as it relies on dwarfdump dumping the accelerator tables. llvm-svn: 221842
* Fix emission of Dwarf accelerator table when there are multiple CUs.Frederic Riss2014-11-121-2/+14
| | | | | | | | The DIE offset in the accel tables is an offset relative to the start of the debug_info section, but we were encoding the offset to the start of the containing CU. llvm-svn: 221837
* [dwarfdump] Add support for dumping accelerator tables.Frederic Riss2014-11-122-0/+156
| | | | | | | The class used for the dump only allows to dump for the moment, but it can (and will) be easily extended to support search also. llvm-svn: 221836
* Temporary fix for PR21528 - use mangled C++ function names in COFF debug ↵Timur Iskhodzhanov2014-11-121-0/+43
| | | | | | info to un-break ASan on Windows llvm-svn: 221813
* [COFF] Make it clearer that the symbols subsection holds function display ↵Timur Iskhodzhanov2014-11-124-12/+12
| | | | | | name rather than just name llvm-svn: 221812
* Provide gmlt-like inline scope information in the skeleton CU to facilitate ↵David Blaikie2014-11-042-1/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | | symbolication without needing the .dwo files Clang -gsplit-dwarf self-host -O0, binary increases by 0.0005%, -O2, binary increases by 25%. A large binary inside Google, split-dwarf, -O0, and other internal flags (GDB index, etc) increases by 1.8%, optimized build is 35%. The size impact may be somewhat greater in .o files (I haven't measured that much - since the linked executable -O0 numbers seemed low enough) due to relocations. These relocations could be removed if we taught the llvm-symbolizer to handle indexed addressing in the .o file (GDB can't cope with this just yet, but GDB won't be reading this info anyway). Also debug_ranges could be shared between .o and .dwo, though ideally debug_ranges would get a schema that could used index(+offset) addressing, and move to the .dwo file, then we'd be back to sharing addresses in the address pool again. But for now, these sizes seem small enough to go ahead with this. Verified that no other DW_TAGs are produced into the .o file other than subprograms and inlined_subroutines. llvm-svn: 221306
* Remove "REQUIRES:shell" from tests. They work for me.NAKAMURA Takumi2014-11-041-2/+0
| | | | llvm-svn: 221269
* CodeGen: Enable DWARF emission for MS ABI targetsDavid Majnemer2014-11-045-52/+64
| | | | | | | | | | | | | | This is experimental, just barely enough to get things to not immediately combust. A note for those who are curious: Only lld can successfully link the object files, other linkers truncate the section names making the debug sections illegible to debuggers. Even with this in mind, we believe we are having trouble with SECREL relocations. llvm-svn: 221245
* Revert r221150, as it broke sanitizer testsOliver Stannard2014-11-032-21/+2
| | | | llvm-svn: 221151
* Emit .eh_frame with relocations to functions, rather than sectionsOliver Stannard2014-11-032-2/+21
| | | | | | | | | | | | | | | | | | | | | | | When LLVM emits DWARF call frame information, it currently creates a local, section-relative symbol in the code section, which is pointed to by a relocation on the .eh_frame section. However, for C++ we emit some functions in section groups, and the SysV ABI has some rules to make it easier to remove these sections (http://www.sco.com/developers/gabi/latest/ch4.sheader.html#section_group_rules): A symbol table entry with STB_LOCAL binding that is defined relative to one of a group's sections, and that is contained in a symbol table section that is not part of the group, must be discarded if the group members are discarded. References to this symbol table entry from outside the group are not allowed. This means that we need to use the function symbol for the relocation, not a temporary symbol. There was a comment in the code claiming that the local symbol was used to avoid creating a relocation, but a relocation must be created anyway as the code and CFI are in different sections. llvm-svn: 221150
* Test 221067 in a fixed-target test so as not to fail on targets with ↵David Blaikie2014-11-011-0/+1
| | | | | | different DWARF encodings llvm-svn: 221071
OpenPOWER on IntegriCloud