summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/DwarfWriter.cpp
Commit message (Collapse)AuthorAgeFilesLines
* if some functions don't have debug info, we were outputing the same label at ↵Andrew Lenharth2008-04-031-2/+5
| | | | | | the start of each of those functions. This makes assemblers unhappy llvm-svn: 49176
* Cosmetic changes per EH patch review feedback.Dale Johannesen2008-04-021-1/+1
| | | | llvm-svn: 49096
* Recommitting EH patch; this should answer most of theDale Johannesen2008-04-021-31/+54
| | | | | | | | | | | | | | | 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
* Revert 49006 for the moment.Dale Johannesen2008-04-011-11/+5
| | | | llvm-svn: 49046
* Emit exception handling info for functions which areDale Johannesen2008-03-311-5/+11
| | | | | | | | | | | not marked nounwind, or for all functions when -enable-eh is set, provided the target supports Dwarf EH. llvm-gcc generates nounwind in the right places; other FEs will need to do so also. Given such a FE, -enable-eh should no longer be needed. llvm-svn: 49006
* Fix a bug in Darwin EH: FDE->CIE pointer mustDale Johannesen2008-03-261-13/+9
| | | | | | be relocatable. Describe why .set is needed better. llvm-svn: 48848
* Don't fill eh frames even though these are text sections.Evan Cheng2008-02-291-6/+6
| | | | llvm-svn: 47765
* Rename MRegisterInfo to TargetRegisterInfo.Dan Gohman2008-02-101-2/+2
| | | | llvm-svn: 46930
* Remove the nasty LABEL hack with a much less evil one. Now ↵Evan Cheng2008-02-011-0/+5
| | | | | | llvm.dbg.func.start implies a stoppoint is set. SelectionDAGISel records a new source line but does not create a ISD::LABEL node for this special stoppoint. Asm printer will magically print this label. This ensures nothing is emitted before. llvm-svn: 46635
* MRegisterInfo::getLocation() is a really bad idea. Its function is to ↵Evan Cheng2008-01-311-1/+2
| | | | | | | | calculate the offset from frame pointer to a stack slot and then storing the delta in a MachineLocation object. The name is bad (it implies a getter), and MRegisterInfo doesn't need to know about MachineLocation. Replace getLocation() with getFrameIndexOffset() which returns the delta from frame pointer to stack slot. Dwarf writer can then use the information for whatever it wants. llvm-svn: 46597
* Do not mark EH tables no-dead-strip unless theDale Johannesen2008-01-161-13/+25
| | | | | | associated function is so marked. llvm-svn: 46088
* Fix and enable EH for x86-64 Darwin. AddsDale Johannesen2008-01-151-8/+12
| | | | | | | | | ShortenEHDataFor64Bits as a not-very-accurate abstraction to cover all the changes in DwarfWriter. Some cosmetic changes to Darwin assembly code for gcc testsuite compatibility. llvm-svn: 46029
* Emit unused EH frames for weak definitions on Darwin,Dale Johannesen2008-01-101-8/+15
| | | | | | | because assembler/linker can't cope with weak absolutes. PR 1880. llvm-svn: 45811
* rename TargetInstrDescriptor -> TargetInstrDesc.Chris Lattner2008-01-071-1/+1
| | | | | | | Make MachineInstr::getDesc return a reference instead of a pointer, since it can never be null. llvm-svn: 45695
* Rename MachineInstr::getInstrDescriptor -> getDesc(), which reflectsChris Lattner2008-01-071-3/+1
| | | | | | | | | | | | | | | that it is cheap and efficient to get. Move a variety of predicates from TargetInstrInfo into TargetInstrDescriptor, which makes it much easier to query a predicate when you don't have TII around. Now you can use MI->getDesc()->isBranch() instead of going through TII, and this is much more efficient anyway. Not all of the predicates have been moved over yet. Update old code that used MI->getInstrDescriptor()->Flags to use the new predicates in many places. llvm-svn: 45674
* MachineOperand::getImmedValue -> MachineOperand::getImmChris Lattner2007-12-301-1/+1
| | | | llvm-svn: 45454
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45418
* The C++ exception handling personality function wantsDuncan Sands2007-12-191-24/+53
| | | | | | | | | | | | | | | | | | | | | | | to know about calls that cannot throw ('nounwind'): if such a call does throw for some reason then the personality will terminate the program. The distinction between an ordinary call and a nounwind call is that an ordinary call gets an entry in the exception table but a nounwind call does not. This patch sets up the exception table appropriately. One oddity is that I've chosen to bracket nounwind calls with labels (like invokes) - the other choice would have been to bracket ordinary calls with labels. While bracketing ordinary calls is more natural (because bracketing by labels would then correspond exactly to getting an entry in the exception table), I didn't do it because introducing labels impedes some optimizations and I'm guessing that ordinary calls occur more often than nounwind calls. This fixes the gcc filter2 eh test, at least at -O0 (the inliner needs some tweaking at higher optimization levels). llvm-svn: 45197
* Fix .eh table linkage issues on Darwin. Some EH supportDale Johannesen2007-11-201-7/+21
| | | | | | for Darwin PPC, but it's not fully working yet. llvm-svn: 44258
* Add parameter to getDwarfRegNum to permit targetsDale Johannesen2007-11-131-11/+11
| | | | | | | | to use different mappings for EH and debug info; no functional change yet. Fix warning in X86CodeEmitter. llvm-svn: 44056
* 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
OpenPOWER on IntegriCloud