summaryrefslogtreecommitdiffstats
path: root/llvm/test/DebugInfo
Commit message (Collapse)AuthorAgeFilesLines
* dwarfdump: Reference the appropriate line table segment when dumping dwp filesDavid Blaikie2015-11-171-2/+14
| | | | | | Also improves .dwo type unit dumping which didn't handle this either. llvm-svn: 253377
* Update DebugInfo tests for the change in DEBUG_VALUE output in r253338.Dan Gohman2015-11-177-9/+9
| | | | llvm-svn: 253340
* dwarfdump: Use the index to find the right abbrev offset in DWP filesDavid Blaikie2015-11-172-7/+24
| | | | llvm-svn: 253277
* Fix r253186 test caseKeno Fischer2015-11-161-1/+2
| | | | | | | Referencing a DILocation whose scope is a different subprogram causes an assertion failure. llvm-svn: 253187
* [DIBuilder] Make createReferenceType take size and alignKeno Fischer2015-11-161-0/+46
| | | | | | | | | | | | | | | | | | Summary: Since we're passing references to dbg.value as pointers, we need to have the frontend properly declare their sizes and alignments (as it already does for regular pointers) in preparation for my upcoming patch to have the verifer check that the sizes agree. Also augment the backend logic that skips actually emitting this information into DWARF such that it also handles reference types. Reviewers: aprantl, dexonsmith, dblaikie Subscribers: dblaikie, llvm-commits Differential Revision: http://reviews.llvm.org/D14275 llvm-svn: 253186
* dwarfdump: Add support for dumping the table contents of DWP indexesDavid Blaikie2015-11-131-10/+10
| | | | | | | | | | | | | This is a recommit of 252842 which was reverted in 252859. The issue was using %s format specifier for a StringRef - used Format's left_justify(StringRef, int) instead. It'd be nice to have __attribute__((format(..))) on llvm::format, but apparently it's only implemented for c-style variadics, not C++ variadic templates. Perhaps we could fix that & conditionalize the attribute on such... llvm-svn: 253065
* Re-apply "[mips] Use correct frame register for DWARF info when dynamically ↵Vasileios Kalintiris2015-11-122-0/+281
| | | | | | | | | realigning the stack."" r252219 reversed the direction of subprogram -> function edge. Fixed the IR to account for this. llvm-svn: 252895
* Revert "[mips] Use correct frame register for DWARF info when dynamically ↵Vasileios Kalintiris2015-11-122-281/+0
| | | | | | | | | realigning the stack." This reverts commit r252882. LLParser complains for invalid field 'function' in DISubprogram. llvm-svn: 252884
* [mips] Use correct frame register for DWARF info when dynamically realigning ↵Vasileios Kalintiris2015-11-122-0/+281
| | | | | | | | | | | | | | | | | | | the stack. Summary: This patch overrides TargetFrameLowering::getFrameIndexReference() in order to specify the correct register when the function needs dynamic stack realignment. The values returned from this function are used in order to create DW_AT_locations for DWARF info. These locations would use the wrong registers as it's been reported in PR25028. Reviewers: dsanders Subscribers: dean, llvm-commits Differential Revision: http://reviews.llvm.org/D13511 llvm-svn: 252882
* dwarfdump: Added macro support to llvm-dwarfdump tool.Amjad Aboud2015-11-125-0/+44
| | | | | | | | Added "macro" option to "-debug-dump" flag, which trigger parsing and dumping of the ".debug_macinfo" section. Differential Revision: http://reviews.llvm.org/D14294 llvm-svn: 252866
* Mostly revert 252842 due to failures on some buildbots.David Blaikie2015-11-121-10/+10
| | | | | | | | | | | | | | I imagine there's some UB in here somewhere, though Valgrind doesn't seem to have picked it up (not sure if I have a working asan build right now to test there). GDB bot seems to be crashing: http://lab.llvm.org:8011/builders/clang-x86_64-ubuntu-gdb-75/builds/26267/steps/check-all/logs/FAIL%3A%20LLVM%3A%3Adwarfdump-dwp.test Hexagon ELF bot is, presumably, just getting different output: http://lab.llvm.org:8011/builders/clang-hexagon-elf/builds/32927/steps/check-all/logs/FAIL%3A%20LLVM%3A%3Adwarfdump-dwp.test llvm-svn: 252859
* dwarfdump: Dump the contents of DWP indexesDavid Blaikie2015-11-122-13/+12
| | | | llvm-svn: 252842
* dwarfdump: DWP type unit index dumping skeletonDavid Blaikie2015-11-111-5/+12
| | | | llvm-svn: 252786
* dwarfdump: First piece of support for DWP dumpingDavid Blaikie2015-11-112-0/+19
| | | | | | Just a tiny piece of index dumping - the header in this instance. llvm-svn: 252781
* Emit discriminator for inlined callsites.Dehao Chen2015-11-111-0/+52
| | | | | | | | | | | | Summary: Inlined callsites need to be emitted in debug info so that sample profile can be annotated to the correct inlined instance. Reviewers: dnovillo, dblaikie Subscribers: dblaikie, llvm-commits Differential Revision: http://reviews.llvm.org/D14511 llvm-svn: 252768
* test/DebugInfo/ARM/prologue_end.ll references thumbv1, which is invalid.Artyom Skrobov2015-11-111-1/+1
| | | | | | | | The committer didn't respond at http://reviews.llvm.org/D14338, so we've got to fix this for them. This test doesn't pass with thumbv6, so I suppose what they meant is thumbv7. llvm-svn: 252754
* DI: Reverse direction of subprogram -> function edge.Peter Collingbourne2015-11-05206-647/+647
| | | | | | | | | | | | | | | | | | | | | | | Previously, subprograms contained a metadata reference to the function they described. Because most clients need to get or set a subprogram for a given function rather than the other way around, this created unneeded inefficiency. For example, many passes needed to call the function llvm::makeSubprogramMap() to build a mapping from functions to subprograms, and the IR linker needed to fix up function references in a way that caused quadratic complexity in the IR linking phase of LTO. This change reverses the direction of the edge by storing the subprogram as function-level metadata and removing DISubprogram's function field. Since this is an IR change, a bitcode upgrade has been provided. Fixes PR23367. An upgrade script for textual IR for out-of-tree clients is attached to the PR. Differential Revision: http://reviews.llvm.org/D14265 llvm-svn: 252219
* Remove windows line endings introduced by r252177. NFC.Tim Northover2015-11-054-172/+172
| | | | llvm-svn: 252217
* [DebugInfo] Fix ARM/AArch64 prologue_end position. Related to D11268.Oleg Ranevskyy2015-11-054-0/+172
| | | | | | | | | | | | | | | | | | | Summary: This review is related to another review request http://reviews.llvm.org/D11268, does the same and merely fixes a couple of issues with it. D11268 is quite old and has merge conflicts against the current trunk. This request - rebases D11268 onto the new trunk; - resolves the merge conflicts; - fixes the prologue_end tests, which do not pass due to the subprogram definitions not marked as distinct. Reviewers: echristo, rengolin, kubabrecka Subscribers: aemerson, rengolin, jyknight, dsanders, llvm-commits, asl Differential Revision: http://reviews.llvm.org/D14338 llvm-svn: 252177
* Fix the test case for Windows.Alexey Samsonov2015-11-041-1/+1
| | | | llvm-svn: 252027
* [llvm-symbolizer] Improve the test for missing input file.Alexey Samsonov2015-11-041-1/+3
| | | | llvm-svn: 252020
* [LLVMSymbolize] Use symbol table only if function linkage name was requested.Alexey Samsonov2015-10-261-1/+1
| | | | | | | Now it's enough to just specify -functions=short without additionally providing -use-symbol-table=false. llvm-svn: 251339
* s/NumFiles/NumStreams/David Majnemer2015-10-151-1/+1
| | | | llvm-svn: 250357
* [llvm-pdbdump] Provide a mechanism to dump the raw contents of a PDBDavid Majnemer2015-10-154-7/+19
| | | | | | | | | A PDB can be thought of as a very simple file system. It is occasionally illuminating to see the contents of the underlying files. Differential Revision: http://reviews.llvm.org/D13674 llvm-svn: 250356
* [Debug] Look through bitcasts to find argument registersOliver Stannard2015-10-121-0/+45
| | | | | | | | | | On targets where f32 is not legal, we have to look through a BITCAST SDNode to find the register that an argument is stored in when emitting debug info, or we will not be able to emit a DW_AT_location for it. Differential Revision: http://reviews.llvm.org/D13005 llvm-svn: 250056
* Move test back to Generic now it's fixed the right way (thanks Eric!)David Blaikie2015-10-071-0/+0
| | | | | | | | I knee-jerk tried to fix this in completely the wrong way - it's not an CPU limitation, but an OS/object file type one, so moving it into a CPU-specific classification didn't help at all. llvm-svn: 249562
* Remove the comdat-ness from the testcase as it won't lower properlyEric Christopher2015-10-071-3/+1
| | | | | | | on darwin with it since darwin doesn't have comdat and it isn't necessary for the testcase. llvm-svn: 249504
* Move test to X86-specific due to some IR invalid on other targetsDavid Blaikie2015-10-071-0/+0
| | | | llvm-svn: 249489
* DebugInfo: Include the decl_line/decl_file in subprogram definitions if they ↵David Blaikie2015-10-073-1/+98
| | | | | | | | | | | | | | | differ from those in the declaration This is handy for some AutoFDO stuff, and seems like a minor improvement to correctness (otherwise a debug info consumer might think the decl line/file of the def was the same as that of the declaration - though what a consumer might use that for, I'm not sure - maybe "list <func>" would've misbehaved with the old behavior?) and at a minor cost (in my experiment, with fission, without type units, without compression, 0.01% growth in debug info in the executable/objects, 0.02% growth in the .dwo files). llvm-svn: 249487
* [Hexagon] XFAILing test while diagnosing backend error.Colin LeMahieu2015-10-011-0/+1
| | | | llvm-svn: 249088
* [Hexagon] XFAILing test while diagnosing backend error.Colin LeMahieu2015-10-011-0/+1
| | | | llvm-svn: 249075
* Move dw_op_minus test to DebugInfo/X86.Evgeniy Stepanov2015-09-301-0/+0
| | | | | | | | The test requires X86 target support, and checks the actual debug info contents, including register numbers which would be different on other platforms. llvm-svn: 248938
* Fix debug info with SafeStack.Evgeniy Stepanov2015-09-301-0/+84
| | | | llvm-svn: 248933
* Add REQUIRES: default_triple to these testcases.Adrian Prantl2015-09-242-1/+3
| | | | llvm-svn: 248452
* Debug Info: Emit the dwo_name only in skeleton CUs, not in DWOs.Adrian Prantl2015-09-222-0/+29
| | | | llvm-svn: 248340
* SelectionDAGDumper: Hide [ID=X], [ORD=X] and source locations by default.Matthias Braun2015-09-182-2/+2
| | | | | | | | You can show them with the new -dag-dump-verbose switch. Differential Revision: http://reviews.llvm.org/D12566 llvm-svn: 248011
* SelectionDAG: Introduce PersistentID to SDNode for assert builds.Matthias Braun2015-09-182-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This gives us more human readable numbers to identify nodes in debug dumps. Before: 0x7fcbd9700160: ch = EntryToken 0x7fcbd985c7c8: i64 = Register %RAX ... 0x7fcbd9700160: <multiple use> 0x7fcbd985c578: i64,ch = MOV64rm 0x7fcbd985c6a0, 0x7fcbd985cc68, 0x7fcbd985c200, 0x7fcbd985cd90, 0x7fcbd985ceb8, 0x7fcbd9700160<Mem:LD8[@foo]> [ORD=2] 0x7fcbd985c8f0: ch,glue = CopyToReg 0x7fcbd9700160, 0x7fcbd985c7c8, 0x7fcbd985c578 [ORD=3] 0x7fcbd985c7c8: <multiple use> 0x7fcbd985c8f0: <multiple use> 0x7fcbd985c8f0: <multiple use> 0x7fcbd985ca18: ch = RETQ 0x7fcbd985c7c8, 0x7fcbd985c8f0, 0x7fcbd985c8f0:1 [ORD=3] Now: t0: ch = EntryToken t5: i64 = Register %RAX ... t0: <multiple use> t3: i64,ch = MOV64rm t10, t12, t11, t13, t14, t0<Mem:LD8[@foo]> [ORD=2] t6: ch,glue = CopyToReg t0, t5, t3 [ORD=3] t5: <multiple use> t6: <multiple use> t6: <multiple use> t7: ch = RETQ t5, t6, t6:1 [ORD=3] Differential Revision: http://reviews.llvm.org/D12564 llvm-svn: 248010
* Copy back Inputs/gmlt.ll. Also DebugInfo/X86/gmlt.test uses it.NAKAMURA Takumi2015-09-161-0/+153
| | | | llvm-svn: 247777
* Fix test gmlt.test by moving its Inputs where expected.Mehdi Amini2015-09-161-0/+0
| | | | | | | I couldn't see the failure as the test is XFAIL'ed on Darwin. From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 247776
* Make the default triple optional by allowing an empty stringMehdi Amini2015-09-1677-3/+3
| | | | | | | | | | | | | | | When building LLVM as a (potentially dynamic) library that can be linked against by multiple compilers, the default triple is not really meaningful. We allow to explicitely set it to an empty string when configuring LLVM. In this case, said "target independent" tests in the test suite that are using the default triple are disabled by matching the newly available feature "default_triple". Reviewers: probinson, echristo Differential Revision: http://reviews.llvm.org/D12660 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 247775
* DwarfDebug: Emit dwo_id+dwo_name for DICompileUnits that provide a dwoId.Adrian Prantl2015-09-141-0/+15
| | | | | | | For module debugging clang emits prefabricated skeleton compile units that can be recognized by a nonzero dwoId. llvm-svn: 247626
* [opaque pointer type] Add textual IR support for explicit type parameter for ↵David Blaikie2015-09-113-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | global aliases update.py: import fileinput import sys import re alias_match_prefix = r"(.*(?:=|:|^)\s*(?:external |)(?:(?:private|internal|linkonce|linkonce_odr|weak|weak_odr|common|appending|extern_weak|available_externally) )?(?:default |hidden |protected )?(?:dllimport |dllexport )?(?:unnamed_addr |)(?:thread_local(?:\([a-z]*\))? )?alias" plain = re.compile(alias_match_prefix + r" (.*?))(| addrspace\(\d+\) *)\*($| *(?:%|@|null|undef|blockaddress|addrspacecast|\[\[[a-zA-Z]|\{\{).*$)") cast = re.compile(alias_match_prefix + r") ((?:bitcast|inttoptr|addrspacecast)\s*\(.* to (.*?)(| addrspace\(\d+\) *)\*\)\s*(?:;.*)?$)") gep = re.compile(alias_match_prefix + r") ((?:getelementptr)\s*(?:inbounds)?\s*\((?P<type>.*), (?P=type)(?:\s*addrspace\(\d+\)\s*)?\* .*\)\s*(?:;.*)?$)") def conv(line): m = re.match(cast, line) if m: return m.group(1) + " " + m.group(3) + ", " + m.group(2) m = re.match(gep, line) if m: return m.group(1) + " " + m.group(3) + ", " + m.group(2) m = re.match(plain, line) if m: return m.group(1) + ", " + m.group(2) + m.group(3) + "*" + m.group(4) + "\n" return line for line in sys.stdin: sys.stdout.write(conv(line)) apply.sh: for name in "$@" do python3 `dirname "$0"`/update.py < "$name" > "$name.tmp" && mv "$name.tmp" "$name" rm -f "$name.tmp" done The actual commands: From llvm/src: find test/ -name *.ll | xargs ./apply.sh From llvm/src/tools/clang: find test/ -name *.mm -o -name *.m -o -name *.cpp -o -name *.c | xargs -I '{}' ../../apply.sh "{}" From llvm/src/tools/polly: find test/ -name *.ll | xargs ./apply.sh llvm-svn: 247378
* Debug Info: Allow a DIModule to appear as the scope of other entities.Adrian Prantl2015-09-101-0/+30
| | | | llvm-svn: 247304
* AsmPrinter: Allow null subroutine typeDuncan P. N. Exon Smith2015-08-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | Currently the DWARF backend requires that subprograms have a type, and the type is ignored if it has an empty type array. The long term direction here -- see PR23079 -- is instead to skip the type entirely if there's no valid type. It turns out we have cases in tree of missing types on subprograms, but since they're not referenced by compile units, the backend never crashes on them. One option would be to add a Verifier check that subprograms have types, and fix the bitrot. However, this is a fair bit of churn (20-30 testcases) that would be reversed anyway by PR23079. I found this inconsistency because of a WIP patch and upgrade script for PR23367 that started crashing on test/DebugInfo/2010-10-01-crash.ll. This commit updates the testcase to reference the subprogram from the compile unit, and fixes the resulting crash (in line with the direction of PR23079). This also updates `DIBuilder` to stop assuming a non-null pointer for the subroutine types. llvm-svn: 246333
* DI: Require subprogram definitions to be distinctDuncan P. N. Exon Smith2015-08-28206-358/+358
| | | | | | | | | | | | | | | | | | | | | | | | As a follow-up to r246098, require `DISubprogram` definitions (`isDefinition: true`) to be 'distinct'. Specifically, add an assembler check, a verifier check, and bitcode upgrading logic to combat testcase bitrot after the `DIBuilder` change. While working on the testcases, I realized that test/Linker/subprogram-linkonce-weak-odr.ll isn't relevant anymore. Its purpose was to check for a corner case in PR22792 where two subprogram definitions match exactly and share the same metadata node. The new verifier check, requiring that subprogram definitions are 'distinct', precludes that possibility. I updated almost all the IR with the following script: git grep -l -E -e '= !DISubprogram\(.* isDefinition: true' | grep -v test/Bitcode | xargs sed -i '' -e 's/= \(!DISubprogram(.*, isDefinition: true\)/= distinct \1/' Likely some variant of would work for out-of-tree testcases. llvm-svn: 246327
* [mips] Remove incorrect DebugLoc entries from prologuePetar Jovanovic2015-08-282-2/+72
| | | | | | | | | | This has been causing the prologue_end to be incorrectly positioned. Patch by Vladimir Radosavljevic. Differential Revision: http://reviews.llvm.org/D11293 llvm-svn: 246309
* [dwarfdump] Do not apply relocations in mach-o files if there is no ↵Frederic Riss2015-08-232-0/+27
| | | | | | | | | | | | | | LoadedObjectInfo. Not only do we not need to do anything to read correct values from the object files, but the current logic actually wrongly applies twice the section base address when there is no LoadedObjectInfo passed to the DWARFContext creation (as the added test shows). Simply do not apply any relocations on the mach-o debug info if there is no load offset to apply. llvm-svn: 245807
* delete more dead code from this testcase.Adrian Prantl2015-08-211-3/+0
| | | | llvm-svn: 245643
* Further reduce the IR in this testcase based on a further reductionAdrian Prantl2015-08-201-98/+80
| | | | | | of the original source by David Blaikie (thanks!). llvm-svn: 245642
* Fix a debug location handling bug in GVN.Adrian Prantl2015-08-201-0/+135
| | | | | | | | | | | | | | Caught by the famous "DebugLoc describes the currect SubProgram" assertion. When GVN is removing a nonlocal load it updates the debug location of the SSA value it replaced the load with with the one of the load. In the testcase this actually overwrites a valid debug location with an empty one. In reality GVN has to make an arbitrary choice between two equally valid debug locations. This patch changes to behavior to only update the location if the value doesn't already have a debug location. llvm-svn: 245588
OpenPOWER on IntegriCloud