summaryrefslogtreecommitdiffstats
path: root/llvm/test/DebugInfo
Commit message (Collapse)AuthorAgeFilesLines
...
* Introduce NativeEnumModules and NativeCompilandSymbolAdrian McCarthy2017-03-151-0/+65
| | | | | | | | | | | Together, these allow lldb-pdbdump to list all the modules from a PDB using a native reader (rather than DIA). Note that I'll probably be specializing NativeRawSymbol in a subsequent patch. Differential Revision: https://reviews.llvm.org/D30956 llvm-svn: 297883
* Revert "Debug Info: Add basic support for external types references."Adrian Prantl2017-03-131-52/+0
| | | | | | | | | | | | | | This reverts commit r242302. External type refs of this form were never used by any LLVM frontend so this is effectively dead code. (They were introduced to support clang module debug info, but in the end we came up with a better design that doesn't use this feature at all.) rdar://problem/25897929 Differential Revision: https://reviews.llvm.org/D30917 llvm-svn: 297684
* [AMDGPU] Split R600/SI getFrameIndexReference and emit stack object offsets ↵Konstantin Zhuravlyov2017-03-102-0/+203
| | | | | | | | for SI Differential Revision: https://reviews.llvm.org/D29674 llvm-svn: 297499
* [MC] Set SHT_MIPS_DWARF section type for all .debug_* sections on MIPSSimon Atanasyan2017-03-101-1/+1
| | | | | | | | | | | | All MIPS .debug_* sections should be marked with ELF type SHT_MIPS_DWARF accordingly the specification [1]. Also the same section type is assigned to these sections by GNU tools. [1] ftp.software.ibm.com/software/os390/czos/dwarf/mips_extensions.pdf Differential Revision: https://reviews.llvm.org/D29789 llvm-svn: 297447
* AMDGPU: add missing lit.local.cfg to test/DebugInfo/AMDGPUKonstantin Zhuravlyov2017-03-091-0/+2
| | | | llvm-svn: 297334
* [DebugInfo] Emit address space with DW_AT_address_class attribute for ↵Konstantin Zhuravlyov2017-03-082-0/+174
| | | | | | | | pointer and reference types Differential Revision: https://reviews.llvm.org/D29670 llvm-svn: 297320
* LiveDebugValues: Assume calls never clobber SP.Adrian Prantl2017-03-031-0/+326
| | | | | | | | | | | | | | A call should never modify the stack pointer, but some backends are not so sure about this and never list SP in the regmask. For the purposes of LiveDebugValues we assume a call never clobbers SP. We already have a similar workaround in DbgValueHistoryCalculator (which we hopefully can retire soon). This fixes the availabilty of local ASANified variables on AArch64. rdar://problem/27757381 llvm-svn: 296847
* Elide argument copies during instruction selectionReid Kleckner2017-03-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Avoids tons of prologue boilerplate when arguments are passed in memory and left in memory. This can happen in a debug build or in a release build when an argument alloca is escaped. This will dramatically affect the code size of x86 debug builds, because X86 fast isel doesn't handle arguments passed in memory at all. It only handles the x86_64 case of up to 6 basic register parameters. This is implemented by analyzing the entry block before ISel to identify copy elision candidates. A copy elision candidate is an argument that is used to fully initialize an alloca before any other possibly escaping uses of that alloca. If an argument is a copy elision candidate, we set a flag on the InputArg. If the the target generates loads from a fixed stack object that matches the size and alignment requirements of the alloca, the SelectionDAG builder will delete the stack object created for the alloca and replace it with the fixed stack object. The load is left behind to satisfy any remaining uses of the argument value. The store is now dead and is therefore elided. The fixed stack object is also marked as mutable, as it may now be modified by the user, and it would be invalid to rematerialize the initial load from it. Supersedes D28388 Fixes PR26328 Reviewers: chandlerc, MatzeB, qcolombet, inglorion, hans Subscribers: igorb, llvm-commits Differential Revision: https://reviews.llvm.org/D29668 llvm-svn: 296683
* [DWARF] Print leading zeros in type signaturePaul Robinson2017-03-013-2/+2
| | | | llvm-svn: 296663
* [DWARF] Default lower bound should respect requested DWARF version.Paul Robinson2017-03-011-0/+53
| | | | | | | | | | | | | DWARF may define a default lower-bound for arrays in languages defined in a particular DWARF version. But the logic to suppress an unnecessary lower-bound attribute was looking at the hard-coded default DWARF version, not the version that had been requested. Also updated the list with all languages defined in DWARF v5. Differential Revision: http://reviews.llvm.org/D30484 llvm-svn: 296652
* [WebAssembly] Convert the remaining unit tests to the new wasm-object-file ↵Dan Gohman2017-02-281-3/+3
| | | | | | | | | | | target. To facilitate this, add a new hidden command-line option to disable the explicit-locals pass. That causes llc to emit invalid code that doesn't have all locals converted to get_local/set_local, however it simplifies testwriting in many cases. llvm-svn: 296540
* [DWARFv5] Emit new unit header format.Paul Robinson2017-02-283-0/+178
| | | | | | | | | Requesting DWARF v5 will now get you the new compile-unit and type-unit headers. llvm-dwarfdump will also recognize them. Differential Revision: http://reviews.llvm.org/D30206 llvm-svn: 296514
* [IR/Verifier] Don't visit DISubprograms more than needed.Davide Italiano2017-02-181-0/+17
| | | | | | | | | | | | | Before this patch we happened to visit twice, one when scanning MDNodes and the other one while visiting the function. Remove the explicit call to visitDISubprogram there, so we don't emit the same error twice in case the verifier fail and we save some time when running it. Thanks to Justin Bogner for the report and Adrian for the quick review! PR: 31995 llvm-svn: 295537
* Verifier: Disallow a line number without a file in DISubprogramJustin Bogner2017-02-171-1/+1
| | | | | | | | A line number doesn't make much sense if you don't say where it's from. Add a verifier check for this and update some tests that had bogus debug info. llvm-svn: 295516
* Fix windows bots by locking down the target triple on this testcase.Adrian Prantl2017-02-171-1/+1
| | | | llvm-svn: 295490
* Debug Info: Sort frame index expressions before emitting them.Adrian Prantl2017-02-171-0/+85
| | | | | | | | | | This fixes PR31381, which caused an assertion and/or invalid debug info. This affects debug variables that have multiple fragments in the MMI side (i.e.: in the stack frame) table. rdar://problem/30571676 llvm-svn: 295486
* MC/COFF: Do not emit forward associative section referenceds.Rui Ueyama2017-02-172-2/+2
| | | | | | | | | | | | | | | | MSVC link.exe cannot handle associative sections that refer later sections in the section header. Technically, such COFF object doesn't violate the Microsoft COFF spec, as the spec doesn't say anything about that, but still we should avoid doing that to make it compatible with MS tools. This patch assigns smaller section numbers to non-associative sections and larger numbers to associative sections. This should resolve the compatibility issue. Differential Revision: https://reviews.llvm.org/D30080 llvm-svn: 295464
* Move test to X86 subdirectory for bot failuresTeresa Johnson2017-02-171-0/+0
| | | | | | Second attempt at fixing bot failures from r295384. llvm-svn: 295395
* Attempt to fix bot failures by adding -mtriple to llc invocationTeresa Johnson2017-02-171-1/+1
| | | | | | | Failures on hexagon from test added with r295384, e.g.: http://lab.llvm.org:8011/builders/llvm-hexagon-elf/builds/3793 llvm-svn: 295389
* Handle link of NoDebug CU with a CU that has debug emission enabledTeresa Johnson2017-02-171-0/+82
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This is an issue both with regular and Thin LTO. When we link together a DICompileUnit that is marked NoDebug (e.g when compiling with -g0 but applying an AutoFDO profile, which requires location tracking in the compiler) and a DICompileUnit with debug emission enabled, we can have failures during dwarf debug generation. Specifically, when we have inlined from the NoDebug compile unit into the debug compile unit, we can fail during construction of the abstract and inlined scope DIEs. This is because the SPMap does not include NoDebug CUs (they are skipped in the debug_compile_units_iterator). This patch fixes the failures by skipping locations from NoDebug CUs when extracting lexical scopes. Reviewers: dblaikie, aprantl Subscribers: mehdi_amini, llvm-commits Differential Revision: https://reviews.llvm.org/D29765 llvm-svn: 295384
* Refactor DebugHandlerBase a bit to common non-debug-having-function filteringDavid Blaikie2017-02-161-1/+1
| | | | llvm-svn: 295354
* Reapply r294532, reverted in r294787.Wolfgang Pieb2017-02-141-0/+468
| | | | | | | | | | | | | Store instructions can have more than one memory operand as a result of optimizations that fold different stores into one. When we identify spill instructions to generate DBG_VALUE instructions to record the spilling of a variable, we disregard stores with multiple memory operands for now. We may miss some relevant spills but the handling is a bit more complex, so we'll do it in a different patch. This fixes PR31935. llvm-svn: 295093
* Revert r294532, it caused PR31935Nico Weber2017-02-101-468/+0
| | | | llvm-svn: 294787
* Reapply r294356 ("Keep track of spilled variables in LiveDebugValues").Wolfgang Pieb2017-02-081-0/+468
| | | | | | | Was reverted with r294447 due to undefined behavior with negative offsets in DBG_VALUE instructions. llvm-svn: 294532
* Revert r294356, "DebugInfo: Track spilled variables in LiveDebugValues"NAKAMURA Takumi2017-02-081-468/+0
| | | | | | | | | | | | | | It caused undefined behavior in VarLoc. As far as I investigated, - VarLoc::VarLoc() treats negative offset value as InvalidKind. Consider the case that (int64_t)MI.getOperand(1).getImm() is negative and whether it satisfies ((uint64_t)Offset < (1ULL << 32)). - Comparison operators in VarLoc behave undefined since VarLoc::Loc.Hash is uninitialized in case of InvalidKind. I guess Offset (in VarLoc) could be made aware of signed, but I am not sure. So I have reverted it for now. llvm-svn: 294447
* DebugInfo: Track spilled variables in LiveDebugValuesWolfgang Pieb2017-02-071-0/+468
| | | | | | | | | | | | | When variables are spilled to the stack by the register allocator, keep track of their debug locations in LiveDebugValues and insert DBG_VALUE instructions at the appropriate place. Ensure that the locations are propagated down the dominator tree via the existing mechanisms. Reviewer: aprantl Differential Revision: https://reviews.llvm.org/D29500 llvm-svn: 294356
* Merge DebugLoc on combined stores; in this case, when combining storesPaul Robinson2017-02-061-0/+72
| | | | | | | | from the end of two blocks, merge instead of arbitrarily picking one. Differential Revision: http://reviews.llvm.org/D29504 llvm-svn: 294251
* DebugInfo: ensure type and namespace names are included in pubnames/pubtypes ↵David Blaikie2017-02-031-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | even when they are only present in type units While looking to add support for placing singular types (types that will only be emitted in one place (such as attached to a strong vtable or explicit template instantiation definition)) not in type units (since type units have overhead) I stumbled across that change causing an increase in pubtypes. Turns out we were missing some types from type units if they were only referenced from other type units and not from the debug_info section. This fixes that, following GCC's line of describing the offset of such entities as the CU die (since there's no compile unit-relative offset that would describe such an entity - they aren't in the CU). Also like GCC, this change prefers to describe the type stub within the CU rather than the "just use the CU offset" fallback where possible. This may give the DWARF consumer some opportunity to find the extra info in the type stub - though I'm not sure GDB does anything with this currently. The size of the pubnames/pubtypes sections now match exactly with or without type units enabled. This nearly triples (+189%) the pubtypes section for a clang self-host and grows pubnames by 0.07% (without compression). For a total of 8% increase in debug info sections of the objects of a Split DWARF build when using type units. llvm-svn: 293971
* Relax test so that it passes on OS X.Rafael Espindola2017-02-022-2/+2
| | | | llvm-svn: 293946
* Change how we handle section symbols on ELF.Rafael Espindola2017-02-026-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | On ELF every section can have a corresponding section symbol. When in an assembly file we have .quad .text the '.text' refers to that symbol. The way we used to handle them is to leave .text an undefined symbol until the very end when the object writer would map them to the actual section symbol. The problem with that is that anything before the end would see an undefined symbol. This could result in bad diagnostics (test/MC/AArch64/label-arithmetic-diags-elf.s), or incorrect results when using the asm streamer (est/MC/Mips/expansion-jal-sym-pic.s). Fixing this will also allow using the section symbol earlier for setting sh_link of SHF_METADATA sections. This patch includes a few hacks to avoid changing our behaviour when handling conflicts between section symbols and other symbols. I reported pr31850 to track that. llvm-svn: 293936
* Refactor the gmlt tests. (NFC)Dehao Chen2017-02-023-6/+7
| | | | llvm-svn: 293852
* Remove an assertion that doesn't hold when mixing -g and -gmlt throughPaul Robinson2017-02-011-0/+105
| | | | | | | | | | LTO. Replace it with a related assertion, ensuring that abstract variables appear only in abstract scopes. Part of PR31437. Differential Revision: http://reviews.llvm.org/D29430 llvm-svn: 293841
* Remove XFAIL for test/DebugInfo/Generic/gmlt_profiling.llDehao Chen2017-02-011-3/+0
| | | | | | | | | | | | | | Summary: test/DebugInfo/Generic/gmlt_profiling.ll will also pass on darwin, so we should remove the XFAIL in the test. Reviewers: dblaikie, aprantl Reviewed By: dblaikie Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D29431 llvm-svn: 293840
* Change debug-info-for-profiling from a TargetOption to a function attribute.Dehao Chen2017-02-014-15/+41
| | | | | | | | | | | | | | Summary: LTO requires the debug-info-for-profiling to be a function attribute. Reviewers: echristo, mehdi_amini, dblaikie, probinson, aprantl Reviewed By: mehdi_amini, dblaikie, aprantl Subscribers: aprantl, probinson, ahatanak, llvm-commits, mehdi_amini Differential Revision: https://reviews.llvm.org/D29203 llvm-svn: 293833
* Remove an assertion that doesn't hold when mixing -g and -gmlt throughPaul Robinson2017-02-011-0/+100
| | | | | | | | LTO. Part of PR31437. Differential Revision: http://reviews.llvm.org/D29310 llvm-svn: 293818
* stripDebugInfo() should remove DILocation's found in !llvm.loop metadataDaniel Sanders2017-01-281-0/+71
| | | | | | | | | | | | Summary: Patch by Michele Scandale (with a small tweak to 'CHECK-NOT' the last DILocation in the test) Subscribers: bogner, llvm-commits Differential Revision: https://reviews.llvm.org/D27980 llvm-svn: 293377
* [pdb] Fix failing testZachary Turner2017-01-251-1/+2
| | | | llvm-svn: 293091
* [pdb] Correctly parse the hash adjusters table from TPI stream.Zachary Turner2017-01-251-8/+6
| | | | | | | | | | | | | This is not a list of pairs, it is a hash table data structure. We now correctly parse this out and dump it from llvm-pdbdump. We still need to understand the conditions that lead to a type getting an entry in the hash adjuster table. That will be done in a followup investigation / patch. Differential Revision: https://reviews.llvm.org/D29090 llvm-svn: 293090
* [pdb] Write the Named Stream mapping to Yaml and binary.Zachary Turner2017-01-204-16/+39
| | | | | | Differential Revision: https://reviews.llvm.org/D28919 llvm-svn: 292665
* [mips] Fix debug information for __thread variablePetar Jovanovic2017-01-201-0/+22
| | | | | | | | | | | This patch fixes debug information for __thread variable on Mips using .dtprelword and .dtpreldword directives. Patch by Aleksandar Beserminji. Differential Revision: http://reviews.llvm.org/D28770 llvm-svn: 292624
* Add -debug-info-for-profiling to emit more debug info for sample pgo profile ↵Dehao Chen2017-01-192-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | collection Summary: SamplePGO binaries built with -gmlt to collect profile. The current -gmlt debug info is limited, and we need some additional info: * start line of all subprograms * linkage name of all subprograms * standalone subprograms (functions that has neither inlined nor been inlined) This patch adds these information to the -gmlt binary. The impact on speccpu2006 binary size (size increase comparing with -g0 binary, also includes data for -g binary, which does not change with this patch): -gmlt(orig) -gmlt(patched) -g 433.milc 4.68% 5.40% 19.73% 444.namd 8.45% 8.93% 45.99% 447.dealII 97.43% 115.21% 374.89% 450.soplex 27.75% 31.88% 126.04% 453.povray 21.81% 26.16% 92.03% 470.lbm 0.60% 0.67% 1.96% 482.sphinx3 5.77% 6.47% 26.17% 400.perlbench 17.81% 19.43% 73.08% 401.bzip2 3.73% 3.92% 12.18% 403.gcc 31.75% 34.48% 122.75% 429.mcf 0.78% 0.88% 3.89% 445.gobmk 6.08% 7.92% 42.27% 456.hmmer 10.36% 11.25% 35.23% 458.sjeng 5.08% 5.42% 14.36% 462.libquantum 1.71% 1.96% 6.36% 464.h264ref 15.61% 16.56% 43.92% 471.omnetpp 11.93% 15.84% 60.09% 473.astar 3.11% 3.69% 14.18% 483.xalancbmk 56.29% 81.63% 353.22% geomean 15.60% 18.30% 57.81% Debug info size change for -gmlt binary with this patch: 433.milc 13.46% 444.namd 5.35% 447.dealII 18.21% 450.soplex 14.68% 453.povray 19.65% 470.lbm 6.03% 482.sphinx3 11.21% 400.perlbench 8.91% 401.bzip2 4.41% 403.gcc 8.56% 429.mcf 8.24% 445.gobmk 29.47% 456.hmmer 8.19% 458.sjeng 6.05% 462.libquantum 11.23% 464.h264ref 5.93% 471.omnetpp 31.89% 473.astar 16.20% 483.xalancbmk 44.62% geomean 16.83% Reviewers: davidxl, echristo, dblaikie Reviewed By: echristo, dblaikie Subscribers: aprantl, probinson, llvm-commits, mehdi_amini Differential Revision: https://reviews.llvm.org/D25434 llvm-svn: 292457
* [DebugInfo] Handle same locations in DILocation::getMergedLocationRobert Lougher2017-01-121-0/+40
| | | | | | | | | | | Revision 289661 introduced the function DILocation::getMergedLocation for merging of debug locations. At the time is was simply a stub which always returned no location. This patch modifies getMergedLocation to handle the case where the two locations are the same or can't be discriminated. Differential Revision: https://reviews.llvm.org/D28521 llvm-svn: 291809
* Correct object file for implicit const testVictor Leschuk2017-01-101-0/+0
| | | | llvm-svn: 291601
* DebugInfo: support for DW_FORM_implicit_constVictor Leschuk2017-01-102-0/+2
| | | | | | | | | | | | Support for DW_FORM_implicit_const DWARFv5 feature. When this form is used attribute value goes to .debug_abbrev section (as SLEB). As this form would break any debug tool which doesn't support DWARFv5 it is guarded by dwarf version check. Attempt to use this form with dwarf version <= 4 is considered a fatal error. Differential Revision: https://reviews.llvm.org/D28456 llvm-svn: 291599
* [DWARF] Null out the debug locs of (loop invariant) instructions hoisted by ↵Wolfgang Pieb2017-01-061-0/+75
| | | | | | | | | | LICM in order to avoid jumpy line tables. Calls are left alone because they may be inlined. Differential Revision: https://reviews.llvm.org/D28390 llvm-svn: 291258
* Reapply "[SimplifyCFG] In sinkLastInstruction correctly set debugloc of ↵Robert Lougher2017-01-041-0/+70
| | | | | | | | | | | | | | | | | | | | common inst" This reapplies r289828 (reverted in r289833 as it broke the address sanitizer). The debugloc is now only set when the instruction is not a call, as this causes the verifier to assert (the inliner requires an inlinable callsite to have a debug loc if the caller and callee have debug info). Original commit message: Simplify CFG will try to sink the last instruction in a series of basic blocks, creating a "common" instruction in the successor block (sinkLastInstruction). When it does this, the debug location of the single instruction should be the merged debug locations of the commoned instructions. Original review: https://reviews.llvm.org/D27590 llvm-svn: 290973
* [framelowering] Skip dbg values when getting next/previous instruction.Florian Hahn2017-01-041-0/+39
| | | | | | | | | | | | | | | | | | | Summary: In mergeSPUpdates, debug values need to be ignored when getting the previous element, otherwise debug data could have an impact on codegen. In eliminateCallFramePseudoInstr, debug values after the erased element could have an impact on codegen and should be skipped. Closes PR31319 (https://llvm.org/bugs/show_bug.cgi?id=31319) Reviewers: aprantl, MatzeB, mkuper Subscribers: gbedwell, llvm-commits Differential Revision: https://reviews.llvm.org/D27688 llvm-svn: 290955
* Reapply "[CodeGen] Fix invalid DWARF info on Win64"Keno Fischer2017-01-021-17/+31
| | | | | | | This reapplies rL289013 (reverted in rL289014) with the fixes identified in D21731. Should hopefully pass the buildbots this time. llvm-svn: 290809
* [TBAAVerifier] Be stricter around verifying scalar nodesSanjoy Das2016-12-293-3/+3
| | | | | | | | | | | This fixes the issue exposed in PR31393, where we weren't trying sufficiently hard to diagnose bad TBAA metadata. This does reduce the variety in the error messages we print out, but I think the tradeoff of verifying more, simply and quickly overrules the need for more helpful error messags here. llvm-svn: 290713
* Fix an assertion in DwarfExpression when emitting fragments in vector registersAdrian Prantl2016-12-221-0/+66
| | | | | | | | | | | | | When DwarfExpression is emitting a fragment that is located in a register and that fragment is smaller than the register, and the register must be composed from sub-registers (are you still with me?) the last DW_OP_piece operation must not be larger than the size of the fragment itself, since the last piece of the fragment could be smaller than the last subregister that is being emitted. rdar://problem/29779065 llvm-svn: 290324
OpenPOWER on IntegriCloud