| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
tables shared between compilation units
When emitting assembly there's no support for emitting separate line
tables for each compilation unit - so LLVM emits .loc directives
producing a single line table.
Line tables have an implicit directory (index 0) equal to the
compilation directory (DW_AT_comp_dir) of the compilation unit that
references them.
If multiple compilation units (with possibly disparate compilation
directories) reference the same line table, we must avoid relying on
this ambiguous directory.
Achieve this my simply not setting the compilation directory on the line
table when we're in this situation (multiple units while emitting
assembly).
llvm-svn: 204094
|
| |
|
|
|
|
|
|
|
|
|
| |
We still do a few lookups into the line table mapping in MCContext that
could be factored out into a single lookup (rather than looking it up
once for the table label, once to set the compilation unit, once for
each time we need a file ID, etc... ) but assembly output complicates
that somewhat as we still need a virtual dispatch back to the
MCAsmStreamer in that case.
llvm-svn: 204092
|
| |
|
|
|
|
|
|
|
|
|
|
| |
into MCDwarf
Our handling of compilation directory in DwarfDebug was broken
(incorrectly using the 'last' compilation directory (that of the last
CU in the metadata list) for all function emission in any CU). By moving
this handling down into MCDwarf the issue is fixed as the compilation
dir is tracked correctly per line table.
llvm-svn: 204089
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
See r204027 for the precursor to this that applied to asm debug info.
This required some non-obvious API changes to handle the case of asm
output (we never go asm->asm so this didn't come up in r204027): the
modification of the file/directory name by MCDwarfLineTableHeader needed
to be reflected in the MCAsmStreamer caller so it could print the
appropriate .file directive, so those StringRef parameters are now
non-const ref (in/out) parameters rather than just const.
llvm-svn: 204069
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
based on the ODR.
This adds an OdrMemberMap to DwarfDebug which is used to unique C++
member function declarations based on the unique identifier of their
containing class and their mangled name.
We can't use the usual DIRef mechanism here because DIScopes are indexed
using their entire MDNode, including decl_file and decl_line, which need
not be unique (see testcase).
Prior to this change multiple redundant member function declarations would
end up in the same uniqued DW_TAG_class_type.
llvm-svn: 203982
|
| |
|
|
|
|
| |
Fix up testcases and use of flag.
llvm-svn: 203973
|
| |
|
|
|
|
|
|
| |
any lexical scopes then go ahead and turn on DW_AT_ranges for the
compile unit since we would be claiming to describe in the CU
a range for which we don't have information in the CU otherwise.
llvm-svn: 203969
|
| |
|
|
|
|
|
| |
Rewrite a couple of testcases to cover areas that would be normally
by turning it on into testcases that will follow the logic.
llvm-svn: 203968
|
| |
|
|
| |
llvm-svn: 203946
|
| |
|
|
| |
llvm-svn: 203680
|
| |
|
|
| |
llvm-svn: 203676
|
| |
|
|
| |
llvm-svn: 203622
|
| |
|
|
| |
llvm-svn: 203620
|
| |
|
|
|
|
|
|
|
|
| |
I could fold the callers into their one call site, but the indirection
(given how verbose choosing the section is) seemed helpful.
The use of a member function pointer's a bit "tricky", but seems limited
enough, the call sites are simple/clean/clear, and there's only one use.
llvm-svn: 203619
|
| |
|
|
|
|
| |
a flag (as of r203082)
llvm-svn: 203612
|
| |
|
|
| |
llvm-svn: 203414
|
| |
|
|
|
|
| |
Suggested by Adrian Prantl in code review for r203187
llvm-svn: 203323
|
| |
|
|
|
|
|
| |
horrible/fragile.
rdar://problem/16264854
llvm-svn: 203309
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
First: refactor out the emission of entries into the .debug_loc section
into its own routine.
Second: add a new class ByteStreamer that can be used to either emit
using an AsmPrinter or hash using DIEHash the series of bytes that
would be emitted. Use this in all of the location emission routines
for the .debug_loc section.
No functional change intended outside of a few additional comments
in verbose assembly.
llvm-svn: 203304
|
| |
|
|
|
|
| |
This breaks linux buildbots. Go figure.
llvm-svn: 203300
|
| |
|
|
| |
llvm-svn: 203297
|
| |
|
|
|
|
| |
Suggested by Adrian Prantl in code review for r203187.
llvm-svn: 203296
|
| |
|
|
|
|
| |
No functionality change.
llvm-svn: 203276
|
| |
|
|
|
|
| |
It has a lot of them with complex types. C++11 really shines here.
llvm-svn: 203270
|
| |
|
|
|
|
|
| |
For incoming improvements to inlined functions and lexical blocks
suggested by Adrian Prantl in review of r203187.
llvm-svn: 203263
|
| |
|
|
|
|
|
|
| |
spec
Code review feedback to r203187 from Oliver Stannard. Thanks!
llvm-svn: 203256
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The old system was fairly convoluted:
* A temporary label was created.
* A single PROLOG_LABEL was created with it.
* A few MCCFIInstructions were created with the same label.
The semantics were that the cfi instructions were mapped to the PROLOG_LABEL
via the temporary label. The output position was that of the PROLOG_LABEL.
The temporary label itself was used only for doing the mapping.
The new CFI_INSTRUCTION has a 1:1 mapping to MCCFIInstructions and points to
one by holding an index into the CFI instructions of this function.
I did consider removing MMI.getFrameInstructions completelly and having
CFI_INSTRUCTION own a MCCFIInstruction, but MCCFIInstructions have non
trivial constructors and destructors and are somewhat big, so the this setup
is probably better.
The net result is that we don't create temporary labels that are never used.
llvm-svn: 203204
|
| |
|
|
| |
llvm-svn: 203192
|
| |
|
|
|
|
|
| |
This removes a relocation from each subprogram, reducing link times,
etc.
llvm-svn: 203187
|
| |
|
|
| |
llvm-svn: 203150
|
| |
|
|
|
|
|
|
|
|
| |
DW_AT_GNU_pubnames of DW_FORM_flag(_present) rather than sec_offsets to the pubnames/types sections
This is consistent with GDB ToT and reduces the number of relocations in
(type and compile) units, substantially reducing relocations and debug
size in fission + type units builds.
llvm-svn: 203082
|
| |
|
|
|
|
| |
emitting pub sections for compile units
llvm-svn: 203057
|
| |
|
|
|
|
| |
already lives.
llvm-svn: 203046
|
| |
|
|
|
|
| |
already lives.
llvm-svn: 203038
|
| |
|
|
|
|
|
|
| |
This works by moving the existing code into the DIEValue hierarchy
and using the DwarfDebug pointer off of the AsmPrinter to access
any global information we need.
llvm-svn: 203033
|
| |
|
|
|
|
| |
for verbose asm.
llvm-svn: 203031
|
| |
|
|
|
|
|
|
| |
This enables us to figure out where in the debug_loc section our
locations are so that we can eventually hash them. It also helps
remove some special case code in emission. No functional change.
llvm-svn: 203018
|
| |
|
|
|
|
|
| |
using a full uint16_t with the flag value... which happens to be
0 or 1. Update the class for bool values and rename functions slightly.
llvm-svn: 202921
|
| |
|
|
|
|
|
|
|
|
|
| |
Move the test for this class into the IR unittests as well.
This uncovers that ValueMap too is in the IR library. Ironically, the
unittest for ValueMap is useless in the Support library (honestly, so
was the ValueHandle test) and so it already lives in the IR unittests.
Mmmm, tasty layering.
llvm-svn: 202821
|
| |
|
|
|
|
| |
This adds support for emitting discriminators from DILexicalBlocks.
llvm-svn: 202736
|
| |
|
|
|
|
| |
Remove the old functions.
llvm-svn: 202636
|
| |
|
|
|
|
| |
directly, and remove the macro.
llvm-svn: 202612
|
| |
|
|
|
|
|
|
|
|
| |
any ranges - this includes CU ranges where we were previously emitting an
end list marker even if we didn't have a list.
Testcase includes a test for line table only code emission as the problem
was noticed while writing this test.
llvm-svn: 202357
|
| |
|
|
| |
llvm-svn: 202220
|
| |
|
|
|
|
| |
disabled
llvm-svn: 202201
|
| |
|
|
|
|
|
|
|
| |
This is refactoring / simplifying code, updating comments and enabling the
testcase on non-x86 platforms.
No functionality change.
llvm-svn: 202199
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Variadic functions have an unspecified parameter tag after the last
argument. In IR this is represented as an unspecified parameter in the
subroutine type.
Paired commit with CFE r202185.
rdar://problem/13690847
This re-applies r202184 + a bugfix in DwarfDebug's argument handling.
llvm-svn: 202188
|
| |
|
|
|
|
| |
This reverts commit r202184 because of buildbot breakage.
llvm-svn: 202187
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Variadic functions have an unspecified parameter tag after the last
argument. In IR this is represented as an unspecified parameter in the
subroutine type.
Paired commit with CFE.
rdar://problem/13690847
llvm-svn: 202184
|
| |
|
|
|
|
|
|
|
|
| |
This commit moves getSLEB128Size() and getULEB128Size() from
MCAsmInfo to LEB128.h and removes some copy-and-paste code.
Besides, this commit also adds some unit tests for the LEB128
functions.
llvm-svn: 201937
|