1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 20:43:44 +02:00
Commit Graph

62 Commits

Author SHA1 Message Date
Devang Patel
9cd7c1ab8e Remove DebugLabelFolder pass. It is not used by dwarf writer anymore.
llvm-svn: 89790
2009-11-24 19:37:07 +00:00
Devang Patel
c024e96ca3 "Attach debug info with llvm instructions" mode was enabled a month ago. Now make it permanent and remove old way of inserting intrinsics to encode debug info for line number and scopes.
llvm-svn: 87014
2009-11-12 19:02:56 +00:00
Devang Patel
5c983cb2ab Implement support to debug inlined functions.
llvm-svn: 86748
2009-11-10 23:06:00 +00:00
Chandler Carruth
766362c707 Move DataTypes.h to include/llvm/System, update all users. This breaks the last
direct inclusion edge from System to Support.

llvm-svn: 85086
2009-10-26 01:35:46 +00:00
Devang Patel
1fa3e26912 Using TrackingVH instead of WeakVH or WeakMetadataVH.
llvm-svn: 84884
2009-10-22 18:25:28 +00:00
Devang Patel
21a7babc56 Enable "debug info attached to an instruction" mode.
llvm-svn: 83925
2009-10-12 23:22:09 +00:00
Devang Patel
c97c44b584 Extract scope information from the variable itself, instead of relying on alloca or llvm.dbg.declare location.
While recording beginning of a function, use scope info from the first location entry instead of just relying on first location entry itself.

llvm-svn: 83684
2009-10-09 22:42:28 +00:00
Devang Patel
d24ba7a101 If location info is attached with an instruction then keep track of alloca slots used by a variable. This info will be used by AsmPrinter to emit debug info for variables.
llvm-svn: 83189
2009-10-01 01:03:26 +00:00
Devang Patel
5d5d1f31b7 Silence unused variable warning.
llvm-svn: 83151
2009-09-30 17:13:41 +00:00
Devang Patel
0136a7ebec Simplify.
llvm-svn: 83123
2009-09-30 00:14:40 +00:00
Chris Lattner
f91260f6cf move FnStubs/GVSTubs/HiddenGVStub handling out of the X86 asmprinter
and use MachineModuleInfoMachO instead.

llvm-svn: 82022
2009-09-16 06:25:03 +00:00
Chris Lattner
4452afa6d8 add a new MachineModuleInfoMachO class, which is the per-module
stuff common across all macho targets.

llvm-svn: 82018
2009-09-16 06:03:48 +00:00
Chris Lattner
d6143d7aff the pointer MMI keeps will start out with object-file format specific stuff
llvm-svn: 82012
2009-09-16 05:26:00 +00:00
Chris Lattner
8457d8c557 add hooks to hang target-specific goop off MachineModuleInfo,
move MachineFunctionInfo virtual method out of line to give it
a home.

llvm-svn: 81940
2009-09-15 22:44:26 +00:00
Chris Lattner
eac40b1473 implement a new magic global "llvm.compiler.used" which is like llvm.used, but
doesn't cause ".no_dead_strip" to be emitted on darwin.

llvm-svn: 76399
2009-07-20 06:14:25 +00:00
Argyrios Kyrtzidis
9e888740d2 Remove an, apparently, leftover MachineModuleInfo::RecordSourceLine declaration.
llvm-svn: 70804
2009-05-03 22:11:08 +00:00
Devang Patel
92ff43635b DebugLabelFolder ruthlessly deletes redundant labels. However, sometimes the redundant labels is referenced by debug info somewhere else. This patch provies a way so that dwarf writer can mark labels as used.
llvm-svn: 68813
2009-04-10 18:58:59 +00:00
Devang Patel
8c076d8328 Remove dead code.
llvm-svn: 63653
2009-02-03 19:46:28 +00:00
Devang Patel
ccc3162f69 Need only one set of debug info versions enum.
llvm-svn: 62602
2009-01-20 19:22:03 +00:00
Devang Patel
1da8253b35 Removoe MachineModuleInfo methods (and related DebugInfoDesc class hierarchy) that were used to handle debug info.
llvm-svn: 62199
2009-01-13 23:54:55 +00:00
Devang Patel
ba388f3905 Keep "has debug info" big in MachineModuleInfo to avoid circular dependency between AsmPrinter and CodeGen.
llvm-svn: 62191
2009-01-13 23:02:17 +00:00
Devang Patel
ceeecba890 Today the front-ends (llvm-gcc and clang) generate multiple llvm.dbg.compile_units to identify source file for various debug entities. Each llvm.dbg.compile_unit matches one file on the disk. However, the backend only supports one DW_TAG_compile_unit per .o file. The backend selects first compile_unit from the vector to construct DW_TAG_compile_unit entry, which is not correct in all cases.
First step to resolve this is, record file name and directory directly in debug info for various debug entities. 

llvm-svn: 61164
2008-12-17 22:39:29 +00:00
Evan Cheng
9419dfe08a Fix a couple of Dwarf bugs.
- Emit DW_AT_byte_size for struct and union of size zero.
- Emit DW_AT_declaration for forward type declaration.

llvm-svn: 60812
2008-12-10 00:15:44 +00:00
Dan Gohman
46dafc2fb9 Move the include of MachineLocation.h into MachineModuleInfo.h
because it declares a std::vector<MachineMove>, and strict
concept checking requires the definition of MachineMove to be
available.

llvm-svn: 57617
2008-10-16 00:20:14 +00:00
Bill Wendling
d7da49634d Use StringMap for greater justice!
llvm-svn: 53202
2008-07-07 20:59:31 +00:00
Bill Wendling
e3ad6f2249 Don't return std::vector by value, but pass it in by reference to be filled.
llvm-svn: 53123
2008-07-03 23:13:02 +00:00
Bill Wendling
2c9a84d788 Revert my previous check-in that split up MachineModuleInfo. It turns out to
slow the compiler down at -O0 some 30% or more. Ooops.

llvm-svn: 53120
2008-07-03 22:53:42 +00:00
Bill Wendling
d19faaca94 More cruft from revert...
llvm-svn: 52809
2008-06-27 01:37:37 +00:00
Bill Wendling
e9909a1c2a Reverting broken patch r52803.
llvm-svn: 52806
2008-06-27 01:27:56 +00:00
Bill Wendling
d0c2026584 - Remove a use of std::vector.
- Make sure that we're not recalculating the size of a vector
  that never changes.

llvm-svn: 52803
2008-06-27 00:56:36 +00:00
Bill Wendling
2ab62b9a92 Refactor the DebugInfoDesc stuff out of the MachineModuleInfo file. Clean up
some uses of std::vector, where it's return std::vector by value. Yuck!

llvm-svn: 52800
2008-06-27 00:09:40 +00:00
Evan Cheng
d9353009b7 Fix more -Wshorten-64-to-32 warnings.
llvm-svn: 50659
2008-05-05 18:30:58 +00:00
Dan Gohman
f03c4d87c0 Update comments to use 2.0 syntax type names.
llvm-svn: 49442
2008-04-09 18:24:25 +00:00
Dale Johannesen
79633a914f Recommitting EH patch; this should answer most of the
review feedback.
-enable-eh is still accepted but doesn't do anything.
EH intrinsics use Dwarf EH if the target supports that,
and are handled by LowerInvoke otherwise.
The separation of the EH table and frame move data is,
I think, logically figured out, but either one still
causes full EH info to be generated (not sure how to
split the metadata correctly).
MachineModuleInfo::needsFrameInfo is no longer used and
is removed.

llvm-svn: 49064
2008-04-02 00:25:04 +00:00
Dan Gohman
22002efa15 A quick nm audit turned up several fixed tables and objects that were
marked read-write. Use const so that they can be allocated in a
read-only segment.

llvm-svn: 48800
2008-03-25 21:45:14 +00:00
Evan Cheng
c57ec111f2 SDIsel processes llvm.dbg.declare by recording the variable debug information descriptor and its corresponding stack frame index in MachineModuleInfo. This only works if the local variable is "homed" in the stack frame. It does not work for byval parameter, etc.
Added ISD::DECLARE node type to represent llvm.dbg.declare intrinsic. Now the intrinsic calls are lowered into a SDNode and lives on through out the codegen passes.
For now, since all the debugging information recording is done at isel time, when a ISD::DECLARE node is selected, it has the side effect of also recording the variable. This is a short term solution that should be fixed in time.

llvm-svn: 46659
2008-02-02 04:07:54 +00:00
Evan Cheng
abe3a9ad27 Rename RecordLabel to RecordSourceLine because that's what it is doing.
llvm-svn: 46628
2008-02-01 02:05:57 +00:00
Dale Johannesen
cfa41e888e Do not mark EH tables no-dead-strip unless the
associated function is so marked.

llvm-svn: 46088
2008-01-16 19:59:28 +00:00
Chris Lattner
e0b1ee937a Don't attribute in file headers anymore. See llvmdev for the
discussion of this change.  Boy are my fingers tired. ;-)

llvm-svn: 45411
2007-12-29 19:59:42 +00:00
Devang Patel
47b368da69 Provide a way to update DescGlobals cache directly.
llvm-svn: 44446
2007-11-30 00:51:33 +00:00
Dan Gohman
ed361aa114 explicit keywords.
llvm-svn: 42262
2007-09-24 15:48:49 +00:00
Duncan Sands
883740b39f There is an impedance matching problem between LLVM and
gcc exception handling: if an exception unwinds through
an invoke, then execution must branch to the invoke's
unwind target.  We previously tried to enforce this by
appending a cleanup action to every selector, however
this does not always work correctly due to an optimization
in the C++ unwinding runtime: if only cleanups would be
run while unwinding an exception, then the program just
terminates without actually executing the cleanups, as
invoke semantics would require.  I was hoping this
wouldn't be a problem, but in fact it turns out to be the
cause of all the remaining failures in the LLVM testsuite
(these also fail with -enable-correct-eh-support, so turning
on -enable-eh didn't make things worse!).  Instead we need
to append a full-blown catch-all to the end of each
selector.  The correct way of doing this depends on the
personality function, i.e. it is language dependent, so
can only be done by gcc.  Thus this patch which generalizes
the eh.selector intrinsic so that it can handle all possible
kinds of action table entries (before it didn't accomodate
cleanups): now 0 indicates a cleanup, and filters have to be
specified using the number of type infos plus one rather than
the number of type infos.  Related gcc patches will cause
Ada to pass a cleanup (0) to force the selector to always
fire, while C++ will use a C++ catch-all (null).

llvm-svn: 41484
2007-08-27 15:47:50 +00:00
Anton Korobeynikov
5635277c36 Long live the exception handling!
This patch fills the last necessary bits to enable exceptions
handling in LLVM. Currently only on x86-32/linux.

In fact, this patch adds necessary intrinsics (and their lowering) which
represent really weird target-specific gcc builtins used inside unwinder.

After corresponding llvm-gcc patch will land (easy) exceptions should be
more or less workable. However, exceptions handling support should not be 
thought as 'finished': I expect many small and not so small glitches
everywhere.

llvm-svn: 39855
2007-07-14 14:06:15 +00:00
Dan Gohman
a83ac4f3b4 Add explicit keywords.
llvm-svn: 37925
2007-07-05 20:40:15 +00:00
Duncan Sands
eca2fa295b Make sure only one copy of a filter is placed in the
exception handling table if we encounter it multiple
times.  Filters could be folded harder than this, but
that would mean a lot more work for not much gain.

llvm-svn: 37908
2007-07-05 15:15:01 +00:00
Duncan Sands
f37bc8207e The semantics of invoke require that we always jump to the unwind block
(landing pad) when an exception unwinds through the call.  This doesn't
quite match the way the dwarf unwinder works: by default it only jumps to
the landing pad if the catch or filter specification matches, and otherwise
it keeps on unwinding.  There are two ways of specifying to the unwinder
that it should "always" (more on why there are quotes here later) jump to
the landing pad: follow the specification by a 0 typeid, or follow it by
the typeid for the NULL typeinfo.  GCC does the first, and this patch makes
LLVM do the same as gcc.  However there is a problem: the unwinder performs
optimizations based on C++ semantics (it only expects destructors to be
run if the 0 typeid fires - known as "cleanups"), meaning it assumes that no
exceptions will be raised and that the raised exception will be reraised
at the end of the cleanup code.  So if someone writes their own LLVM code
using the exception intrinsics they will get a nasty surprise if they don't
follow these rules.  The other possibility of using the typeid corresponding
to NULL (catch-all) causes the unwinder to make no assumptions, so this is
probably what we should use in the long-run.  However since we are still
having trouble getting exception handling working properly, for the moment
it seems best to closely imitate GCC.

llvm-svn: 37399
2007-06-02 17:16:06 +00:00
Duncan Sands
37925d3f39 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
0f184e86ab 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
Anton Korobeynikov
100919126f 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
7daaf71b29 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