Daniel Dunbar
bc3d149e98
Remove unused AsmPrinter OptLevel argument, and propogate.
...
- This more or less amounts to a revert of r65379. I'm curious to know what
happened that caused this variable to become unused.
llvm-svn: 74579
2009-07-01 01:48:54 +00:00
Devang Patel
e35cd91347
Struct types are described using field types only.
...
llvm-svn: 74477
2009-06-29 23:46:50 +00:00
Devang Patel
bff451b95b
s/MainCU/ModuleCU/g
...
llvm-svn: 74452
2009-06-29 20:45:18 +00:00
Devang Patel
4ba8cbff55
Multiple DW_TAG_compile_unit is not used, afaict, on any target.
...
Update dwarf writer to only emit one DW_TAG_compile_unit per .o file.
llvm-svn: 74449
2009-06-29 20:38:13 +00:00
Devang Patel
84a8914a4a
Remove debug info anchors - llvm.dbg.compile_units, llvm.dbg.subprograms
...
and llvm.dbg.global_variables.
llvm-svn: 74251
2009-06-26 01:49:18 +00:00
Devang Patel
32bbebe82f
Simplify.
...
llvm-svn: 74215
2009-06-25 22:36:02 +00:00
Owen Anderson
7bc2987c5c
Privatize some more debug-related static data.
...
llvm-svn: 74179
2009-06-25 16:55:32 +00:00
Owen Anderson
e194f62a43
Down with _even more_ statics!
...
llvm-svn: 74137
2009-06-24 23:13:56 +00:00
Owen Anderson
7b32a5b971
Down with statics!
...
llvm-svn: 74134
2009-06-24 22:53:20 +00:00
Owen Anderson
9832095b30
Move local statics to per-instance variables.
...
llvm-svn: 74132
2009-06-24 22:28:12 +00:00
Chris Lattner
ee30c14d3b
sink management of DwarfWriter & MachineModuleInfo into the AsmPrinter base class.
...
llvm-svn: 74101
2009-06-24 19:09:55 +00:00
Chris Lattner
d59a5b9f8b
sink dwarf finalization out of each target into AsmPrinter::doFinalization
...
llvm-svn: 74097
2009-06-24 18:54:37 +00:00
Chris Lattner
0690755320
eliminate the ExtWeakSymbols set from AsmPrinter. This eliminates
...
a bunch of code from all the targets, and eliminates nondeterministic
ordering of directives being emitted in the output.
llvm-svn: 74096
2009-06-24 18:52:01 +00:00
Chris Lattner
07463b0a0a
remove dead makefile flags.
...
llvm-svn: 74065
2009-06-24 05:29:56 +00:00
Devang Patel
35810cd07b
Move up dwarf writer initialization in common AsmPrinter class.
...
llvm-svn: 73784
2009-06-19 21:54:26 +00:00
Chris Lattner
6cd267dcc5
move mangler quote handling from asm printers to TargetAsmInfo.
...
llvm-svn: 73738
2009-06-18 23:41:35 +00:00
Chris Lattner
ea0ea2f4bc
simplify macro debug info directive handling.
...
llvm-svn: 73736
2009-06-18 23:31:37 +00:00
Evan Cheng
6c1c55f942
On Darwin, ams printer should output a second label before a jump table so the linker knows it's a new atom. But this is only needed if the jump table is put in a separate section from the function body.
...
llvm-svn: 73720
2009-06-18 20:37:15 +00:00
Bill Wendling
a41ca56ed4
Fix typos.
...
llvm-svn: 73464
2009-06-16 04:02:03 +00:00
Devang Patel
5941941827
Use MainCU if it is available.
...
llvm-svn: 73457
2009-06-16 02:09:30 +00:00
Devang Patel
1fb2606b12
Gracefully handle imbalanced inline function begin and end markers.
...
llvm-svn: 73426
2009-06-15 21:45:50 +00:00
Dan Gohman
111f127d23
Fix old-style type names in comments.
...
llvm-svn: 73362
2009-06-14 23:30:43 +00:00
Devang Patel
bcc1187643
llvm.dbg.region.end() intrinsic is not required to be in _last_ basic block in a function. If that happens then any basic block that follows (lexically) the block with regin.end will not have scope info available. LexicalScopeStack relies on processing basic block in CFG order, but this processing order is not guaranteed. Things get complicated when the optimizer gets a chance to optimizer IR with dbg intrinsics.
...
Apply defensive patch to preserve at least one lexical scope till the end of function.
llvm-svn: 73282
2009-06-13 02:16:18 +00:00
Devang Patel
8d9aa4249a
Clear AbstractInstanceRootMap at the end of the function.
...
llvm-svn: 73244
2009-06-12 19:24:05 +00:00
Dan Gohman
ee407d25ca
Remove some unnecessary #includes.
...
llvm-svn: 72948
2009-06-05 16:32:58 +00:00
Bill Wendling
c77c8e5f6e
Accidental commit. This isn't ready for prime time just yet.
...
llvm-svn: 72699
2009-06-01 20:18:46 +00:00
Bill Wendling
8235a05c1a
Untabification.
...
llvm-svn: 72604
2009-05-30 01:09:53 +00:00
Bill Wendling
9bca78046b
Temporarily revert r72191. It was causing an assert during llvm-gcc
...
bootstrapping.
llvm-svn: 72200
2009-05-21 00:04:55 +00:00
Bill Wendling
0404cd92ab
Minor code cleanup. No functionality change.
...
llvm-svn: 72198
2009-05-20 23:31:45 +00:00
Bill Wendling
2a97cb4881
Merge 'ConstructFunctionDbgScope' and 'ConstructAbstractDbgScope'.
...
llvm-svn: 72197
2009-05-20 23:28:48 +00:00
Bill Wendling
acc358774c
Rename 'New*' methods to 'Create*' to be consistent. 'NewString' isn't used.
...
llvm-svn: 72196
2009-05-20 23:24:48 +00:00
Bill Wendling
bd78fe50a3
Add comment for emit section.
...
llvm-svn: 72195
2009-05-20 23:22:40 +00:00
Bill Wendling
9a2d96a37a
Move 'Emit' methods down to their own place.
...
llvm-svn: 72194
2009-05-20 23:21:38 +00:00
Bill Wendling
b77e48674c
Revert r72192. It was causing a build failure.
...
llvm-svn: 72193
2009-05-20 23:19:06 +00:00
Bill Wendling
864c567fc8
Do some mechanical changes. Combine the 'construct abastract dbg thingy' in with
...
the 'constract function dbg thingy'. Rename some methods to make them consistent
with the rest of the methods. Move the 'Emit' methods to the end of the file.
llvm-svn: 72192
2009-05-20 23:04:56 +00:00
Argyrios Kyrtzidis
c651293fa0
Introduce DebugScope which gets embedded into the machine instructions' DebugLoc.
...
DebugScope refers to a debug region, function or block.
llvm-svn: 72191
2009-05-20 22:57:17 +00:00
Mike Stump
2eb592f2f9
Fix cmake builds.
...
llvm-svn: 72078
2009-05-19 00:18:14 +00:00
Bill Wendling
a443337af0
Don't set the "location" information for inlined functions' variables.
...
llvm-svn: 72064
2009-05-18 23:08:55 +00:00
Bill Wendling
8e6fe772be
Small code cleanup.
...
llvm-svn: 72057
2009-05-18 22:33:01 +00:00
Bill Wendling
45cb84b4e3
RecordVariable is called each time a DECLARE node is encountered. For an inlined
...
function, this could be many, many times. We don't want to re-add variables to
that DIE for each time. We just want to add them once. Check to make sure that
we haven't added them already.
llvm-svn: 72047
2009-05-18 22:02:36 +00:00
Bill Wendling
ac4cfe34e6
Split out the DwarfDebug module from the DwarfWriter module.
...
Again, no intendtional functionality change.
llvm-svn: 71854
2009-05-15 09:23:25 +00:00
Bill Wendling
6bbe2a1daa
Mark class as hidden.
...
llvm-svn: 71850
2009-05-15 06:55:26 +00:00
Bill Wendling
8d9aae8003
Move c'tor/d'tor to top of file.
...
llvm-svn: 71828
2009-05-15 01:18:50 +00:00
Bill Wendling
cec6308edc
Split out the DwarfException class into its own file. No functionality change,
...
though the classes have been marked with "VISIBILITY_HIDDEN".
llvm-svn: 71827
2009-05-15 01:12:28 +00:00
Bill Wendling
5fe69fa68e
Split out the Dwarf writer stuff into separate files. This is a much more
...
logical/sane approach to organizing all of the stuff that goes into writing out
DWARF information. Honestly? even this is too complex for what it's supposed to
be doing.
Trivia: It *looks* like there would be functionality changes, however there aren't!
llvm-svn: 71821
2009-05-15 00:11:17 +00:00
Mike Stump
5596137537
Tag blocks with DW_AT_APPLE_block.
...
llvm-svn: 71784
2009-05-14 18:45:49 +00:00
Bill Wendling
a68cfc68f8
There's yet more ugliness (surprise!) in DebugInfo. This needs major reworking.
...
Basically, there was a situation where it was getting an empty vector and doing
a .back() on that. Which isn't cool.
llvm-svn: 71746
2009-05-13 23:55:49 +00:00
Bill Wendling
35584a26be
Move the bookkeeping of the debug scopes back to the place where it
...
belonged. The variable declaration stuff wasn't happy with it where it
was. Sorry that the testcase is so big. Bugpoint wasn't able to reduce it
successfully.
llvm-svn: 71714
2009-05-13 20:33:33 +00:00
Bill Wendling
dd997304e8
- Record that the debug info is actually used so that the label folder doesn't
...
blast it away.
- Move InlineInfo bookkeeping to bookkeep the correct debug info object.
llvm-svn: 71519
2009-05-12 00:06:59 +00:00
Bill Wendling
e0a4e2af03
This is a large rewrite of how Dwarf info for inlined functions is handled.
...
The DwarfWriter expects DbgScopes and DIEs to behave themselves according to
DwarfWriter's rules. However, inlined functions violate these rules. There are
two different types of DIEs associated with an inlined function: an abstract
instance, which has information about the original source code for the function
being inlined; and concrete instances, which are created for each place the
function was inlined and point back to the abstract instance.
This patch tries to stay true to this schema. It bypasses how regular DbgScopes
and DIEs are created and used when necessary. It provides special handling for
DIEs of abstract and concrete instances.
This doesn't take care of all of the problems with debug info for inlined
functions, but it's a step in the right direction. For one thing, llvm-gcc
generates wrong IR (it's missing some llvm.dbg intrinsics at the point where the
function's inlined) for this example:
#include <stdio.h>
static __inline__ __attribute__((always_inline)) int bar(int x) { return 4; }
void foo() {
long long b = 1;
int Y = bar(4);
printf("%d\n", Y);
}
while clang generates correct IR.
llvm-svn: 71410
2009-05-10 23:14:38 +00:00