Bill Wendling
067f1d8e95
Objective-C was generating EH frame info like this:
...
"_-[NSString(local) isNullOrNil]".eh = 0
.no_dead_strip "_-[NSString(local) isNullOrNil]".eh
The ".eh" should be inside the quotes.
llvm-svn: 42074
2007-09-18 01:47:22 +00:00
Chris Lattner
0625bd6472
Merge DenseMapKeyInfo & DenseMapValueInfo into DenseMapInfo
...
Add a new DenseMapInfo::isEqual method to allow clients to redefine
the equality predicate used when probing the hash table.
llvm-svn: 42042
2007-09-17 18:34:04 +00:00
Bill Wendling
74fb0f1a1c
Add a bool to indicate if we should set the "indirect encoding" bit in the Dwarf
...
information for EH.
llvm-svn: 41852
2007-09-11 17:20:55 +00:00
Bill Wendling
2b8fc31df9
The personality function on Darwin needs a global stub. We then refer to
...
that global stub instead of doing the ".set" thingy we were doing before.
llvm-svn: 41838
2007-09-11 08:27:17 +00:00
Duncan Sands
2c0a0fb725
Due to label merging, the last label for an invoke
...
may be the same as the first label for the following
invoke. Remove a micro-optimization which was wrong
in this case.
llvm-svn: 41720
2007-09-05 14:12:46 +00:00
Duncan Sands
3c1b7fc056
Fix PR1628. When exception handling is turned on,
...
labels are generated bracketing each call (not just
invokes). This is used to generate entries in
the exception table required by the C++ personality.
However it gets in the way of tail-merging. This
patch solves the problem by no longer placing labels
around ordinary calls. Instead we generate entries
in the exception table that cover every instruction
in the function that wasn't covered by an invoke
range (the range given by the labels around the invoke).
As an optimization, such entries are only generated for
parts of the function that contain a call, since for
the moment those are the only instructions that can
throw an exception [1]. As a happy consequence, we
now get a smaller exception table, since the same
region can cover many calls. While there, I also
implemented folding of invoke ranges - successive
ranges are merged when safe to do so. Finally, if
a selector contains only a cleanup, there's a special
shorthand for it - place a 0 in the call-site entry.
I implemented this while there. As a result, the
exception table output (excluding filters) is now
optimal - it cannot be made smaller [2]. The
problem with throw filters is that folding them
optimally is hard, and the benefit of folding them is
minimal.
[1] I tested that having trapping instructions (eg
divide by zero) in such a region doesn't cause trouble.
[2] It could be made smaller with the help of higher
layers, eg by having branch folding reorder basic blocks
ending in invokes with the same landing pad so they
follow each other. I don't know if this is worth doing.
llvm-svn: 41718
2007-09-05 11:27:52 +00:00
Anton Korobeynikov
38ce90fd44
Emit proper "secrel" directive, where possible. This fixes invalid asm syntax of debug info on mingw32. Also, cleanup
...
some stuff.
llvm-svn: 41675
2007-09-02 22:07:21 +00:00
Dan Gohman
032d89828e
Add explicit keywords and remove spurious trailing semicolons.
...
llvm-svn: 41482
2007-08-27 14:50:10 +00:00
Bill Wendling
48597b4ff8
The personality function might need to be declared as:
...
.set Lset0,___gxx_personality_v0-.
.long Lset0
on some targets. Make it so!
llvm-svn: 41385
2007-08-25 00:51:55 +00:00
Reid Spencer
446282ae3d
Fix minor doxygen nits.
...
llvm-svn: 40854
2007-08-05 20:06:04 +00:00
Anton Korobeynikov
64b64ae591
Minor cleanup:
...
- Split EH and debug infiormation
- Make DwarfWriter more verbose in some cases
llvm-svn: 40481
2007-07-25 00:06:28 +00:00
Dan Gohman
b6a8ae20c7
Fix some uses of dyn_cast to be uses of cast.
...
llvm-svn: 40443
2007-07-23 20:24:29 +00:00
Duncan Sands
0263dd1d7f
The type ids making up a filter are unsigned, and
...
should be output as unsigned values. Checked against
gcc.
llvm-svn: 39775
2007-07-12 13:51:39 +00:00
Duncan Sands
c5b1984f57
Indexes into the list of filter ids cannot be output
...
directly: they need to be turned into byte offsets
(often the same, but may not be if there are many
type infos).
llvm-svn: 37942
2007-07-06 12:46:24 +00:00
Duncan Sands
dc8fc1550e
Use more realistically sized vectors. Reserve capacity if we know in advance
...
how much will be used.
llvm-svn: 37515
2007-06-08 08:59:11 +00:00
Duncan Sands
29d1dc6f1a
Fold the exception actions table harder: if two typeid lists start the
...
same, only output one copy of the common part.
llvm-svn: 37470
2007-06-06 15:37:31 +00:00
Duncan Sands
c063f5f362
Integrate exception filter support and exception catch support. This
...
simplifies the code in DwarfWriter, allows for multiple filters and
makes it trivial to specify filters accompanied by cleanups or catch-all
specifications (see next patch). What a deal! Patch blessed by Anton.
llvm-svn: 37398
2007-06-02 16:53:42 +00:00
Anton Korobeynikov
3b327826db
Mark all calls as "could throw", when exceptions are enabled. Emit necessary LP info too. This fixes PR1439
...
llvm-svn: 37311
2007-05-23 11:08:31 +00:00
Owen Anderson
0ae7eb5e7c
Silence a warning.
...
llvm-svn: 37288
2007-05-22 18:13:40 +00:00
Duncan Sands
34e82a4508
Only emit one entry in the exception action table for each action, even if
...
it occurs for multiple landing pads.
llvm-svn: 37267
2007-05-21 18:50:28 +00:00
Duncan Sands
59ae77486c
Output exception call-sites in address order, as required by the unwinding
...
runtime.
llvm-svn: 37104
2007-05-16 12:12:23 +00:00
Duncan Sands
750e8c5d4d
The index into the actions table is a ULEB128 not a SLEB128.
...
llvm-svn: 37084
2007-05-15 13:54:14 +00:00
Anton Korobeynikov
1ee0c8d563
Emit function debug frames in one atom. This will prevent us from generating incorrect assembler in case of both
...
debug information & exception information presented.
llvm-svn: 37019
2007-05-13 17:30:11 +00:00
Anton Korobeynikov
bbaf55448b
Emit multiple common EH frames for multiple (including blank) personality
...
functions. This partly fixes PR1414: now we're restricted only to one
personality function per eh frame, not per module. Further work on
"multiple personalities" topic needs representative example.
llvm-svn: 37018
2007-05-13 15:42:26 +00:00
Anton Korobeynikov
13da17843c
More DWARF-related things cleanup:
...
1. Fix PR1380
2. Apply Duncan's patch from PR1410
3. Insert workaround for "one personality function per module" as noted in PR1414
4. Emit correct debug frames for x86/linux. This partly fixes DebugInfo/2006-11-06-StackTrace.cpp: stack trace is
shown correctly, but arguments for function on top of stack are displayed incorrectly.
llvm-svn: 37015
2007-05-12 22:36:25 +00:00
Anton Korobeynikov
67286b1266
Perform correct actions numbers/sizes computation
...
llvm-svn: 36988
2007-05-11 08:47:35 +00:00
Anton Korobeynikov
00d02442b0
Fix action No calculation in multiple-invoke-one-LP mode
...
llvm-svn: 36987
2007-05-11 08:23:57 +00:00
Anton Korobeynikov
96142de3f0
Allow multiple invokes per landing pad. This (probably) fixes PR1410.
...
llvm-svn: 36977
2007-05-10 22:34:59 +00:00
Duncan Sands
b43fe52136
Later computations assume we are aligned at this point.
...
llvm-svn: 36975
2007-05-10 18:40:24 +00:00
Anton Korobeynikov
ed5dad4306
TypeIds are indexed by j, not i
...
llvm-svn: 36974
2007-05-10 15:10:34 +00:00
Duncan Sands
00282a21a5
Use the personality function that was registered with MMI rather than
...
hardwiring in the C++ one.
llvm-svn: 36789
2007-05-05 20:27:00 +00:00
Duncan Sands
02528f5425
Spelling fix.
...
llvm-svn: 36781
2007-05-05 16:32:57 +00:00
Anton Korobeynikov
4db0090339
Emit sections/directives in the proper order. This fixes PR1376. Also,
...
some small cleanup was made.
llvm-svn: 36780
2007-05-05 09:04:50 +00:00
Anton Korobeynikov
b538f67b1a
Fix couple of bugs connected with eh info:
...
1. Correct output offsets on Linux
2. Fix "style" of personality function. It shouldn't be indirect.
llvm-svn: 36633
2007-05-01 22:23:12 +00:00
Anton Korobeynikov
dd6ce6900e
Cleanup: make SetCounter an instance variable
...
llvm-svn: 35007
2007-03-07 08:25:02 +00:00
Anton Korobeynikov
942fda027f
Fix DWARF debugging information on x86/Linux and (hopefully)
...
Mingw32/Cygwin targets. This fixes PR978
llvm-svn: 35000
2007-03-07 02:47:57 +00:00
Jim Laskey
82af5943d1
Emit eh filter info.
...
llvm-svn: 34805
2007-03-01 20:26:43 +00:00
Jim Laskey
c46bf3577d
Handle mix of personalities.
...
llvm-svn: 34752
2007-02-28 18:38:31 +00:00
Jim Laskey
66aa84d12f
Missing end of abbreviations - correction
...
llvm-svn: 34501
2007-02-22 18:48:52 +00:00
Jim Laskey
4e3d2b9acc
Missing end of abbreviations.
...
llvm-svn: 34500
2007-02-22 18:22:42 +00:00
Jim Laskey
09953e6482
Exception handling support.
...
llvm-svn: 34479
2007-02-21 22:48:45 +00:00
Jim Laskey
f970221c4d
Slip up
...
llvm-svn: 33758
2007-02-01 17:48:20 +00:00
Jim Laskey
894ceb1c6f
Emit labels as label_n and not as debug_n
...
llvm-svn: 33757
2007-02-01 17:46:10 +00:00
Jim Laskey
c3de9b4b14
Support for non-landing pad exception handling.
...
llvm-svn: 33755
2007-02-01 16:31:34 +00:00
Jim Laskey
ee23de6c36
Out of line function.
...
llvm-svn: 33641
2007-01-29 23:40:33 +00:00
Jim Laskey
3f9f250928
Only gather frame info if debug or eh.
...
llvm-svn: 33639
2007-01-29 23:20:22 +00:00
Jim Laskey
d1154860a4
Flag to control exception handling.
...
llvm-svn: 33628
2007-01-29 20:48:32 +00:00
Jim Laskey
18c3b5267d
Disable zero landing pads for now.
...
llvm-svn: 33625
2007-01-29 20:01:41 +00:00
Jim Laskey
b4a2f05d1c
Landing pad-less eh for PPC.
...
llvm-svn: 33622
2007-01-29 18:51:14 +00:00
Jim Laskey
c56315c2b5
Change the MachineDebugInfo to MachineModuleInfo to better reflect usage
...
for debugging and exception handling.
llvm-svn: 33550
2007-01-26 21:22:28 +00:00