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

61 Commits

Author SHA1 Message Date
Eric Christopher
c16b1aaf3f Be more rigorous about the sizes of forms and attributes.
llvm-svn: 187953
2013-08-08 01:41:00 +00:00
Eric Christopher
8aac1919bd Add a way to grab a particular attribute out of a DIE.
Use it when we're looking for a string in particular. Update comments
as well.

llvm-svn: 187844
2013-08-07 01:18:33 +00:00
Eric Christopher
04dc3562f6 Add preliminary support for hashing DIEs and breaking them into
type units.

Initially this support is used in the computation of an ODR checker
for C++. For now we're attaching it to the DIE, but in the future
it will be attached to the type unit.

This also starts breaking out types into the separation for type
units, but without actually splitting the DIEs.

In preparation for hashing the DIEs this adds a DIEString type
that contains a StringRef with the string contained at the label.

llvm-svn: 187213
2013-07-26 17:02:41 +00:00
Manman Ren
4245062b12 Debug Info: use module flag to set up Dwarf version.
Correctly handles ref_addr depending on the Dwarf version. Emit Dwarf with
version from module flag.

TODO: turn on/off features depending on the Dwarf version.
llvm-svn: 185484
2013-07-02 23:40:10 +00:00
Ulrich Weigand
c2c7d0c173 [DebugInfo] Introduce DIEExpr variant of DIEValue to hold MCExpr values
This partially reverts r185202 and restores DIELabel to hold plain
MCSymbol references.  Instead, we add a new subclass DIEExpr of
DIEValue that can hold generic MCExpr references.

This is in preparation for supporting debug info for TLS variables
on PowerPC, where we need to describe the variable location using
a more complex expression than just MCSymbolRefExpr.

llvm-svn: 185458
2013-07-02 18:46:26 +00:00
David Blaikie
3648e54a41 DebugInfo: Pass MCSymbolRefExprs for labels instead of MCSymbols
This is a precursor to adding debug info support for TLS which requires
non-default relocations applied to TLS symbols.

llvm-svn: 185202
2013-06-28 20:05:04 +00:00
Eric Christopher
227290eb88 Formatting.
llvm-svn: 183807
2013-06-11 23:41:38 +00:00
Eric Christopher
2cbc09bd1e Fix up comment.
llvm-svn: 183703
2013-06-10 22:24:07 +00:00
Eric Christopher
dc7873061b Remove unused function.
llvm-svn: 183698
2013-06-10 21:59:28 +00:00
Eric Christopher
727e746fda IndentCount is only used within NDEBUG code.
llvm-svn: 183695
2013-06-10 20:58:53 +00:00
Eric Christopher
fd692fbd15 Const-ify some printing and dumping code for DIEValues.
llvm-svn: 183057
2013-05-31 22:50:40 +00:00
Eric Christopher
429115c97a Make getCompileUnit non-const and return the current DIE if it
happens to be a compile unit. Noticed on inspection and tested
via calling on a newly created compile unit. No functional change.

llvm-svn: 181835
2013-05-14 21:33:10 +00:00
David Blaikie
353440a9d7 Assert that DIEEntries are constructed with non-null DIEs
This just brings a crash a little further forward from DWARF emission to
DIE construction to make errors easier to diagnose.

llvm-svn: 181748
2013-05-14 00:35:19 +00:00
Eric Christopher
c179ac43fa Remove unnecessary instance variable and rework logic accordingly.
llvm-svn: 181227
2013-05-06 17:50:50 +00:00
Manman Ren
d4f1e1e1df Debug Info: revert 178722 for now.
There is a difference for FORM_ref_addr between DWARF 2 and DWARF 3+.
Since Eric is against guarding DWARF 2 ref_addr with DarwinGDBCompat, we are
still in discussion on how to handle this.

The correct solution is to update our header to say version 4 instead of version
2 and update tool chains as well.

rdar://problem/13559431

llvm-svn: 178806
2013-04-04 23:13:11 +00:00
Manman Ren
2dafd4d1df Debug Info: according to DWARF 2, FORM_ref_addr the same size as an address on
the target system.

It was hard-coded to 4 bytes before. I can't get llvm to generate a
ref_addr on a reasonably sized testing case.

rdar://problem/13559431

llvm-svn: 178722
2013-04-04 00:22:54 +00:00
Eric Christopher
d5d6d72d50 Fix grammar.
llvm-svn: 178624
2013-04-03 05:29:58 +00:00
Eric Christopher
05df599ea8 Use SmallVectorImpl instead of SmallVector at the uses.
llvm-svn: 178386
2013-03-29 23:34:06 +00:00
Eric Christopher
cd1e668cce Use 12 as the magic number for our abbreviation data and our
die values. A lot of DIEs have 10 attributes in C++ code (example
clang), none had more than 12. Seems like a good default.

llvm-svn: 178366
2013-03-29 20:23:06 +00:00
Hans Wennborg
edb8448b25 Fix integer comparison in DIEInteger::BestForm.
The always-true "(int)Int == (signed)Int" comparison was found
while experimenting with a potential new Clang warning.

llvm-svn: 177290
2013-03-18 17:03:05 +00:00
Manman Ren
d88019ac47 Debug Info: use DW_FORM_ref_addr instead of DW_FORM_ref4 if the referenced DIE
belongs to a different compile unit.

DW_FORM_ref_addr should be used for cross compile-unit reference.

When compiling a large application, we got a dwarfdump verification error where
abstract_origin points to nowhere.

This error can't be reproduced on any testing case in MultiSource.
We may have other cases where we use DW_FORM_ref4 unconditionally.

rdar://problem/13370501

llvm-svn: 176882
2013-03-12 18:27:15 +00:00
Eric Christopher
b2abc44cbd Whitespace and 80-col.
llvm-svn: 171803
2013-01-07 22:40:45 +00:00
Bill Wendling
56d9c4b832 Rename the 'Attributes' class to 'Attribute'. It's going to represent a single attribute in the future.
llvm-svn: 170502
2012-12-19 07:18:57 +00:00
Sean Silva
2174f713f4 Remove unnecessary classof()'s
isa<> et al. automatically infer when the cast is an upcast (including a
self-cast), so these are no longer necessary.

llvm-svn: 165767
2012-10-11 23:30:49 +00:00
Benjamin Kramer
06164017c0 Bit pack DIE structures better.
16 bits are sufficient to store attributes, tags and forms.

llvm-svn: 148799
2012-01-24 12:08:28 +00:00
Eric Christopher
afc99847bf Remove generation of DW_AT_sibling. Nothing as far as I can tell uses it.
Saves about 1.5% on debug info size.

rdar://10278198

llvm-svn: 148794
2012-01-24 09:43:28 +00:00
David Blaikie
576aba04f1 Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch
llvm-svn: 146960
2011-12-20 02:50:00 +00:00
Nick Lewycky
5758d6af22 Always use the string pool, even when it makes the .o larger. This may help
tools that read the debug info in the .o files by making the DIE sizes more
consistent.

llvm-svn: 143186
2011-10-28 05:29:47 +00:00
Nick Lewycky
4f22c1e786 Remove dead enum value. There is no DIESectionOffset.
llvm-svn: 142912
2011-10-25 07:05:26 +00:00
Nick Lewycky
0de6ef455c Fix some typo/formatting issues. No functionality change.
llvm-svn: 142435
2011-10-18 22:39:43 +00:00
Benjamin Kramer
782cb6d68d Remove unused virtual dtor.
llvm-svn: 127331
2011-03-09 14:20:28 +00:00
Cameron Zwarich
974208a607 Roll out r126425 and r126450 to see if it fixes the failures on the buildbots.
llvm-svn: 126488
2011-02-25 16:30:32 +00:00
Devang Patel
f2b2417c2c Enable DebugInfo support for COFF object files.
Patch by Nathan Jeffords!

llvm-svn: 126425
2011-02-24 21:04:00 +00:00
Devang Patel
d7ad8ac4c0 First cut at supporting .debug_loc section.
This is used to track variable information.

llvm-svn: 104649
2010-05-25 23:40:22 +00:00
Devang Patel
1929d78e71 Add support to emit dwarf ranges.
llvm-svn: 101575
2010-04-16 23:33:45 +00:00
Chris Lattner
c1b63a2dfa change SizeOf to take AsmPrinter instead of TargetData,
simplifying a bunch of code.

llvm-svn: 100373
2010-04-05 00:18:22 +00:00
Chris Lattner
2b89b0d279 1) make DIE take AsmPrinter instead of DwarfPrinter.
2) change DwarfDebug to not inherit from DwarfPrinter.

llvm-svn: 100372
2010-04-05 00:13:49 +00:00
Benjamin Kramer
a71501e0dd DwarfDebug: Allocate DIEValues with a BumpPtrAllocator. Most of them are
POD-like anyway, so we don't even care about calling their d'tors (DIEBlock
being the exception).

~6% less mallocs and ~1% compile time improvement on clang -O0 -g oggenc.c

llvm-svn: 100035
2010-03-31 19:34:01 +00:00
Devang Patel
48af12e998 DW_AT_stmt_list attribute attached with a compile unit encodes offset of line number information for this compile unit in debug_line section. This offset is always zero when only one compile unit is emitted in a object file.
llvm-svn: 99223
2010-03-22 22:38:48 +00:00
Jeffrey Yasskin
14b8c19bcc Fix a memory leak from DIE::addSiblingOffset() by adding the DIEValue
it allocates to DwarfDebug::DIEValues.

llvm-svn: 99196
2010-03-22 18:47:14 +00:00
Jeffrey Yasskin
824bd1b30d Free DbgScopes in DwarfDebug::endFunction(). Also increased the const-ness of
several fields to make it easier to figure out where bugs might be creeping in.

llvm-svn: 98358
2010-03-12 17:45:06 +00:00
Chris Lattner
10d571f349 simplify EmitSectionOffset to always use .set if it is
available, the only thing this affects is that we produce
.set in one case we didn't before, which shouldn't harm
anything.  Make EmitSectionOffset call EmitDifference
instead of duplicating it.

llvm-svn: 98005
2010-03-08 23:23:25 +00:00
Chris Lattner
bfd38653e6 merge DIEObjectLabel and DIEDwarfLabel into DIELabel.
Yes, DIE you fiendish labels, die all of you.

llvm-svn: 97995
2010-03-08 22:31:46 +00:00
Chris Lattner
cbce2df237 elimiante the DWLabel class, using MCSymbol instead. Start
switching some stuff over to passing around MCSymbol* instead
of stem+ID.

llvm-svn: 97993
2010-03-08 22:23:36 +00:00
Douglas Gregor
c52fc8f922 Revert r97917, which was causing Clang Debug self-host failures.
llvm-svn: 97932
2010-03-08 02:58:37 +00:00
Jeffrey Yasskin
2c23c1d1a1 Roll r97906 forward again, without double-deleting CompileUnit::IndexTyDie.
llvm-svn: 97917
2010-03-07 17:10:13 +00:00
Chris Lattner
e46549ed67 teach MCAsmStreamer::EmitBytes to use .ascii and .asciz
llvm-svn: 94259
2010-01-23 00:15:00 +00:00
Chris Lattner
de2a14c724 move uleb printing from asmprinter to dwarfprinter, mcize,
cleanup and eliminate a bunch more uses of "EOL".

llvm-svn: 94250
2010-01-22 23:18:42 +00:00
Chris Lattner
7976cac884 rename the dwarf class to DwarfPrinter. This matches the filename
and much more accurately describes what it is all about.

llvm-svn: 94233
2010-01-22 22:23:57 +00:00
Chris Lattner
04b7c11880 Change DIEObjectLabel to take an MCSymbol instead of std::string.
llvm-svn: 93647
2010-01-16 18:50:28 +00:00