Nick Lewycky
d8f16be86a
Minor style cleanup, no functionality change.
...
llvm-svn: 142307
2011-10-17 23:27:36 +00:00
Nick Lewycky
c551c1c5f9
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
57c57a3260
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
Eric Christopher
d34e1d8bb6
Typo.
...
llvm-svn: 141004
2011-10-03 15:49:16 +00:00
Devang Patel
e4127d626e
Do not use named md nodes to track variables that are completely optimized. This does not scale while doing LTO with debug info. New approach is to include list of variables in the subprogram info directly.
...
llvm-svn: 138145
2011-08-19 23:28:12 +00:00
Devang Patel
68d2232bfe
Eliminate unnecessary forwarding function.
...
llvm-svn: 138006
2011-08-18 23:17:55 +00:00
Devang Patel
630d8ce36b
Until now all debug info MDNodes referred to a root MDNode, a compile unit. This simplified handling of these needs in dwarf writer. However, one side effect of this is that during link time optimization all these MDNodes are _not_ uniqued. In other words there will be N number of MDNodes describing "int", "char" and all other types, which would suddenly grow when each object file starts using libraries like STL.
...
MDNodes graph structure such that compiler unit keeps track of important MDNodes and update dwarf writer to process mdnodes top-down instead of bottom up.
llvm-svn: 137778
2011-08-16 22:09:43 +00:00
Devang Patel
28ad105008
Remove unnecessary version check.
...
llvm-svn: 137728
2011-08-16 17:41:41 +00:00
Devang Patel
00c82827ab
Refactor.
...
llvm-svn: 137689
2011-08-15 23:47:24 +00:00
Devang Patel
822410da56
Continue to hoist uses of getCompileUnit() up. The goal is to get rid of uses of getCompileUnit().
...
llvm-svn: 137683
2011-08-15 23:36:40 +00:00
Devang Patel
e0aa92d509
This is somewhat déjà-vu, but avoid using getCompileUnit() as much as possible.
...
llvm-svn: 137668
2011-08-15 22:24:32 +00:00
Devang Patel
8fe83ecaf3
Refactor. Variables are part of compile unit so let CompileUnit create new variable.
...
llvm-svn: 137663
2011-08-15 22:04:40 +00:00
Devang Patel
f5e3a86ea0
There is no need to maintain a set to keep track of variables that use location expressions. In such cases, AT_location attribute's value will be a label.
...
llvm-svn: 137659
2011-08-15 21:43:21 +00:00
Devang Patel
9ea2ce9b7b
Fix warning.
...
llvm-svn: 137658
2011-08-15 21:35:16 +00:00
Devang Patel
1113107823
Simplify. Let DbgVariable keep track of variable's DBG_VALUE machine instruction.
...
llvm-svn: 137656
2011-08-15 21:24:36 +00:00
Devang Patel
7e0fc7cf86
Simplify mapping to variable from its abstract variable info.
...
When a variable is inlined multiple places, abstract variable keeps name, location, type etc.. info and all other concreate instances of the variable directly refers to abstract variable.
llvm-svn: 137637
2011-08-15 19:01:20 +00:00
Devang Patel
2b6f546226
Refactor.
...
llvm-svn: 137632
2011-08-15 18:40:16 +00:00
Devang Patel
84b2564244
Refactor.
...
llvm-svn: 137631
2011-08-15 18:35:42 +00:00
Devang Patel
1b73744344
Refactor. Global variables are part of compile unit so let CompileUnit create new global variable.
...
llvm-svn: 137621
2011-08-15 17:57:41 +00:00
Devang Patel
ec9a83977b
Refactor. A subprogram is part of compile unit so let CompileUnit construct new subprogram.
...
llvm-svn: 137618
2011-08-15 17:24:54 +00:00
Devang Patel
5901733259
Use ArrayRef.
...
llvm-svn: 137485
2011-08-12 18:10:19 +00:00
Benjamin Kramer
de2c60be28
Plug a memory leak.
...
llvm-svn: 137321
2011-08-11 18:39:28 +00:00
Devang Patel
504551c7bf
Stay within 80 columns.
...
llvm-svn: 137283
2011-08-10 23:58:09 +00:00
Devang Patel
1541972a13
Distinguish between two copies of one inlined variable. Take 2.
...
llvm-svn: 137253
2011-08-10 21:50:54 +00:00
Devang Patel
5a1dd582e2
Revert unintentional parts of previous check-in.
...
llvm-svn: 137249
2011-08-10 21:16:49 +00:00
Devang Patel
de73daa98c
Start using LexicalScopes utility. No intetional functionality change.
...
llvm-svn: 137246
2011-08-10 20:55:27 +00:00
Devang Patel
bc9a3e12d9
Simplify by creating parent first.
...
llvm-svn: 137056
2011-08-08 18:22:10 +00:00
Chandler Carruth
e833bbd11e
Temporarily revert r135528 which distinguishes between two copies of one
...
inlined variable, based on the discussion in PR10542.
This explodes the runtime of several passes down the pipeline due to
a large number of "copies" remaining live across a large function. This
only shows up with both debug and opt, but when it does it creates
a many-minute compile when self-hosting LLVM+Clang. There are several
other cases that show these types of regressions.
All of this is tracked in PR10542, and progress is being made on fixing
the issue. Once its addressed, the re-instated, but until then this
restores the performance for self-hosting and other opt+debug builds.
Devang, let me know if this causes any trouble, or impedes fixing it in
any way, and thanks for working on this!
llvm-svn: 136953
2011-08-05 00:51:31 +00:00
Bob Wilson
03c734d202
Some revisions to Devang's change r136759 for merged global debug info.
...
llvm-svn: 136802
2011-08-03 19:42:51 +00:00
Devang Patel
99a2f0d98c
Use byte offset, instead of element number, to access merged global.
...
llvm-svn: 136759
2011-08-03 01:25:46 +00:00
Nick Lewycky
cec151e7b6
Fix a lot of typos, improve (but not necessarily fix) grammaros and reflow some
...
lines. No functionality change.
llvm-svn: 136458
2011-07-29 03:49:23 +00:00
Devang Patel
a31c9d991e
Remove outdated FIXME comment.
...
llvm-svn: 136275
2011-07-27 22:00:01 +00:00
Devang Patel
e85a416d4e
It is quiet possible that inlined function body is split into multiple chunks of consequtive instructions. But, there is not any way to describe this in .debug_inline accelerator table used by gdb. However, describe non contiguous ranges of inlined function body appropriately using AT_range of DW_TAG_inlined_subroutine debug info entry.
...
llvm-svn: 136196
2011-07-27 00:34:13 +00:00
Devang Patel
5589e89f0c
While extracting lexical scopes from machine instruction stream, work on one machine basic block at a time.
...
llvm-svn: 136106
2011-07-26 18:09:53 +00:00
Devang Patel
bf27de8340
Refactor.
...
llvm-svn: 135633
2011-07-20 23:00:27 +00:00
Devang Patel
284b502be9
There are two ways to map a variable to its lexical scope. Lexical scope information is embedded in MDNode describing the variable. It is also available as a part of DebugLoc attached with DBG_VALUE instruction. DebugLoc attached with an instruction is less reliable in optimized code so use information embedded in the MDNode.
...
llvm-svn: 135629
2011-07-20 22:18:50 +00:00
Devang Patel
65afdd27d0
Distinguish between two copies of one inlined variable.
...
llvm-svn: 135528
2011-07-19 22:31:15 +00:00
Devang Patel
647ad13add
Use DebugLoc directly to map inlined functions' instructions to respective lexical scope.
...
llvm-svn: 135302
2011-07-15 21:25:44 +00:00
Devang Patel
d539f30c73
Eliminate redundant map.
...
llvm-svn: 135278
2011-07-15 16:38:42 +00:00
Evan Cheng
b43f66dcd3
Reverting r135232. It's causing infinite looping in DbgScope::openInsnRange.
...
llvm-svn: 135254
2011-07-15 06:26:35 +00:00
Devang Patel
7c5092d1c2
Do not get confused by multiple empty lexical scopes inlined at one location.
...
llvm-svn: 135232
2011-07-15 00:30:39 +00:00
Devang Patel
44a684072d
Refactor.
...
llvm-svn: 135212
2011-07-14 23:17:49 +00:00
Devang Patel
ccc8ba373c
Eliminate redundant LLVMContext argument.
...
Improve DbgScope->dump() output.
llvm-svn: 135207
2011-07-14 22:30:56 +00:00
Devang Patel
39f6e21de3
Simplify.
...
llvm-svn: 135127
2011-07-14 01:52:45 +00:00
Devang Patel
1856a523ea
Simplify and delay extracting DebugLoc elements, scope and InlinedAt, as much as possible.
...
llvm-svn: 135124
2011-07-14 01:14:57 +00:00
Devang Patel
cb54f643e9
Simplify. Compile unit check inside hasValidLocation() did not add any value.
...
llvm-svn: 135118
2011-07-14 00:20:24 +00:00
Devang Patel
8d1207dc18
Fix typo in DEBUG message.
...
llvm-svn: 135111
2011-07-14 00:04:53 +00:00
Devang Patel
b9fe59ad12
Add DEBUG messages.
...
llvm-svn: 135110
2011-07-14 00:03:58 +00:00
Devang Patel
31505d2d78
Refactor.
...
llvm-svn: 134703
2011-07-08 17:09:57 +00:00
Devang Patel
756482ca98
Make provision to have floating point constants in .debug_loc expressions.
...
llvm-svn: 134702
2011-07-08 16:49:43 +00:00