summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Reformat options.Eric Christopher2013-07-231-40/+41
| | | | llvm-svn: 186994
* Add getModuleFlag(StringRef Key) to query a module flag given Key.Manman Ren2013-07-161-11/+4
| | | | | | No functionality change. llvm-svn: 186470
* Add 'const' qualifiers to static const char* variables.Craig Topper2013-07-161-2/+2
| | | | llvm-svn: 186371
* Reapply an improved version of r180816/180817.Adrian Prantl2013-07-091-6/+6
| | | | | | | | | | | | | | | Change the informal convention of DBG_VALUE machine instructions so that we can express a register-indirect address with an offset of 0. The old convention was that a DBG_VALUE is a register-indirect value if the offset (operand 1) is nonzero. The new convention is that a DBG_VALUE is register-indirect if the first operand is a register and the second operand is an immediate. For plain register values the combination reg, reg is used. MachineInstrBuilder::BuildMI knows how to build the new DBG_VALUES. rdar://problem/13658587 llvm-svn: 185966
* Debug Info: clean up usage of Verify.Manman Ren2013-07-081-7/+7
| | | | | | | No functionality change. It should suffice to check the type of a debug info metadata, instead of calling Verify. llvm-svn: 185847
* DebugInfo: Correct comment & re-format a nearby loopDavid Blaikie2013-07-081-5/+3
| | | | llvm-svn: 185844
* DebugInfo: Simplify Address Pool index handling.David Blaikie2013-07-081-5/+3
| | | | | | | | | | Since the pool indexes are necessarily sequential and contiguous, just insert things in the right place rather than having to sort the sequence after the fact. No functionality change. llvm-svn: 185842
* Hoist all of the Entry.getLoc() calls int a single variable.Eric Christopher2013-07-031-7/+8
| | | | llvm-svn: 185589
* Make DotDebugLocEntry a class, reorder the members along with commentsEric Christopher2013-07-031-9/+9
| | | | | | for them and update all uses. llvm-svn: 185588
* Elaborate on comment.Eric Christopher2013-07-031-1/+1
| | | | llvm-svn: 185586
* Introduce some typedefs for DenseMaps containing SmallVectors so the vector ↵Craig Topper2013-07-031-5/+3
| | | | | | size doesn't have to repeated when creating iterators for the DenseMap. llvm-svn: 185508
* Use SmallVectorImpl& instead of SmallVector& to avoid needlessly ↵Craig Topper2013-07-031-6/+6
| | | | | | respecifying the small vector size. llvm-svn: 185505
* Use SmallVectorImpl::iterator/const_iterator instead of SmallVector to avoid ↵Craig Topper2013-07-031-8/+8
| | | | | | specifying the vector size. llvm-svn: 185504
* Avoid doing a lot of computation when we have multiple ranges andEric Christopher2013-07-031-26/+29
| | | | | | | avoid adding information for the debug_inlined section when it isn't going to be emitted anyhow. llvm-svn: 185500
* Move iterator to where it's used and update comments.Eric Christopher2013-07-031-1/+3
| | | | llvm-svn: 185498
* Add a helpful comment.Eric Christopher2013-07-031-0/+2
| | | | llvm-svn: 185492
* Debug Info: use module flag to set up Dwarf version.Manman Ren2013-07-021-5/+23
| | | | | | | | Correctly handles ref_addr depending on the Dwarf version. Emit Dwarf with version from module flag. TODO: turn on/off features depending on the Dwarf version. llvm-svn: 185484
* Fix comment.Eric Christopher2013-07-021-1/+1
| | | | llvm-svn: 185480
* [DebugInfo] Hold generic MCExpr in AddrPoolUlrich Weigand2013-07-021-7/+7
| | | | | | | | | | | This changes the AddrPool infrastructure to enable it to hold generic MCExpr expressions, not just MCSymbolRefExpr. This is in preparation for supporting debug info for TLS variables on PowerPC, where we need to describe the variable location using a more complex expression than just MCSymbolRefExpr. llvm-svn: 185459
* [DebugInfo] Introduce DIEExpr variant of DIEValue to hold MCExpr valuesUlrich Weigand2013-07-021-2/+2
| | | | | | | | | | | | This partially reverts r185202 and restores DIELabel to hold plain MCSymbol references. Instead, we add a new subclass DIEExpr of DIEValue that can hold generic MCExpr references. This is in preparation for supporting debug info for TLS variables on PowerPC, where we need to describe the variable location using a more complex expression than just MCSymbolRefExpr. llvm-svn: 185458
* Remove address spaces from MC.Rafael Espindola2013-07-021-1/+1
| | | | | | | | This is dead code since PIC16 was removed in 2010. The result was an odd mix, where some parts would carefully pass it along and others would assert it was zero (most of the object streamer for example). llvm-svn: 185436
* PR14728: DebugInfo: TLS variables with -gsplit-dwarfDavid Blaikie2013-07-011-6/+11
| | | | llvm-svn: 185398
* DebugInfo: Pass MCSymbolRefExprs for labels instead of MCSymbolsDavid Blaikie2013-06-281-2/+2
| | | | | | | This is a precursor to adding debug info support for TLS which requires non-default relocations applied to TLS symbols. llvm-svn: 185202
* DebugInfo: Revise r185189 to avoid subtle 'unsigned += bool'David Blaikie2013-06-281-1/+2
| | | | llvm-svn: 185190
* DebugInfo: Simplify the AddressPool representationDavid Blaikie2013-06-281-15/+10
| | | | llvm-svn: 185189
* DebugInfo: constify the AddressPool MCSymbol pointersDavid Blaikie2013-06-281-10/+10
| | | | llvm-svn: 185188
* Remove unused code. No functionality change.Manman Ren2013-06-251-4/+0
| | | | llvm-svn: 184866
* 80-column and tab character fixes.Eric Christopher2013-06-241-2/+4
| | | | llvm-svn: 184792
* DebugInfo: don't use location lists when the location covers the whole ↵David Blaikie2013-06-201-4/+2
| | | | | | | | | | | | | function anyway Fix up three tests - one that was relying on abbreviation number, another relying on a location list in this case (& testing raw asm, changed that to use dwarfdump on the debug_info now that that's where the location is), and another which was added in r184368 - exposing a bug in that fix that is exposed when we emit the location inline rather than through a location list. Fix that bug while I'm here. llvm-svn: 184387
* DebugInfo: PR14763/r183329 correct the location of indirect parametersDavid Blaikie2013-06-191-4/+4
| | | | | | | | | | | | | | | | We had been papering over a problem with location info for non-trivial types passed by value by emitting their type as references (this caused the debugger to interpret the location information correctly, but broke the type of the function). r183329 corrected the type information but lead to the debugger interpreting the pointer parameter as the value - the debug info describing the location needed an extra dereference. Use a new flag in DIVariable to add the extra indirection (either by promoting an existing DW_OP_reg (parameter passed in a register) to DW_OP_breg + 0 or by adding DW_OP_deref to an existing DW_OP_breg + n (parameter passed on the stack). llvm-svn: 184368
* Debug Info: Simplify Frame Index handling in DBG_VALUE Machine InstructionsDavid Blaikie2013-06-161-4/+1
| | | | | | | | | | | | | | | | | | | | Rather than using the full power of target-specific addressing modes in DBG_VALUEs with Frame Indicies, simply use Frame Index + Offset. This reduces the complexity of debug info handling down to two representations of values (reg+offset and frame index+offset) rather than three or four. Ideally we could ensure that frame indicies had been eliminated by the time we reached an assembly or dwarf generation, but I haven't spent the time to figure out where the FIs are leaking through into that & whether there's a good place to convert them. Some FI+offset=>reg+offset conversion is done (see PrologEpilogInserter, for example) which is necessary for some SelectionDAG assumptions about registers, I believe, but it might be possible to make this a more thorough conversion & ensure there are no remaining FIs no matter how instruction selection is performed. llvm-svn: 184066
* Fix break in r183446 - helps to increment the iterator in a loopDavid Blaikie2013-06-061-1/+2
| | | | llvm-svn: 183454
* Debug Info: simplify parameter ordering preservationDavid Blaikie2013-06-061-25/+21
| | | | | | | | | | | | | Seems we emit the parameter ordering number (spuriously named 'arg number') in the debug info, so there's no need to search through the variable list to figure out the parameter ordering. This implementation does 'always' do the work, even in non-optimized debug info (the previous implementation checked the existence of the 'variables' list on the subprogram which is only present in optimized builds). No intended functionality change. llvm-svn: 183446
* PR15662: Optimized debug info produces out of order function parametersDavid Blaikie2013-06-051-3/+31
| | | | | | | | | | | | | | | When a function is inlined we lazily construct the variables representing the function's parameters. After that, we add any remaining unused parameters. If the function doesn't use all the parameters, or uses them out of order, then the DWARF would produce them in that order, producing a parameter order that doesn't match the source. This fix causes us to always keep the arg variables at the start of the variable list & in the original order from the source. llvm-svn: 183297
* Move getRealLinkageName to a common place and remove all the duplicates of it.Benjamin Kramer2013-06-011-13/+3
| | | | | | Also simplify code a bit while there. No functionality change. llvm-svn: 183076
* Rename variable to be more descriptive.Eric Christopher2013-05-301-3/+3
| | | | llvm-svn: 182903
* LTO+Debug Info: revert r182791.Manman Ren2013-05-291-38/+11
| | | | | | | | | | | | Since the testing case uses ref_addr, which requires version 3+ to work, we will solve the dwarf version issue first. This patch also causes failures in one of the bots. I will update the patch accordingly in my next attempt. rdar://13926659 llvm-svn: 182867
* LTO+Debug Info: correctly emit inlined_subroutine when the inlined callee isManman Ren2013-05-281-11/+38
| | | | | | | | | | | | from a different CU. We used to print out an error message and fail to generate inlined_subroutine. If we use ref_addr in the generated DWARF, the DWARF version should be 3 or above. rdar://13926659 llvm-svn: 182791
* Dwarf: use a single line table to generate assembly when .loc is used.Manman Ren2013-05-211-3/+14
| | | | | | | | | This is to fix PR15408 where an undefined symbol Lline_table_start1 is used. Since we do not generate the debug_line section when .loc is used, Lline_table_start1 is not emitted and we can't refer to it when calculating at_stmt_list for a compile unit. llvm-svn: 182344
* PR14606: Debug Info for namespace aliases/DW_TAG_imported_moduleDavid Blaikie2013-05-201-0/+3
| | | | | | | | | This resolves the last of the PR14606 failures in the GDB 7.5 test suite by implementing an optional name field for DW_TAG_imported_modules/DIImportedEntities and using that to implement C++ namespace aliases (eg: "namespace X = Y;"). llvm-svn: 182328
* StringRefize some debug accel table bits.Benjamin Kramer2013-05-111-5/+5
| | | | llvm-svn: 181663
* Remove more dead code.Rafael Espindola2013-05-111-3/+0
| | | | llvm-svn: 181656
* Debug Info: Support DW_TAG_imported_declarationDavid Blaikie2013-05-081-1/+3
| | | | | | | | | | | | | | This provides basic functionality for imported declarations. For subprograms and types some amount of lazy construction is supported (so the definition of a function can proceed the using declaration), but it still doesn't handle declared-but-not-defined functions (since we don't generally emit function declarations). Variable support is really rudimentary at the moment - simply looking up the existing definition with no support for out of order (declaration, imported_module, then definition). llvm-svn: 181392
* Finish renaming constructImportedModuleDIE to constructImportedEntityDIEDavid Blaikie2013-05-081-5/+5
| | | | llvm-svn: 181391
* Pass the MDNode in and do the insertion at compile unit creation timeEric Christopher2013-05-081-3/+2
| | | | | | instead of relying upon an extra call to finish initializing. llvm-svn: 181383
* Rename DIImportedModule to DIImportedEntity and allow imported declarationsDavid Blaikie2013-05-071-13/+20
| | | | | | | | | DIBuilder::createImportedDeclaration isn't fully plumbed through (note, lacking in AsmPrinter/DwarfDebug support) but this seemed like a sufficiently useful division of code to make the subsequent patch(es) easier to follow. llvm-svn: 181364
* Debug Info: Fix for break due to r181271David Blaikie2013-05-071-0/+1
| | | | | | | | | Apparently we didn't keep an association of Compile Unit metadata nodes to DIEs so looking up that parental context failed & thus caused no DW_TAG_imported_modules to be emitted at the CU scope. Fix this by adding the mapping & sure up the test case to verify this. llvm-svn: 181339
* Fix the VS2010 build broken by r181271Timur Iskhodzhanov2013-05-071-1/+2
| | | | llvm-svn: 181296
* DebugInfo: Support imported modules in lexical blocksDavid Blaikie2013-05-061-3/+39
| | | | llvm-svn: 181271
* Temporarily revert "Change the informal convention of DBG_VALUE so that we ↵Adrian Prantl2013-04-301-6/+6
| | | | | | | | | | can express a" because it breaks some buildbots. This reverts commit 180816. llvm-svn: 180819
OpenPOWER on IntegriCloud