summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Instead of passing in an unsigned value for the optimization level, use an enum,Bill Wendling2009-04-291-3/+3
| | | | | | | which better identifies what the optimization is doing. And is more flexible for future uses. llvm-svn: 70440
* Second attempt:Bill Wendling2009-04-291-5/+5
| | | | | | | | | | | | Massive check in. This changes the "-fast" flag to "-O#" in llc. If you want to use the old behavior, the flag is -O0. This change allows for finer-grained control over which optimizations are run at different -O levels. Most of this work was pretty mechanical. The majority of the fixes came from verifying that a "fast" variable wasn't used anymore. The JIT still uses a "Fast" flag. I'll change the JIT with a follow-up patch. llvm-svn: 70343
* r70270 isn't ready yet. Back this out. Sorry for the noise.Bill Wendling2009-04-281-4/+5
| | | | llvm-svn: 70275
* Massive check in. This changes the "-fast" flag to "-O#" in llc. If you want toBill Wendling2009-04-281-4/+4
| | | | | | | | | | | use the old behavior, the flag is -O0. This change allows for finer-grained control over which optimizations are run at different -O levels. Most of this work was pretty mechanical. The majority of the fixes came from verifying that a "fast" variable wasn't used anymore. The JIT still uses a "Fast" flag. I'm not 100% sure if it's necessary to change it there... llvm-svn: 70270
* Fix Visual Studio 2008 build failure.Devang Patel2009-04-211-3/+3
| | | | | | Patch by Marius Wachtler llvm-svn: 69637
* s/RootDbgScope/FunctionDbgScope/gDevang Patel2009-04-151-13/+13
| | | | llvm-svn: 69216
* Check isInlinedSubroutine() before creating DW_TAG_inlined_subroutine.Devang Patel2009-04-151-1/+2
| | | | llvm-svn: 69202
* Construct and emit DW_TAG_inlined_subroutine DIEs for inlined subroutine ↵Devang Patel2009-04-151-76/+188
| | | | | | scopes (only in FastISel mode). llvm-svn: 69116
* Right now, Debugging information to encode scopes (DW_TAG_lexical_block) ↵Devang Patel2009-04-131-3/+8
| | | | | | | | relies on DBG_LABEL. Unfortunately this intefers with the quality of optimized code. This patch updates dwarf writer to encode scoping information in DWARF only in FastISel mode. llvm-svn: 68973
* Reapply 68847.Devang Patel2009-04-131-3/+127
| | | | | | Now debug_inlined section is covered by TAI->doesDwarfUsesInlineInfoSection(), which is false by default. llvm-svn: 68964
* Add a new "available_externally" linkage type. This is intendedChris Lattner2009-04-131-0/+3
| | | | | | | | to support C99 inline, GNU extern inline, etc. Related bugzilla's include PR3517, PR3100, & PR2933. Nothing uses this yet, but it appears to work. llvm-svn: 68940
* Revert r68847. It breaks the build on non-Darwin targets, with this messageDan Gohman2009-04-111-124/+3
| | | | | | | from the assembler: Error: unknown pseudo-op: `.debug_inlined' llvm-svn: 68863
* Keep track of inlined functions and their locations. This information is ↵Devang Patel2009-04-111-3/+124
| | | | | | | | collected when nested llvm.dbg.func.start intrinsics are seen. (Right now, inliner removes nested llvm.dbg.func.start intrinisics during inlining.) Create debug_inlined dwarf section using these information. This info is used by gdb, at least on Darwin, to enable better experience debugging inlined functions. See DwarfWriter.cpp for more information on structure of debug_inlined section. llvm-svn: 68847
* Pass in the std::string parameter instead of returning it by value.Bill Wendling2009-04-101-12/+16
| | | | llvm-svn: 68747
* Constify getter methods.Bill Wendling2009-04-101-1/+1
| | | | llvm-svn: 68745
* StringMap<DIE*>::iterator::first() returns a pointer to the first character ofBill Wendling2009-04-091-3/+3
| | | | | | | | the key. This will cause it to create a new std::string, which isn't wanted. Instead, pass back the "const char*". Modify the EmitString() method to take a "const char*". llvm-svn: 68741
* Use a StringMap instead of std::map for storing std::string->DIE* maps. ThisBill Wendling2009-04-091-10/+10
| | | | | | gives a micro speedup in the Dwarf writer. llvm-svn: 68728
* If subprogram type is not tagged as DW_TAG_subroutine_type then use it ↵Devang Patel2009-04-081-2/+3
| | | | | | directly as a return value type. llvm-svn: 68647
* CodeGen still defaults to non-verbose asm, but llc now overrides it and ↵Evan Cheng2009-03-251-4/+4
| | | | | | default to verbose. llvm-svn: 67668
* Do not ignore DW_TAG_class_type!Devang Patel2009-03-251-0/+1
| | | | llvm-svn: 67661
* Oops...I committed too much.Bill Wendling2009-03-131-25/+40
| | | | llvm-svn: 66867
* Temporarily XFAIL this test.Bill Wendling2009-03-131-40/+25
| | | | llvm-svn: 66866
* Put the assignment back at the top of this method.Bill Wendling2009-03-111-2/+2
| | | | llvm-svn: 66611
* Make ivars private. Other cleanup. No functionality change.Bill Wendling2009-03-101-59/+27
| | | | llvm-svn: 66607
* Just make the Dwarf timer group static inside of the getter function. No ↵Bill Wendling2009-03-101-7/+5
| | | | | | need to alloc/dealloc. llvm-svn: 66591
* Don't put static functions in anonymous namespace.Bill Wendling2009-03-101-4/+0
| | | | llvm-svn: 66589
* These should *stop* the timer, not start it again.Bill Wendling2009-03-101-2/+2
| | | | llvm-svn: 66586
* - Fix misspelled method name.Bill Wendling2009-03-101-11/+5
| | | | | | - Remove unused method. llvm-svn: 66585
* - Create GetOrCreateSourceID from getOrCreateSourceID. GetOrCreateSourceID isBill Wendling2009-03-101-79/+82
| | | | | | | | | | | the untimed version of getOrCreateSourceID. getOrCreateSourceID calls GetOrCreateSourceID, of course. - Move some methods into the "private" section. Constify at least one method. - General clean-ups. llvm-svn: 66582
* Refine the Dwarf writer timers so that they measure exception writing and debugBill Wendling2009-03-101-143/+169
| | | | | | writing individually. llvm-svn: 66577
* Add a timer to the DwarfWriter pass that measures the total time it takes toBill Wendling2009-03-101-8/+110
| | | | | | emit exception and debug Dwarf info. llvm-svn: 66571
* Pass in a std::string when getting the names of debugging things. This cuts downBill Wendling2009-03-091-20/+37
| | | | | | on the number of times a std::string is created and copied. llvm-svn: 66396
* Introduce new linkage types linkonce_odr, weak_odr, common_odrDuncan Sands2009-03-071-7/+10
| | | | | | | | | | | | | | | | | | | | | and extern_weak_odr. These are the same as the non-odr versions, except that they indicate that the global will only be overridden by an *equivalent* global. In C, a function with weak linkage can be overridden by a function which behaves completely differently. This means that IP passes have to skip weak functions, since any deductions made from the function definition might be wrong, since the definition could be replaced by something completely different at link time. This is not allowed in C++, thanks to the ODR (One-Definition-Rule): if a function is replaced by another at link-time, then the new function must be the same as the original function. If a language knows that a function or other global can only be overridden by an equivalent global, it can give it the weak_odr linkage type, and the optimizers will understand that it is alright to make deductions based on the function body. The code generators on the other hand map weak and weak_odr linkage to the same thing. llvm-svn: 66339
* It is possible that subprgoram definition is only encoding return value ↵Devang Patel2009-02-271-2/+6
| | | | | | directly, instsad of an DIArray of all argument types. llvm-svn: 65643
* Print variable's display name in dwarf DIE.Devang Patel2009-02-251-1/+1
| | | | llvm-svn: 65468
* Clean up dwarf writer, part 1. This eliminated the horrible recursive ↵Evan Cheng2009-02-251-316/+395
| | | | | | | | getGlobalVariablesUsing and replaced it something readable. It eliminated use of slow UniqueVector and replaced it with StringMap, SmallVector, and DenseMap, etc. It also fixed some non-deterministic behavior. This is a very minor compile time win. llvm-svn: 65438
* gdb uses DW_AT_prototyped to identify K&R style in C based languages.Devang Patel2009-02-241-0/+5
| | | | | | This fixes objc.dg/dwarf-prototypes.m scan-assembler DW_AT_prototyped from llvmgcc42 test suite. llvm-svn: 65357
* If there is not any debug info available for any global variables and any ↵Devang Patel2009-02-241-13/+26
| | | | | | subprograms then there is not any debug info to emit. llvm-svn: 65352
* - Early exit a nested block.Bill Wendling2009-02-201-23/+27
| | | | | | | - Correct comment. - Whitespace changes. llvm-svn: 65149
* Add an accessor method to DwarfWriter to tell of debugging info should be ↵Bill Wendling2009-02-201-5/+11
| | | | | | emitted. llvm-svn: 65092
* The subprogram die may not exist while creating "default" scope.Devang Patel2009-02-181-1/+4
| | | | llvm-svn: 64920
* The debugger sometimes lookup dynamically in the runtime to find ivar info ↵Devang Patel2009-02-171-0/+6
| | | | | | | | of any Objective-C classes. It would be very helpful to debugger if the compiler encodes runtime version number in DWARF. Add support for two additional DWARF attributes to encode Objective-C runtime version number. llvm-svn: 64834
* Emit debug info for bitfields.Devang Patel2009-02-171-1/+18
| | | | llvm-svn: 64815
* Validate file id.Devang Patel2009-02-101-0/+3
| | | | llvm-svn: 64204
* More whitespace fixin'.Bill Wendling2009-02-031-37/+36
| | | | llvm-svn: 63663
* Whitespace and comment changes. No functionality change.Bill Wendling2009-02-031-25/+11
| | | | llvm-svn: 63660
* Do not add redundant arguments in a method definition DIE.Devang Patel2009-02-021-11/+18
| | | | llvm-svn: 63527
* Each input file is encoded as a separate compile unit in LLVM debuggingDevang Patel2009-01-301-34/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | information output. However, many target specific tool chains prefer to encode only one compile unit in an object file. In this situation, the LLVM code generator will include debugging information entities in the compile unit that is marked as main compile unit. The code generator accepts maximum one main compile unit per module. If a module does not contain any main compile unit then the code generator will emit multiple compile units in the output object file. [Part 1] Update DebugInfo APIs to accept optional boolean value while creating DICompileUnit to mark the unit as "main" unit. By defaults all units are considered non-main. Update SourceLevelDebugging.html to document "main" compile unit. Update DebugInfo APIs to not accept and encode separate source file/directory entries while creating various llvm.dbg.* entities. There was a recent, yet to be documented, change to include this additional information so no documentation changes are required here. Update DwarfDebug to handle "main" compile unit. If "main" compile unit is seen then all DIEs are inserted into "main" compile unit. All other compile units are used to find source location for llvm.dbg.* values. If there is not any "main" compile unit then create unique compile unit DIEs for each llvm.dbg.compile_unit. [Part 2] Create separate llvm.dbg.compile_unit for each input file. Mark compile unit create for main_input_filename as "main" compile unit. Use appropriate compile unit, based on source location information collected from the tree node, while creating llvm.dbg.* values using DebugInfo APIs. --- This is Part 1. llvm-svn: 63400
* Remove dead code, again.Devang Patel2009-01-301-14/+0
| | | | llvm-svn: 63358
* Remove dead code.Devang Patel2009-01-301-10/+0
| | | | llvm-svn: 63357
OpenPOWER on IntegriCloud