Nick Lewycky
33da33676f
Emit relocations for DW_AT_location entries on systems which need it. This is
...
a recommit of r127757. Fixes PR9493. Patch by Paul Robinson!
llvm-svn: 158957
2012-06-22 01:25:12 +00:00
Benjamin Kramer
0748008df5
Allocate the contents of DwarfDebug's StringMaps in a single big BumpPtrAllocator.
...
llvm-svn: 158265
2012-06-09 10:34:15 +00:00
Jakob Stoklund Olesen
54038d796c
Switch all register list clients to the new MC*Iterator interface.
...
No functional change intended.
Sorry for the churn. The iterator classes are supposed to help avoid
giant commits like this one in the future. The TableGen-produced
register lists are getting quite large, and it may be necessary to
change the table representation.
This makes it possible to do so without changing all clients (again).
llvm-svn: 157854
2012-06-01 23:28:30 +00:00
Eric Christopher
e2b36ce24a
Remove duplicate code that we could just fallthrough to.
...
llvm-svn: 157060
2012-05-18 18:24:15 +00:00
Eric Christopher
8d2a77de63
Fix thinko in conditional.
...
Part of rdar://11352000 and should bring the buildbots back.
llvm-svn: 156421
2012-05-08 21:24:39 +00:00
Eric Christopher
4d25052a9a
Handle OpDeref in case it comes in as a register operand.
...
Part of rdar://11352000
llvm-svn: 156405
2012-05-08 18:56:00 +00:00
Eric Christopher
aec8a82694
Patch to set is_stmt a little better for prologue lines in a function.
...
This enables debuggers to see what are interesting lines for a
breakpoint rather than any line that starts a function.
rdar://9852092
llvm-svn: 154120
2012-04-05 20:39:05 +00:00
Eric Christopher
b81e2b403c
Fix thinko check for number of operands to be the one that actually
...
might have more than 19 operands. Add a testcase to make sure I
never screw that up again.
Part of rdar://11026482
llvm-svn: 153961
2012-04-03 17:55:42 +00:00
Eric Christopher
34164196af
Add a line number for the scope of the function (starting at the first
...
brace) so that we get more accurate line number information about the
declaration of a given function and the line where the function
first starts.
Part of rdar://11026482
llvm-svn: 153916
2012-04-03 00:43:49 +00:00
Eric Christopher
ad9fe8955a
Turn on the accelerator tables for Darwin.
...
llvm-svn: 153880
2012-04-02 17:58:52 +00:00
Eric Christopher
7ed2efca6a
Use DW_AT_low_pc for a single entry point into a routine.
...
Fixes PR10105
llvm-svn: 153524
2012-03-27 18:35:54 +00:00
Eric Christopher
0925c62c74
Use the file in the inlined die rather than the compile unit for
...
backtrace locations.
Testcase forthcoming, but I wanted to get some testing here.
Should fix:
PR12323
PR12314
rdar://11091100
llvm-svn: 153471
2012-03-26 21:38:38 +00:00
Benjamin Kramer
71b197306e
DwarfDebug: Store the filename/dirname pair as a zero-separated string in a stringmap, instead of using a highly inefficient std::map of a pair of std::strings.
...
llvm-svn: 152541
2012-03-11 14:56:26 +00:00
Craig Topper
1d32658877
Use uint16_t to store register overlaps to reduce static data.
...
llvm-svn: 152001
2012-03-04 10:43:23 +00:00
Eric Christopher
1df94bfe8a
Grammar-o in function name.
...
llvm-svn: 151875
2012-03-02 02:11:47 +00:00
Eric Christopher
7772531567
If the linkage name doesn't exist we're supposed to emit a reference
...
to the string table for the function name, not the function name.
llvm-svn: 151873
2012-03-02 01:57:52 +00:00
Eric Christopher
7524fe4551
Revert "Reorder the sections being output to reduce the number of assembler"
...
The inline table needs to be constructed ahead of time so that it doesn't try to
create new strings while we're emitting everything.
This reverts commit a8ff9bccb399183cdd5f1c3cec2bda763664b4b0.
llvm-svn: 151864
2012-03-02 00:30:24 +00:00
Eric Christopher
66b0721014
Reorder the sections being output to reduce the number of assembler
...
fixups that are being used to determine section offsets. Reduces
the total number of fixups by 50% for a non-trivial testcase.
Part of rdar://10413936
llvm-svn: 151852
2012-03-01 22:50:31 +00:00
Michael J. Spencer
35145f830a
Minimal changes for LLVM to compile under VS11.
...
llvm-svn: 151849
2012-03-01 22:42:52 +00:00
Eric Christopher
3a2656b394
Add the source language into the compile unit.
...
llvm-svn: 151143
2012-02-22 08:46:13 +00:00
Craig Topper
ee4dab5f1f
Convert assert(0) to llvm_unreachable
...
llvm-svn: 149816
2012-02-05 08:31:47 +00:00
Eric Christopher
3e8ccc2000
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
Eric Christopher
090fcc1a10
Use const vector references instead of a vector copy. Spotted by Devang.
...
llvm-svn: 147694
2012-01-06 23:03:34 +00:00
Eric Christopher
21bde87bf3
As part of the ongoing work in finalizing the accelerator tables, extend
...
the debug type accelerator tables to contain the tag and a flag
stating whether or not a compound type is a complete type.
rdar://10652330
llvm-svn: 147651
2012-01-06 04:35:23 +00:00
Eric Christopher
365d083585
Extraneous whitespace and 80-col.
...
llvm-svn: 146780
2011-12-16 23:42:31 +00:00
Eric Christopher
8dda5d0f06
Add inline subprogram names to the name lookup table since they may
...
not get there any other way.
llvm-svn: 145789
2011-12-04 06:02:38 +00:00
Nick Lewycky
50f02cb21b
Move global variables in TargetMachine into new TargetOptions class. As an API
...
change, now you need a TargetOptions object to create a TargetMachine. Clang
patch to follow.
One small functionality change in PTX. PTX had commented out the machine
verifier parts in their copy of printAndVerify. That now calls the version in
LLVMTargetMachine. Users of PTX who need verification disabled should rely on
not passing the command-line flag to enable it.
llvm-svn: 145714
2011-12-02 22:16:29 +00:00
Rafael Espindola
e7cc8bff82
The dwarf standard says that the only differences between a out-of-line
...
instance and a concrete inlined instance are the use of DW_TAG_subprogram
instead of DW_TAG_inlined_subroutine and the who owns the tree.
We were also omitting DW_AT_inline from the abstract roots. To fix this,
make sure we mark abstract instance roots with DW_AT_inline even when
we have only out-of-line instances referring to them with DW_AT_abstract_origin.
FileCheck is not a very good tool for tests like this, maybe we should add
a -verify mode to llvm-dwarfdump.
llvm-svn: 144441
2011-11-12 01:57:54 +00:00
Rafael Espindola
79278365d3
Check in getOrCreateSubprogramDIE if a declaration exists and if so output
...
it first.
This is a more general fix to pr11300.
llvm-svn: 144324
2011-11-10 22:34:29 +00:00
Eric Christopher
66b37db641
Make types and namespaces take multiple DIEs for the accelerator tables
...
as well.
llvm-svn: 144319
2011-11-10 21:47:55 +00:00
Eric Christopher
d9843b34e6
Rework adding function names to the dwarf accelerator tables, allow
...
multiple dies per function and support C++ basenames.
llvm-svn: 144304
2011-11-10 19:25:34 +00:00
Benjamin Kramer
966ed1b698
Add comments.
...
llvm-svn: 144194
2011-11-09 18:16:11 +00:00
Benjamin Kramer
148db36263
Take advantage of the zero byte in StringMap when emitting dwarf stringpool entries.
...
llvm-svn: 144184
2011-11-09 12:12:04 +00:00
Eric Christopher
5223a57533
Remove the pubnames section, no one consumes it.
...
llvm-svn: 144169
2011-11-09 05:24:07 +00:00
Eric Christopher
08a558eeef
Also add the linkage name to the name accelerator tables if it exists
...
and is different than the normal name.
llvm-svn: 144130
2011-11-08 21:56:23 +00:00
Eric Christopher
970771c0e8
Add the base ObjC method name to the names lookup table as well.
...
llvm-svn: 144105
2011-11-08 19:16:01 +00:00
Eric Christopher
5139dadd50
Add all completed and named types to the dwarf type accelerator tables.
...
llvm-svn: 144027
2011-11-07 22:11:16 +00:00
Eric Christopher
988ac00abd
Use StringRef::startswith to do some string comparisons.
...
llvm-svn: 143982
2011-11-07 18:53:23 +00:00
Eric Christopher
cc979f9ae6
Allow for the case where the name of the subprogram is "".
...
Fixes a self-host error.
llvm-svn: 143970
2011-11-07 18:10:17 +00:00
Eric Christopher
8c7505f258
Remove unnecessary addition to API. Replace with something much simpler.
...
llvm-svn: 143925
2011-11-07 09:38:42 +00:00
Eric Christopher
4996c70034
Add the support code to enable the dwarf accelerator tables. Upcoming patches
...
to fix the types section (all types, not just global types), and testcases.
The code to do the final emission is disabled by default.
llvm-svn: 143923
2011-11-07 09:24:32 +00:00
Eric Christopher
a7b6189071
Expose a way to get the beginning of the dwarf string section.
...
llvm-svn: 143920
2011-11-07 09:18:38 +00:00
Eric Christopher
6abc9c5aaa
Fix up comment.
...
llvm-svn: 143919
2011-11-07 09:18:35 +00:00
Rafael Espindola
6cf4e830ce
Emit declarations before definitions if they are available. This causes DW_AT_specification to
...
point back in the file in the included testcase. Fixes PR11300.
llvm-svn: 143726
2011-11-04 19:00:29 +00:00
Nick Lewycky
d1ee7f8cf1
Don't emit a directory entry for the value in DW_AT_comp_dir, that is always
...
implied by directory index zero.
llvm-svn: 143570
2011-11-02 20:55:33 +00:00
Nick Lewycky
d59c0cac6c
Teach our Dwarf emission to use the string pool.
...
llvm-svn: 143097
2011-10-27 06:44:11 +00:00
Nick Lewycky
654f5ce812
Reflow lines, fix comments for doxygen style, fix whitespace. No functionality
...
change.
llvm-svn: 143074
2011-10-26 22:55:33 +00:00
Nick Lewycky
479a8fe75e
Minor style cleanup, no functionality change.
...
llvm-svn: 142307
2011-10-17 23:27:36 +00:00
Nick Lewycky
40f8f2ff24
Add support for a new extension to the .file directive:
...
.file filenumber "directory" "filename"
This removes one join+split of the directory+filename in MC internals. Because
bitcode files have independent fields for directory and filenames in debug info,
this patch may change the .o files written by existing .bc files.
llvm-svn: 142300
2011-10-17 23:05:28 +00:00
Eric Christopher
6647b83087
Add a new wrapper node for a DILexicalBlock that encapsulates it and a
...
file. Since it should only be used when necessary propagate it through
the backend code generation and tweak testcases accordingly.
This helps with code like in clang's test/CodeGen/debug-info-line.c where
we have multiple #line directives within a single lexical block and want
to generate only a single block that contains each file change.
Part of rdar://10246360
llvm-svn: 141729
2011-10-11 22:59:11 +00:00