1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

316 Commits

Author SHA1 Message Date
David Blaikie
e9b9cea9b1 DebugInfo: Demonstrate that we're not currently uniquing address table entries in fission
Since I just discovered this while poking at other things, here's the
test case so I have it to come back to later.

llvm-svn: 201267
2014-02-12 23:03:54 +00:00
David Blaikie
f000ab907f DebugInfo: Merge fission and non-fission (and 32 and 64 bit) tests for TLS support.
llvm-svn: 201266
2014-02-12 23:03:51 +00:00
Adrian Prantl
5b1e439b75 Debug info: Bugfix for r201190: DW_OP_piece takes bytes, not bits.
rdar://problem/16015314

llvm-svn: 201253
2014-02-12 19:34:44 +00:00
David Blaikie
acf90a3777 DwarfUnit: Include type unit's file strings in the defining compile unit's 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
2014-02-12 00:40:47 +00:00
Adrian Prantl
42b57f6dee Reapply r201180 with an additional error path.
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
2014-02-11 22:22:15 +00:00
Adrian Prantl
dbf8ec2eec Revert "Debug info: Emit values in subregisters that do not have a separate"
This reverts commit r201179 for buildbot breakage.

llvm-svn: 201188
2014-02-11 22:03:30 +00:00
Adrian Prantl
a3d563a0d0 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: 201180
2014-02-11 21:22:59 +00:00
David Blaikie
96c0bb7cc5 DebugInfo: Remove some unneeded conditionals now that DIBuilder no longer 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
2014-02-04 01:23:52 +00:00
David Blaikie
d3fdfda01f DebugInfo: Flag type unit references as declarations
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
2014-01-31 19:52:26 +00:00
Timur Iskhodzhanov
2cf4619945 Reland r200340 - 'Add line table debug info to COFF files when using a win32 triple'
This incorporates a couple of fixes reviewed at http://llvm-reviews.chandlerc.com/D2651

llvm-svn: 200440
2014-01-30 01:39:17 +00:00
Eric Christopher
d551c8ded2 If we use DW_AT_ranges we need to specify a base address that ranges
are relative to in the compile unit. Currently let's just use 0...

Thanks to Greg Clayton for the catch!

llvm-svn: 200425
2014-01-29 22:22:56 +00:00
Eric Christopher
6cbd91d874 Turn on CU ranges if we've got multiple compile units in the same
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
2014-01-29 22:06:27 +00:00
NAKAMURA Takumi
782750fa03 Revert r200340, "Add line table debug info to COFF files when using a win32 triple."
It was incompatible with --target=i686-win32.

llvm-svn: 200375
2014-01-29 06:05:38 +00:00
Timur Iskhodzhanov
53b4a3ded1 Add line table debug info to COFF files when using a win32 triple.
Reviewed at http://llvm-reviews.chandlerc.com/D2232

llvm-svn: 200340
2014-01-28 21:33:27 +00:00
Alp Toker
1c4b33e8e5 Fix known typos
Sweep the codebase for common typos. Includes some changes to visible function
names that were misspelt.

llvm-svn: 200018
2014-01-24 17:20:08 +00:00
Eric Christopher
978cb80bd7 Revert "Use DW_AT_high_pc and DW_AT_low_pc for the high and low pc for a"
in order to fix the cygwin/mingw bots.

This reverts commit r199990.

llvm-svn: 199991
2014-01-24 11:52:53 +00:00
Eric Christopher
4f169ecdfb Use DW_AT_high_pc and DW_AT_low_pc for the high and low pc for a
compile unit. Make these relocations on the platforms that need
relocations and add a routine to ensure that we don't put the
addresses in an offset table for split dwarf.

llvm-svn: 199990
2014-01-24 11:40:29 +00:00
Eric Christopher
16c9a612bc Make the use of DW_AT_ranges in the compile unit depend also upon
the existence of comdat/special sections.

llvm-svn: 199954
2014-01-23 22:55:47 +00:00
Eric Christopher
d038656624 Move test to x86 directory.
llvm-svn: 199927
2014-01-23 19:32:19 +00:00
Eric Christopher
c6424df0d3 Make sure we emit a relocation to the debug_ranges section in the
presence of CU ranges.

llvm-svn: 199276
2014-01-15 00:04:29 +00:00
Eric Christopher
595b4c0399 Add testcase for r199263 forgotten in commit.
llvm-svn: 199267
2014-01-14 22:57:52 +00:00
David Blaikie
7af36c3a6d Revert "Revert r198851, "Prototype of skeleton type units for fission""
This reverts commit r198865 which reverts r198851.

ASan identified a use-of-uninitialized of the DwarfTypeUnit::Ty variable
in skeleton type units.

llvm-svn: 198908
2014-01-10 01:38:41 +00:00
NAKAMURA Takumi
d87c5b8748 Revert r198851, "Prototype of skeleton type units for fission"
It caused undefined behavior. DwarfTypeUnit::Ty might not be initialized properly, I guess.

llvm-svn: 198865
2014-01-09 13:08:00 +00:00
David Blaikie
fbb88d8a1f Prototype of skeleton type units for fission
llvm-svn: 198851
2014-01-09 05:08:28 +00:00
David Blaikie
cc6bbc4be1 DwarfDebug: Refactor out common skeleton construction code to be reused for type unit skeletons.
llvm-svn: 198846
2014-01-09 04:28:46 +00:00
David Blaikie
52f79eb8c1 llvm-dwarfdump: reorder dwo sections to immediately proceed their non-dwo equivalents
This makes it easier to write a test that's mostly shared between
fission and non-fission (using FileCheck's multiple prefix support).

llvm-svn: 198806
2014-01-08 23:29:59 +00:00
Benjamin Kramer
07dd66b494 Emit arange padding with a single directive.
llvm-svn: 198700
2014-01-07 19:28:14 +00:00
David Blaikie
1da0d0e284 Revert "Revert "Debug Info: Type Units: Simplify type hashing using IR-provided unique names.""
This reverts commit r198398, thus reapplying r198397.

I had accidentally introduced an endianness issue when applying the hash
to the type unit. Using support::ulittle64_t in the reinterpret_cast in
addDwarfTypeUnitType fixes this issue.

Original commit message:

Debug Info: Type Units: Simplify type hashing using IR-provided unique
names.

What's good for LTO metadata size problems ought to be good for non-LTO
debug info size too, so let's rely on the same uniqueness in both cases.
If it's insufficient for non-LTO for whatever reason (since we now won't
be uniquing CU-local types or any C types - but these are likely to not
be the most significant contributors to type bloat) we should consider a
frontend solution that'll help both LTO and non-LTO alike, rather than
using DWARF-level DIE-hashing that only helps non-LTO debug info size.

It's also much simpler this way and benefits C++ even more since we can
deduplicate lexically separate definitions of the same C++ type since
they have the same mangled name.

llvm-svn: 198436
2014-01-03 18:59:42 +00:00
David Blaikie
da9c5e06c4 Revert "Debug Info: Type Units: Simplify type hashing using IR-provided unique names."
Reverting due to bot failure I won't have time to investigate until
tomorrow.

This reverts commit r198397.

llvm-svn: 198398
2014-01-03 04:49:04 +00:00
David Blaikie
680e4ef4b3 Debug Info: Type Units: Simplify type hashing using IR-provided unique names.
What's good for LTO metadata size problems ought to be good for non-LTO
debug info size too, so let's rely on the same uniqueness in both cases.
If it's insufficient for non-LTO for whatever reason (since we now won't
be uniquing CU-local types or any C types - but these are likely to not
be the most significant contributors to type bloat) we should consider a
frontend solution that'll help both LTO and non-LTO alike, rather than
using DWARF-level DIE-hashing that only helps non-LTO debug info size.

It's also much simpler this way and benefits C++ even more since we can
deduplicate lexically separate definitions of the same C++ type since
they have the same mangled name.

llvm-svn: 198397
2014-01-03 04:20:26 +00:00
David Blaikie
ed7ee5f271 Revert "Reverting r193835 due to weirdness with Go..."
The cgo problem was that it wants dwarf2 which doesn't support direct
constant encoding of the location. So let's add support for dwarf2
encoding (using a location expression) of data member locations.

This reverts commit r198385.

llvm-svn: 198389
2014-01-03 01:30:05 +00:00
David Blaikie
3687ef3db7 Reverting r193835 due to weirdness with Go...
Apologies for the noise - we're seeing some Go failures with cgo
interacting with Clang's debug info due to this change.

llvm-svn: 198385
2014-01-03 00:48:38 +00:00
Adrian Prantl
d6e0cd78c9 Revert "Debug info: Add enumerators to the __apple_names accelerator table."
This reverts r197927 until the discussion on llvm-commits comes to a
conclusion.

llvm-svn: 198333
2014-01-02 18:48:24 +00:00
Eric Christopher
2ceb2862cb Revert r198208 and reapply:
r198196: Use a pointer to keep track of the skeleton unit for each normal unit and construct it up front.
      r198199: Reapply r198196 with a fix to zero initialize the skeleton pointer.
      r198202: Fix aranges and split dwarf by ensuring that the symbol and relocation back to the compile unit from the aranges section is to the skeleton unit and not the one in the dwo.

with a fix to use integer 0 for DW_AT_low_pc since the relocation to the text section symbol was causing issues with COFF. Accordingly remove addLocalLabelAddress and machinery since we're not currently using it.

llvm-svn: 198222
2013-12-30 17:22:27 +00:00
NAKAMURA Takumi
c905b89ce0 Revert r198199 (and r198202). It broke 3 DebugInfo tests for targeting i686-cygming.
r198196: Use a pointer to keep track of the skeleton unit for each normal unit and construct it up front.
  r198199: Reapply r198196 with a fix to zero initialize the skeleton pointer.
  r198202: Fix aranges and split dwarf by ensuring that the symbol and relocation back to the compile unit from the aranges section is to the skeleton unit and not the one in the dwo.

They could be reproducible with explicit target.

  llvm/lib/MC/WinCOFFObjectWriter.cpp:224: bool {anonymous}::COFFSymbol::should_keep() const: Assertion `Section->Number != -1 && "Sections with relocations must be real!"' failed.

llvm-svn: 198208
2013-12-30 09:26:10 +00:00
Eric Christopher
4a8a28d5d8 Fix aranges and split dwarf by ensuring that the symbol and relocation
back to the compile unit from the aranges section is to the skeleton
unit and not the one in the dwo.

Do this by adding a method to grab a forwarded on local sym and local
section by querying the skeleton if one exists and using that. Add
a few tests to verify the relocations are back to the correct section.

llvm-svn: 198202
2013-12-30 05:25:49 +00:00
Eric Christopher
e786f550dd Reapply r198196 with a fix to zero initialize the skeleton pointer.
llvm-svn: 198199
2013-12-30 03:40:32 +00:00
Eric Christopher
747bcf57ed Temporarily revert "Use a pointer to keep track of the skeleton unit for
each normal unit" as it seems to be causing problems in the asan tests.

llvm-svn: 198197
2013-12-30 03:12:31 +00:00
Eric Christopher
da5f0a0247 Use a pointer to keep track of the skeleton unit for each normal unit
and construct it up front. Add address ranges at the end and a helper
routine so that we're not needlessly using an indirction in the case
of split dwarf.

Update testcases according to the new ordering of attributes on
the compile unit.

llvm-svn: 198196
2013-12-30 03:02:12 +00:00
Adrian Prantl
3dee74d75c Debug info: Add enumerators to the __apple_names accelerator table.
rdar://problem/11516681.

llvm-svn: 197927
2013-12-23 23:50:20 +00:00
Adrian Prantl
7b852893ea move test back into the parent directory and add a REQUIRES: obj emission.
llvm-svn: 197759
2013-12-20 00:37:18 +00:00
Adrian Prantl
15572f3199 Move testcase to the appropriate X86 subdirectory.
llvm-svn: 197701
2013-12-19 17:09:05 +00:00
David Blaikie
8a09ed5776 DebugInfo: Move type units into the debug_types section with appropriate comdat grouping and type unit headers
This commit does not complete the type units feature - there are issues
around fission support (skeletal type units, pubtypes/pubnames) and
hashing of some types including those containing references to types in
other type units.

Originally committed as r197073 and reverted in r197079.
Recommitted as r197197 to reproduce the failure and reverted as r197199

Turns out there was unstable ordering in the type unit dumping code.
Fixed by using MapVector in DWARFContext to store the debug_types
comdat sections.

Recommitted as r197210 with a fix to dumping and reverted as r197211
because I was a bit gun shy and thought I saw a failure that turned out
to be unrelated.

So here we go - once more with feeling! \o/

llvm-svn: 197275
2013-12-13 21:33:40 +00:00
David Blaikie
d33cff338c Revert "DebugInfo: Move type units into the debug_types section with appropriate comdat grouping and type unit headers"
This reverts commit r197210.

llvm-svn: 197211
2013-12-13 06:43:32 +00:00
David Blaikie
46261ea89d DebugInfo: Move type units into the debug_types section with appropriate comdat grouping and type unit headers
This commit does not complete the type units feature - there are issues
around fission support (skeletal type units, pubtypes/pubnames) and
hashing of some types including those containing references to types in
other type units.

Originally committed as r197073 and reverted in r197079.
Recommitted as r197197 to reproduce the failure and reverted as r197199

Turns out there was unstable ordering in the type unit dumping code.
Fixed by using MapVector in DWARFContext to store the debug_types
comdat sections.

llvm-svn: 197210
2013-12-13 06:27:38 +00:00
David Blaikie
9606efaed1 Revert "DebugInfo: Move type units into the debug_types section with appropriate comdat grouping and type unit headers"
This reverts commit r197197.

llvm-svn: 197199
2013-12-13 01:24:54 +00:00
David Blaikie
2a33a0e60f DebugInfo: Move type units into the debug_types section with appropriate comdat grouping and type unit headers
This commit does not complete the type units feature - there are issues
around fission support (skeletal type units, pubtypes/pubnames) and
hashing of some types including those containing references to types in
other type units.

Originally committed as r197073 and reverted in r197079.

This commit originally got jumbled up with another build-breaking commit
and I can't find the failures I thought this caused anymore.
Recommitting to hopefully get some clean buildbot results to work from.
I have a sneaking suspicion there's unstable output in the comdat group
output of MCStreamer...

llvm-svn: 197197
2013-12-13 01:06:41 +00:00
David Blaikie
d7d445afd4 Revert "DebugInfo: Move type units into the debug_types section with appropriate comdat grouping and type unit headers"
This reverts commit r197073.

The test seems to be failing on some buildbots for unknown reasons.
Reverting until I can figure that out. If anyone's got a reproduction
(.s and .o together would be great) - I'd really appreciate it.

llvm-svn: 197079
2013-12-11 22:08:39 +00:00
David Blaikie
59b3fb2510 DebugInfo: Move type units into the debug_types section with appropriate comdat grouping and type unit headers
This commit does not complete the type units feature - there are issues
around fission support (skeletal type units, pubtypes/pubnames) and
hashing of some types including those containing references to types in
other type units.

llvm-svn: 197073
2013-12-11 21:36:27 +00:00
Eric Christopher
31f5e518c8 Update testcase for previous commit.
llvm-svn: 196857
2013-12-10 01:12:16 +00:00