Devang Patel
fb32a2ca1b
Update DebugInfoFinder to match recent debug info encoding changes.
...
llvm-svn: 142295
2011-10-17 22:30:34 +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
Devang Patel
e5dc3a1f1e
Add support to emit debug info for C++0x nullptr type.
...
llvm-svn: 139751
2011-09-14 23:13:28 +00:00
Devang Patel
2c2dd9114e
Now, named mdnode llvm.dbg.cu keeps track of all compile units in a module. Update DebugInfoFinder to collect compile units from llvm.dbg.cu.
...
llvm-svn: 139147
2011-09-06 17:40:08 +00:00
Devang Patel
26f7aeed7c
After r138010, subroutine type does not have context info. Update type verifier accordingly.
...
This fixes ptype.exp gdb testsuite regressions.
llvm-svn: 138869
2011-08-31 18:04:31 +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
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
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
1541972a13
Distinguish between two copies of one inlined variable. Take 2.
...
llvm-svn: 137253
2011-08-10 21:50:54 +00:00
Devang Patel
1d038e6e01
Provide method to print variable's extended name which includes inline location.
...
llvm-svn: 137095
2011-08-09 01:03:14 +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
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
5a4bb57ec5
Reapply r135457. This needs llvm-gcc change, that I forgot to check-in yesterday.
...
llvm-svn: 135504
2011-07-19 19:41:54 +00:00
Bob Wilson
7c9092c9aa
Revert "Make a provision to encode inline location in a variable. This will enable dwarf writer to easily distinguish between two instances of a inlined variable in one basic block."
...
This reverts commit 9fec5e346efdf744b151ae6604f912908315fa7a.
llvm-svn: 135486
2011-07-19 16:32:50 +00:00
Devang Patel
e50d45c876
Make a provision to encode inline location in a variable. This will enable dwarf writer to easily distinguish between two instances of a inlined variable in one basic block.
...
llvm-svn: 135457
2011-07-19 01:03:32 +00:00
Benjamin Kramer
a16cba3e83
Simplify code. No functionality change.
...
llvm-svn: 133351
2011-06-18 14:42:42 +00:00
Duncan Sands
a7c3ebafe4
Remove DIFactory. Patch by Devang.
...
llvm-svn: 126871
2011-03-02 20:30:37 +00:00
Devang Patel
f927b9703e
Move DbgInfoPrinter specific utlities inside DbgInfoPrinter.cpp
...
llvm-svn: 125571
2011-02-15 17:36:11 +00:00
Devang Patel
8b9081b0bf
Print function info. Patch by Minjang Kim.
...
llvm-svn: 125567
2011-02-15 17:24:56 +00:00
Devang Patel
2fef292729
Fix typo in comment.
...
llvm-svn: 124759
2011-02-03 00:13:47 +00:00
Devang Patel
71b1fadf20
Add support to describe template value parameter in debug info.
...
llvm-svn: 124755
2011-02-02 22:35:53 +00:00
Devang Patel
89455dc7cd
Add support to describe template parameter type in debug info.
...
llvm-svn: 124752
2011-02-02 21:38:25 +00:00
Devang Patel
53f05af4c1
Add support to create class type.
...
llvm-svn: 121279
2010-12-08 20:18:20 +00:00
Devang Patel
b7a7988b6b
Add support to create vector, array, enums etc...
...
llvm-svn: 121224
2010-12-08 01:50:15 +00:00
Devang Patel
cef2982b39
Add support to create variables, structs etc.. using DIBuilder.
...
This is still work in progress.
llvm-svn: 121205
2010-12-07 23:25:47 +00:00
Jakob Stoklund Olesen
6f535251de
Also inore '()' while creating mdnode name from ObjC symbol name.
...
llvm-svn: 120856
2010-12-03 23:40:45 +00:00
Devang Patel
fdc570cad4
Ignore '+' while creating mdnode name from ObjC symbol name.
...
llvm-svn: 120853
2010-12-03 23:29:30 +00:00
Devang Patel
5520a6fc97
Take care of special characters while creating named MDNode name to hold function specific local variable's info.
...
This fixes radar 8653152. I am checking in testcase as a separate check-in.
llvm-svn: 118726
2010-11-10 22:19:21 +00:00
Devang Patel
9af731f560
Fix DIType verifier. The element 3 is DIFile now.
...
llvm-svn: 118054
2010-11-02 20:41:13 +00:00
Devang Patel
eeb0b64560
Add support for DW_TAG_unspecified_parameters.
...
llvm-svn: 115833
2010-10-06 20:50:40 +00:00
Devang Patel
41e2a94595
Let FE mark a variable as artificial variable.
...
llvm-svn: 115102
2010-09-29 23:07:21 +00:00
Devang Patel
bbd003ab48
Generalize DISubprogram element to encode various flags instead of just one boolean for isArtificial.
...
This is a backword compatible change.
llvm-svn: 115084
2010-09-29 21:04:46 +00:00
Devang Patel
e1f502ee26
Provide an interface to let FEs anchor debug info for types.
...
llvm-svn: 114969
2010-09-28 18:08:20 +00:00
Benjamin Kramer
98e1aab5a8
Simplify code.
...
llvm-svn: 114444
2010-09-21 16:41:29 +00:00
Benjamin Kramer
a81f2ba27e
Make CreateComplexVariable independent of SmallVector.
...
llvm-svn: 114439
2010-09-21 16:00:03 +00:00
Devang Patel
45a818bea5
Let FE use derived types for DW_TAG_friend.
...
Patch by Alexander Herz!
llvm-svn: 111861
2010-08-23 23:16:25 +00:00
Devang Patel
cf6c6b4038
Handle qualified constants that are directly folded by FE.
...
PR 7920.
llvm-svn: 111820
2010-08-23 18:25:56 +00:00
Dan Gohman
31ab7e6b8c
CreateTemporaryType doesn't needs its Context argument.
...
llvm-svn: 111687
2010-08-20 22:39:47 +00:00
Dan Gohman
072e7bdcd4
Introduce a new temporary MDNode concept. Temporary MDNodes are
...
not part of the IR, are not uniqued, and may be safely RAUW'd.
This replaces a variety of alternate mechanisms for achieving
the same effect.
llvm-svn: 111681
2010-08-20 22:02:26 +00:00
Devang Patel
d425ead3c8
Even if a variable has constant value all the time, it is still a variable in gdb's eyes.
...
Tested by scope.exp in gdb testsuite.
llvm-svn: 110876
2010-08-11 23:17:54 +00:00
Devang Patel
17606414a4
Add missing argument. CreateCompositeTypeEx() users, please verify.
...
llvm-svn: 110717
2010-08-10 20:22:49 +00:00
Devang Patel
9b12559c4f
Do not forget debug info for enums. Use named mdnode to keep track of these types.
...
llvm-svn: 110712
2010-08-10 20:01:20 +00:00
Devang Patel
84f48b5483
Handle TAG_constant for integers.
...
llvm-svn: 110656
2010-08-10 07:11:13 +00:00
Devang Patel
8d0c79694e
Refactor.
...
llvm-svn: 110607
2010-08-09 21:39:24 +00:00
Devang Patel
f18faa5945
Add explicit constructors. Patch by Renato Golin.
...
llvm-svn: 110072
2010-08-02 22:51:46 +00:00
Dan Gohman
859ffd353e
Make NamedMDNode not be a subclass of Value, and simplify the interface
...
for creating and populating NamedMDNodes.
llvm-svn: 109061
2010-07-21 23:38:33 +00:00
Jim Grosbach
4d3c808fd9
tidy up.
...
llvm-svn: 109038
2010-07-21 21:36:25 +00:00
Dan Gohman
fc3ee085a0
Disallow null as a named metadata operand.
...
Make MDNode::destroy private.
Fix the one thing that used MDNode::destroy, outside of MDNode itself.
One should never delete or destroy an MDNode explicitly. MDNodes
implicitly go away when there are no references to them (implementation
details aside).
llvm-svn: 109028
2010-07-21 18:54:18 +00:00
Stuart Hastings
587ed4918c
Correct line info for declarations/definitions. Radar 8063111.
...
llvm-svn: 108784
2010-07-19 23:56:30 +00:00