summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DIEHash.cpp
Commit message (Collapse)AuthorAgeFilesLines
* DIEEntry: Refer to the specified DIE via reference rather than pointer.David Blaikie2014-04-251-1/+1
| | | | | | | Makes some more cases (the unit tests, specifically), lexically compatible with a change to unique_ptr. llvm-svn: 207261
* [Modules] Remove potential ODR violations by sinking the DEBUG_TYPEChandler Carruth2014-04-221-2/+2
| | | | | | | | | | | | define below all header includes in the lib/CodeGen/... tree. While the current modules implementation doesn't check for this kind of ODR violation yet, it is likely to grow support for it in the future. It also removes one layer of macro pollution across all the included headers. Other sub-trees will follow. llvm-svn: 206837
* Use std::unique_ptr for DIE childrenDavid Blaikie2014-04-141-7/+5
| | | | | | | | | Got bored, removed some manual memory management. Pushed references (rather than pointers) through a few APIs rather than replacing *x with x.get(). llvm-svn: 206222
* DebugInfo: Introduce DebugLocList to encapsulate a list of DebugLocEntries ↵David Blaikie2014-04-021-2/+3
| | | | | | | | | | | | and an MC Label to refer to them This removes the magic-number-esque code creating/retrieving the same label for a debug_loc entry from two places and removes the last small piece of reusable logic from emitDebugLoc so that there will be less duplication when refactoring it into two functions (one for debug_loc, the other for debug_loc.dwo). llvm-svn: 205382
* DebugInfo: Simplify debug loc list handling by keeping separate listsDavid Blaikie2014-03-241-15/+3
| | | | | | | Rather than using a flat list with "empty" entries (ala the actual on-disk format), keep separate lists for each variable. llvm-svn: 204680
* DwarfDebug: Simplify debug_loc mergingDavid Blaikie2014-03-241-2/+0
| | | | | | | | | | No functional change intended. Merging up-front rather than delaying this task until later. This just seems simpler and more efficient (avoiding growing the debug loc list only to have to skip over those post-merged entries, etc). llvm-svn: 204679
* Shorten DotDebugLocEntry to just DebugLocEntry and reformat.Eric Christopher2014-03-181-3/+3
| | | | | | No functional change. llvm-svn: 204102
* Add support for hashing location information for CU level hashes.Eric Christopher2014-03-081-3/+31
| | | | | | | Add a testcase based on sret.cpp where we can now hash the entire compile unit. llvm-svn: 203319
* Move DIEEntry handling inside the main switch statement.Eric Christopher2014-03-061-10/+6
| | | | | | No functional change. llvm-svn: 203142
* Add some helpful comments on DIEValue types that we expect to hash.Eric Christopher2014-03-061-1/+4
| | | | llvm-svn: 203055
* Rewrite the attribute hashing algorithm to use the type of the valueEric Christopher2014-03-061-32/+36
| | | | | | | | pointed to by the attribute, rather than the form as a first step to determining how to hash the values. No functional change intended. llvm-svn: 203044
* Add support for hashing attributes with DW_FORM_block. This requiredEric Christopher2014-02-201-0/+26
| | | | | | | | | | | | | passing down an AsmPrinter instance so we could compute the size of the block which could be target specific. All of the test cases in the unittest don't have any target specific data so we can use a NULL AsmPrinter there. This also depends upon block data being added as integers. We can now hash the entire fission-cu.ll compile unit so turn the flag on there with the hash value. llvm-svn: 201752
* Format.Eric Christopher2014-02-201-50/+50
| | | | llvm-svn: 201750
* Add support for hashing DW_FORM_sdata and a small testcase.Eric Christopher2014-02-201-0/+1
| | | | llvm-svn: 201747
* Add support for DW_FORM_flag and DW_FORM_flag_present to the DIE hashingEric Christopher2014-01-311-10/+19
| | | | | | | | algorithm. Sink the 'A' + Attribute hash into each form so we don't have to check valid forms before deciding whether or not we're going to hash which will let the default be to return without doing anything. llvm-svn: 200571
* Re-sort all of the includes with ./utils/sort_includes.py so thatChandler Carruth2014-01-071-1/+0
| | | | | | | | | | subsequent changes are easier to review. About to fix some layering issues, and wanted to separate out the necessary churn. Also comment and sink the include of "Windows.h" in three .inc files to match the usage in Memory.inc. llvm-svn: 198685
* Remove unnecessary/commented-out header inclusion.David Blaikie2013-12-021-1/+0
| | | | | | Review feedback from Eric Christopher on r196140 llvm-svn: 196160
* DebugInfo: Rename DwarfCompileUnit.* to DwarfUnit.* to match their contents.David Blaikie2013-12-021-1/+1
| | | | llvm-svn: 196140
* DebugInfo: Partial implementation of DWARF type units.David Blaikie2013-11-191-1/+3
| | | | | | | | | | | | | | Emit DW_TAG_type_units into the debug_info section using compile unit headers. This is bogus/unusable by debuggers, but testable and provides more isolated review. Subsequent patches will include support for type unit headers and emission into the debug_types section, as well as comdat grouping the types based on their hash. Also the CompileUnit type will be renamed 'Unit' and relevant portions pulled out into respective CompileUnit and TypeUnit types. llvm-svn: 195166
* DIEHash: Move header include to be first in the implementation file to flush ↵David Blaikie2013-11-131-1/+2
| | | | | | out header inclusion ordering issues llvm-svn: 194588
* DIEHash: Summary hashing of member functionsDavid Blaikie2013-10-251-1/+1
| | | | llvm-svn: 193432
* DIEHash: Summary hashing of nested typesDavid Blaikie2013-10-251-1/+24
| | | | llvm-svn: 193427
* DIEHash: Const correct and use references where non-null/non-rebound.David Blaikie2013-10-241-36/+36
| | | | llvm-svn: 193363
* DIEHash: Do not use shallow type hashing for unnamed typesDavid Blaikie2013-10-241-4/+6
| | | | llvm-svn: 193361
* DIEHash: Refactor ref attribute hashing into smaller functionsDavid Blaikie2013-10-241-68/+84
| | | | llvm-svn: 193360
* DIEHashing: Provide an assert for unreachable functionality regarding friends.David Blaikie2013-10-221-0/+3
| | | | | | | | | | | | | Since (as of r190716) Clang no longer emits debug info for C++ friend declarations (and it seems GCC never has/does, which was the motivation for the Clang change), there's no actual reachable case for implementing the part of DWARF 4, Section 7.27 part 5 that pertains to friends. Leave an assert here so that if/when we do have a client producing friends and using type units, we can fill in the gap and add appropriate (unit and feature) tests. llvm-svn: 193193
* DWARF type hashing: pointers to membersDavid Blaikie2013-10-221-11/+14
| | | | | | | | | Includes a test case/FIXME demonstrating a bug/limitation in pointer to member hashing. To be honest I'm not sure why we don't just always use summary hashing for referenced types... but perhaps I'm missing something. llvm-svn: 193175
* DWARF Type Hashing: Include reference and rvalue reference type in the ↵David Blaikie2013-10-211-1/+3
| | | | | | | | declarable summary hashing path More support for 7.25 Part 5. llvm-svn: 193129
* DWARF type hashing: begin implementing Step 5, summary hashing in declarable ↵David Blaikie2013-10-211-5/+37
| | | | | | | | | contexts There are several other tag types that need similar handling but to ensure test coverage they'll be coming incrementally. llvm-svn: 193126
* DWARF type hashing: Handle multiple (including recursive) references to the ↵David Blaikie2013-10-211-8/+19
| | | | | | | | | | same type This uses a map, keeping the type DIE numbering separate from the DIEs themselves - alternatively we could do things the way GCC does if we want to add an integer to the DIE type to record the numbering there. llvm-svn: 193105
* DebugInfo: Hash DW_FORM_GNU_str_index as a string.David Blaikie2013-10-211-1/+3
| | | | | | | | | | Found while adding type safety to the various DWARF enumerations (form, attribute, tag, etc) that caused Clang to warn on an incompletely covered switch. Converting the comment to a default/unreachable uncovered this case of an unsupported form encoding. Seems we were skipping fission strings entirely. llvm-svn: 193089
* DIEHash: Add more things (and remove one character) from the COLLECT_ATTR macroDavid Blaikie2013-10-171-149/+53
| | | | | | | Makes the uses more terse and requires that they use a semicolon at the end that helps editors indent proceeding lines correctly. llvm-svn: 192925
* DIEHash: Support for simple (non-recursive, non-reused) type referencesDavid Blaikie2013-10-171-6/+31
| | | | llvm-svn: 192924
* DIEHash: Include the type's context in the type hash.David Blaikie2013-10-171-0/+3
| | | | llvm-svn: 192856
* DIEHash: Use DW_FORM_sdata for integers, per spec.David Blaikie2013-10-161-5/+25
| | | | | | | This allows us to produce the same hash as GCC for at least some simple examples. llvm-svn: 192855
* Remove ambiguity introduced in r192836David Blaikie2013-10-161-1/+1
| | | | llvm-svn: 192840
* DIEHash: Include the trailing zero byte after the children of a DIEDavid Blaikie2013-10-161-0/+3
| | | | llvm-svn: 192836
* Simplify zero initialization of DIEAttrs variable.David Blaikie2013-10-161-2/+1
| | | | llvm-svn: 192755
* Add a hashing routine that handles hashing types. Add a test forEric Christopher2013-09-031-0/+20
| | | | | | hashing the contents of DW_FORM_data1 on top of a type with attributes. llvm-svn: 189862
* Add the rest of the stock attributes to the attribute table.Eric Christopher2013-09-031-5/+191
| | | | | | | | This won't affect the kinds of hashes we test for as we actually do hashing based on form and attribute. Change the fission-hash testcase one last time to handle DW_AT_comp_dir. llvm-svn: 189840
* Add a TODO here.Eric Christopher2013-08-281-0/+1
| | | | llvm-svn: 189428
* Add support for DW_FORM_dataN and DW_FORM_udata to the DIE hashingEric Christopher2013-08-281-0/+11
| | | | | | | algorithm. Update the split dwarf hashing testcase accordingly - this should be the last time that the hash of an empty file changes. llvm-svn: 189427
* DebugInfo: Prefer references over pointers, pass by const reference for a ↵David Blaikie2013-08-141-5/+5
| | | | | | type that will grow in the future llvm-svn: 188422
* Pass DIEHash::collectAttributes output argument by-pointer instead of by-value.Evgeniy Stepanov2013-08-131-4/+4
| | | | | | Before this, collectAttributes() was operating on a local object. llvm-svn: 188254
* Add the start of DIE hashing for DWARF4 type units and split dwarfEric Christopher2013-08-131-0/+104
| | | | | | | | | | CUs. Currently only hashes the name of CUs and the names of any children, but it's an obvious first step to show the framework. The testcase should continue to be correct, however, as it's an empty TU. llvm-svn: 188243
* Reflow comment.Eric Christopher2013-08-121-2/+2
| | | | llvm-svn: 188233
* Move hash computation code into a separate class and file.Eric Christopher2013-08-081-0/+136
No functional change intended. llvm-svn: 188028
OpenPOWER on IntegriCloud