1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00
Commit Graph

33 Commits

Author SHA1 Message Date
Chandler Carruth
0b619fcc8e [cleanup] Re-sort all the #include lines in LLVM using
utils/sort_includes.py.

I clearly haven't done this in a while, so more changed than usual. This
even uncovered a missing include from the InstrProf library that I've
added. No functionality changed here, just mechanical cleanup of the
include order.

llvm-svn: 225974
2015-01-14 11:23:27 +00:00
Frederic Riss
f061ced9dc Make DIE.h a public CodeGen header.
dsymutil would like to use all the AsmPrinter/MCStreamer infrastructure
to stream out the DWARF. In order to do so, it will reuse the DIE object
and so this header needs to be public.

The interface exposed here has some corners that cannot be used without a
DwarfDebug object, but clients that want to stream Dwarf can just avoid
these.

Differential Revision: http://reviews.llvm.org/D6695

llvm-svn: 225208
2015-01-05 21:29:41 +00:00
David Blaikie
7ce6b4003f DIE: Pass ownership of children via std::unique_ptr rather than raw pointer.
This should reduce the chance of memory leaks like those fixed in
r207240.

There's still some unclear ownership of DIEs happening in DwarfDebug.
Pushing unique_ptr and references through more APIs should help expose
the cases where ownership is a bit fuzzy.

llvm-svn: 207263
2014-04-25 20:00:34 +00:00
David Blaikie
e3e1144d71 DIEEntry: Refer to the specified DIE via reference rather than pointer.
Makes some more cases (the unit tests, specifically), lexically
compatible with a change to unique_ptr.

llvm-svn: 207261
2014-04-25 19:33:43 +00:00
David Blaikie
231f530ae4 PR19554: Fix some memory leaks in DIEHashTest.cpp
llvm-svn: 207240
2014-04-25 17:07:55 +00:00
Eric Christopher
eb6b7bc131 Add support for hashing attributes with DW_FORM_block. This required
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
2014-02-20 02:50:45 +00:00
Eric Christopher
47dee3345a This tests DW_FORM_sdata, not DW_FORM_block. Make the test say so.
llvm-svn: 201749
2014-02-20 01:27:51 +00:00
Eric Christopher
bd2823d90b Fix commit thinkos from splitting out patches.
llvm-svn: 201748
2014-02-20 00:59:17 +00:00
Eric Christopher
043a17a7b0 Add support for hashing DW_FORM_sdata and a small testcase.
llvm-svn: 201747
2014-02-20 00:54:40 +00:00
Eric Christopher
45a3ce6871 Format.
llvm-svn: 201746
2014-02-20 00:54:38 +00:00
Eric Christopher
861178d373 Add support for DW_FORM_flag and DW_FORM_flag_present to the DIE hashing
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
2014-01-31 20:02:58 +00:00
Eric Christopher
0a4943267a Fix name of nested type in comment to match code.
llvm-svn: 200570
2014-01-31 20:02:55 +00:00
Chandler Carruth
87f14b4eec Re-sort all of the includes with ./utils/sort_includes.py so that
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
2014-01-07 11:48:04 +00:00
NAKAMURA Takumi
955efe24ce [CMake] Update LLVM_LINK_COMPONENTS for each CMakeLists.txt.
llvm-svn: 196908
2013-12-10 11:13:32 +00:00
David Blaikie
e9525a4ff2 DIEHash: Summary hashing of member functions
llvm-svn: 193432
2013-10-25 20:04:25 +00:00
David Blaikie
949cb82c41 DIEHash: Summary hashing of nested types
llvm-svn: 193427
2013-10-25 18:38:43 +00:00
David Blaikie
f56c048e62 DIEHash: Const correct and use references where non-null/non-rebound.
llvm-svn: 193363
2013-10-24 18:29:03 +00:00
David Blaikie
60244215d0 DIEHash: Do not use shallow type hashing for unnamed types
llvm-svn: 193361
2013-10-24 17:53:58 +00:00
David Blaikie
0881f3b413 DWARF type hashing: pointers to members
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
2013-10-22 18:14:41 +00:00
David Blaikie
da979f0e59 DWARF Type Hashing: Include reference and rvalue reference type in the declarable summary hashing path
More support for 7.25 Part 5.

llvm-svn: 193129
2013-10-21 23:06:19 +00:00
David Blaikie
8d41a02789 DWARF type hashing: begin implementing Step 5, summary hashing in declarable contexts
There are several other tag types that need similar handling but to
ensure test coverage they'll be coming incrementally.

llvm-svn: 193126
2013-10-21 22:36:50 +00:00
David Blaikie
c950a5b175 DIEHashTest: Correct the order of operands to the TEST macro
And add the 'Test' suffix so the test case name matches the file name.

llvm-svn: 193119
2013-10-21 20:28:30 +00:00
David Blaikie
0cee42e793 DWARF type hashing: Handle multiple (including recursive) references to the 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
2013-10-21 18:59:40 +00:00
David Blaikie
3f9b6f1dec DIEHash: Support for simple (non-recursive, non-reused) type references
llvm-svn: 192924
2013-10-17 22:07:09 +00:00
David Blaikie
bb2461da8b DIEHash: Include the type's context in the type hash.
llvm-svn: 192856
2013-10-17 00:10:34 +00:00
David Blaikie
9599400c07 DIEHash: Use DW_FORM_sdata for integers, per spec.
This allows us to produce the same hash as GCC for at least some simple
examples.

llvm-svn: 192855
2013-10-16 23:36:20 +00:00
David Blaikie
d991bcf46c Invert arguments to ASSERT_EQ to match gtest diagnostic printing
GTest assumes the left hand side of the assert is the expectation and
the right hand side is the test result. It's easier to read gtest
failures when these things are ordered correctly.

llvm-svn: 192854
2013-10-16 22:43:10 +00:00
David Blaikie
4774eee88b DIEHash: Include the trailing zero byte after the children of a DIE
llvm-svn: 192836
2013-10-16 20:29:06 +00:00
David Blaikie
9006a00f8f Use ASSERT_EQ rather than ASSERT_TRUE for better unit test failures.
Also minor using namespace move so it's not hard-up against the function
definition and outside the namespace as is usual.

llvm-svn: 192744
2013-10-15 23:00:17 +00:00
Benjamin Kramer
a6c9f4b0e0 Plug a memory leak in a unit test. Stack allocation is sufficient here.
llvm-svn: 191638
2013-09-29 11:29:20 +00:00
Eric Christopher
5d3f56aa82 It's a very large constant. Say so.
llvm-svn: 189899
2013-09-04 00:58:10 +00:00
Eric Christopher
b70795bbfd Fix copy and pasto with CMake files for unittest.
llvm-svn: 189863
2013-09-03 22:08:28 +00:00
Eric Christopher
9bd85fb4ef Add a hashing routine that handles hashing types. Add a test for
hashing the contents of DW_FORM_data1 on top of a type with attributes.

llvm-svn: 189862
2013-09-03 21:57:57 +00:00