summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/DwarfWriter.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove some dead code.Dale Johannesen2008-07-081-2/+0
| | | | llvm-svn: 53253
* Linux also does not require exception handlingDuncan Sands2008-07-041-3/+1
| | | | | | | | | moves in order to get correct debug info. Since I can't imagine how any target could possibly be any different, I've just stripped out the option: now all the world's like Darwin! llvm-svn: 53134
* Don't return std::vector by value, but pass it in by reference to be filled.Bill Wendling2008-07-031-4/+4
| | | | llvm-svn: 53123
* Revert my previous check-in that split up MachineModuleInfo. It turns out toBill Wendling2008-07-031-11/+12
| | | | | | slow the compiler down at -O0 some 30% or more. Ooops. llvm-svn: 53120
* Darwin doesn't need exception handling information for the "move" info whenBill Wendling2008-07-011-2/+2
| | | | | | debug information is being output, because it's leet! llvm-svn: 52994
* Avoid creating expensive comment string if it's not going to be printed.Evan Cheng2008-07-011-13/+22
| | | | llvm-svn: 52992
* Split ISD::LABEL into ISD::DBG_LABEL and ISD::EH_LABEL, eliminatingDan Gohman2008-07-011-1/+1
| | | | | | | | | | | | | | | | the need for a flavor operand, and add a new SDNode subclass, LabelSDNode, for use with them to eliminate the need for a label id operand. Change instruction selection to let these label nodes through unmodified instead of creating copies of them. Teach the MachineInstr emitter how to emit a MachineInstr directly from an ISD label node. This avoids the need for allocating SDNodes for the label id and flavor value, as well as SDNodes for each of the post-isel label, label id, and label flavor. llvm-svn: 52943
* Refactor the DebugInfoDesc stuff out of the MachineModuleInfo file. Clean upBill Wendling2008-06-271-12/+11
| | | | | | some uses of std::vector, where it's return std::vector by value. Yuck! llvm-svn: 52800
* Use SmallVector instead of std::vector for a minor compile time improvement.Owen Anderson2008-06-241-11/+11
| | | | llvm-svn: 52689
* Use back() instead of [size()-1].Dan Gohman2008-06-211-1/+1
| | | | llvm-svn: 52600
* Fix the source line debug information for the Windows platform.Argyrios Kyrtzidis2008-06-181-5/+88
| | | | | | | According to DWARF-2 specification, the line information is provided through an offset in the .debug_line section. Replace the label reference that is used with a section offset. llvm-svn: 52468
* Get exception handling working again on 64 bitDuncan Sands2008-05-081-1/+2
| | | | | | | | | | | Darwin. This is a hack of course, but it does at least look at the right thing: gotpcrel means that this is already an offset, so an explicit offset is not needed (and wrong). I think this is good enough for the moment: Anton is working on something better. llvm-svn: 50850
* Output correct exception handling and frame infoDuncan Sands2008-05-071-51/+49
| | | | | | | | | | | | | | | | | | on x86-64 linux. This causes no regressions on 32 bit linux and 32 bit ppc. More tests pass on 64 bit ppc with no regressions. I didn't turn on eh on 64 bit linux because the intrinsics needed to compile the eh runtime aren't done yet. But if you turn it on and link with the mainline runtime then eh seems to work fine on x86-64 linux with this patch. Thanks to Dale for testing. The main point of the patch is that if you output that some object is encoded using 4 bytes you had better not output 8 bytes for it: the patch makes everything consistent. llvm-svn: 50825
* Add comments for previous patch as requested.Dale Johannesen2008-04-301-0/+6
| | | | llvm-svn: 50463
* Make eh_frame objects by 8-byte aligned on 64-bitDale Johannesen2008-04-291-2/+4
| | | | | | targets. llvm-svn: 50451
* Reverse sense of unwind-tables option. This meansDale Johannesen2008-04-141-3/+3
| | | | | | | stack tracebacks on Darwin x86-64 won't work by default; nevertheless, everybody but me thinks this is a good idea. llvm-svn: 49663
* Implement new llc flag -disable-required-unwind-tables.Dale Johannesen2008-04-081-2/+7
| | | | | | Corresponds to -fno-unwind-tables (usually default in gcc). llvm-svn: 49361
* 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
OpenPOWER on IntegriCloud