summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/DwarfWriter.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Move the code that emits the .file directives so that it runs after theDan Gohman2007-10-011-16/+17
| | | | | | SourceFiles list is fully filled in so that it sees all of the files. llvm-svn: 42506
* Make the checks for DW_FORM_data4 consistent with the others, andDan Gohman2007-09-281-2/+6
| | | | | | add more such code for DIEDwarfLabel::SizeOf and DIEObjectLabel::SizeOf. llvm-svn: 42435
* Use 32-bit data directives for DW_FORM_data4 format data, even onDan Gohman2007-09-281-8/+10
| | | | | | targets with 64-bit addresses. llvm-svn: 42434
* TargetAsmInfo::getAddressSize() was incorrect for x86-64 and 64-bit targetsDan Gohman2007-09-271-15/+16
| | | | | | | | other than PPC64. Instead of fixing it, just remove it and fix all the places that use it to use TargetData::getPointerSize() instead, as there aren't very many. Most of the references were in DwarfWriter.cpp. llvm-svn: 42419
* Don't emit .debug_line header data if there aren't any lines to put in it,Dan Gohman2007-09-241-0/+5
| | | | | | such as will happen when .loc directives are used. llvm-svn: 42277
* Move the Asm->EOL() call for EmitDebugARanges outside the #ifdef forDan Gohman2007-09-241-1/+1
| | | | | | consistency with the other currently empty sections. llvm-svn: 42276
* Add support for emitting .file directives to set up file numbers forDan Gohman2007-09-241-0/+14
| | | | | | use with .loc directives. llvm-svn: 42275
* When emitting .set directives, make sure the EH and Debug labels can't conflict.Chris Lattner2007-09-241-10/+20
| | | | llvm-svn: 42257
* don't read Block after it is freed. This fixes PR1684Chris Lattner2007-09-211-0/+2
| | | | llvm-svn: 42204
* Objective-C was generating EH frame info like this:Bill Wendling2007-09-181-10/+11
| | | | | | | | | "_-[NSString(local) isNullOrNil]".eh = 0 .no_dead_strip "_-[NSString(local) isNullOrNil]".eh The ".eh" should be inside the quotes. llvm-svn: 42074
* Merge DenseMapKeyInfo & DenseMapValueInfo into DenseMapInfoChris Lattner2007-09-171-0/+1
| | | | | | | Add a new DenseMapInfo::isEqual method to allow clients to redefine the equality predicate used when probing the hash table. llvm-svn: 42042
* Add a bool to indicate if we should set the "indirect encoding" bit in the DwarfBill Wendling2007-09-111-1/+6
| | | | | | information for EH. llvm-svn: 41852
* The personality function on Darwin needs a global stub. We then refer toBill Wendling2007-09-111-20/+9
| | | | | | that global stub instead of doing the ".set" thingy we were doing before. llvm-svn: 41838
* Due to label merging, the last label for an invokeDuncan Sands2007-09-051-3/+2
| | | | | | | | 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
* Fix PR1628. When exception handling is turned on,Duncan Sands2007-09-051-77/+147
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Emit proper "secrel" directive, where possible. This fixes invalid asm ↵Anton Korobeynikov2007-09-021-43/+28
| | | | | | | | syntax of debug info on mingw32. Also, cleanup some stuff. llvm-svn: 41675
* Add explicit keywords and remove spurious trailing semicolons.Dan Gohman2007-08-271-9/+10
| | | | llvm-svn: 41482
* The personality function might need to be declared as:Bill Wendling2007-08-251-5/+18
| | | | | | | | | .set Lset0,___gxx_personality_v0-. .long Lset0 on some targets. Make it so! llvm-svn: 41385
* Fix minor doxygen nits.Reid Spencer2007-08-051-3/+3
| | | | llvm-svn: 40854
* Minor cleanup:Anton Korobeynikov2007-07-251-1/+1
| | | | | | | - Split EH and debug infiormation - Make DwarfWriter more verbose in some cases llvm-svn: 40481
* Fix some uses of dyn_cast to be uses of cast.Dan Gohman2007-07-231-1/+1
| | | | llvm-svn: 40443
* The type ids making up a filter are unsigned, andDuncan Sands2007-07-121-2/+2
| | | | | | | should be output as unsigned values. Checked against gcc. llvm-svn: 39775
* Indexes into the list of filter ids cannot be outputDuncan Sands2007-07-061-27/+47
| | | | | | | | 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
* Use more realistically sized vectors. Reserve capacity if we know in advanceDuncan Sands2007-06-081-4/+7
| | | | | | how much will be used. llvm-svn: 37515
* Fold the exception actions table harder: if two typeid lists start theDuncan Sands2007-06-061-57/+69
| | | | | | same, only output one copy of the common part. llvm-svn: 37470
* Integrate exception filter support and exception catch support. ThisDuncan Sands2007-06-021-53/+21
| | | | | | | | 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
* Mark all calls as "could throw", when exceptions are enabled. Emit necessary ↵Anton Korobeynikov2007-05-231-1/+1
| | | | | | LP info too. This fixes PR1439 llvm-svn: 37311
* Silence a warning.Owen Anderson2007-05-221-1/+1
| | | | llvm-svn: 37288
* Only emit one entry in the exception action table for each action, even ifDuncan Sands2007-05-211-65/+116
| | | | | | it occurs for multiple landing pads. llvm-svn: 37267
* Output exception call-sites in address order, as required by the unwindingDuncan Sands2007-05-161-10/+54
| | | | | | runtime. llvm-svn: 37104
* The index into the actions table is a ULEB128 not a SLEB128.Duncan Sands2007-05-151-1/+1
| | | | llvm-svn: 37084
* Emit function debug frames in one atom. This will prevent us from generating ↵Anton Korobeynikov2007-05-131-27/+41
| | | | | | | | incorrect assembler in case of both debug information & exception information presented. llvm-svn: 37019
* Emit multiple common EH frames for multiple (including blank) personalityAnton Korobeynikov2007-05-131-21/+21
| | | | | | | | 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
* More DWARF-related things cleanup:Anton Korobeynikov2007-05-121-48/+63
| | | | | | | | | | 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
* Perform correct actions numbers/sizes computationAnton Korobeynikov2007-05-111-5/+3
| | | | llvm-svn: 36988
* Fix action No calculation in multiple-invoke-one-LP modeAnton Korobeynikov2007-05-111-31/+31
| | | | llvm-svn: 36987
* Allow multiple invokes per landing pad. This (probably) fixes PR1410.Anton Korobeynikov2007-05-101-49/+54
| | | | llvm-svn: 36977
* Later computations assume we are aligned at this point.Duncan Sands2007-05-101-2/+3
| | | | llvm-svn: 36975
* TypeIds are indexed by j, not iAnton Korobeynikov2007-05-101-1/+1
| | | | llvm-svn: 36974
* Use the personality function that was registered with MMI rather thanDuncan Sands2007-05-051-9/+2
| | | | | | hardwiring in the C++ one. llvm-svn: 36789
* Spelling fix.Duncan Sands2007-05-051-1/+1
| | | | llvm-svn: 36781
* Emit sections/directives in the proper order. This fixes PR1376. Also,Anton Korobeynikov2007-05-051-4/+4
| | | | | | some small cleanup was made. llvm-svn: 36780
* Fix couple of bugs connected with eh info:Anton Korobeynikov2007-05-011-15/+27
| | | | | | | 1. Correct output offsets on Linux 2. Fix "style" of personality function. It shouldn't be indirect. llvm-svn: 36633
* Cleanup: make SetCounter an instance variableAnton Korobeynikov2007-03-071-28/+26
| | | | llvm-svn: 35007
* Fix DWARF debugging information on x86/Linux and (hopefully)Anton Korobeynikov2007-03-071-17/+61
| | | | | | Mingw32/Cygwin targets. This fixes PR978 llvm-svn: 35000
* Emit eh filter info.Jim Laskey2007-03-011-18/+66
| | | | llvm-svn: 34805
* Handle mix of personalities.Jim Laskey2007-02-281-30/+37
| | | | llvm-svn: 34752
* Missing end of abbreviations - correctionJim Laskey2007-02-221-1/+1
| | | | llvm-svn: 34501
* Missing end of abbreviations.Jim Laskey2007-02-221-0/+3
| | | | llvm-svn: 34500
* Exception handling support.Jim Laskey2007-02-211-91/+310
| | | | llvm-svn: 34479
OpenPOWER on IntegriCloud