llvm-diff

Hi all,

I'm considering adding debug metadata logic to llvm-diff, but it looks
like some heavy refactoring will be needed to do so. Who's the owner
of it?

There is too much logic in DifferenceEngine, classes being declared in
the cpp file, sub-classes of DifferenceEngine that could be used by
the metadata diff, but with the current style
(FunctionDifferenceEngine(*this)) will be hard to share.

I propose creating more files to split up the logic and use the
appropriate h/cpp split, even if that takes more space. I'm willing to
do some of this as part of my refactoring to get metadata diff, but I
need to know from the owner if that's ok or if he/she has some other
plans for the tool.

I'm considering adding debug metadata logic to llvm-diff, but it looks
like some heavy refactoring will be needed to do so. Who's the owner
of it?

Me.

There is too much logic in DifferenceEngine, classes being declared in
the cpp file, sub-classes of DifferenceEngine that could be used by
the metadata diff, but with the current style
(FunctionDifferenceEngine(*this)) will be hard to share.

I propose creating more files to split up the logic and use the
appropriate h/cpp split, even if that takes more space. I'm willing to
do some of this as part of my refactoring to get metadata diff, but I
need to know from the owner if that's ok or if he/she has some other
plans for the tool.

I have no objections to any of that.

John.

Thanks! Will try something this week...

Btw, I want to use a graph data structure (like Boost's) to put the
metadata in and be able to assert A == B and recurse the graph to make
sure everything is equals in A to B, but avoiding re-reading cycles
(recursive types).

Essentially what I need is a graph with breadcrumbs, is there anything
in LLVM that does that? I've seen some graphs to hold types (the type
resolution Chris was talking about) and other bits, but all of them
are strongly typed (ie. no template parameters to use my own types, or
MDNode*)...

If not, I believe boost is out of the question, so I would do my own,
but would be good to avoid that, if possible.

cheers,
--renato

I don't know of any such structure in LLVM, no.

John.

Thought so... I'll do mi own, then... :wink:

If there's any use besides llvm-diff we can move it in somewhere later...

cheers,
--renato

Hi John,

I believe my refactoring went well. I've changed the source
considerably to spread out the classes a bit so I can re-use the log
builder and consumer. I'll also put the priority queue and the graph I
just did on separate headers (as they are templates).

I ran all tests and they pass, but I'm not sure how much llvm-diff
relies on the check-all tests and how much you have your own tests...
Is there anything else I can test on before sending the patches?

I haven't implemented the metadata diff yet, but would be good to send
the refactoring first, and then the graph and metadata diff. Would
also be good to wait until next week to do so, as 2,9 is forking this
week.

cheers,
--renato

I believe my refactoring went well. I've changed the source
considerably to spread out the classes a bit so I can re-use the log
builder and consumer. I'll also put the priority queue and the graph I
just did on separate headers (as they are templates).

Excellent.

I ran all tests and they pass, but I'm not sure how much llvm-diff
relies on the check-all tests and how much you have your own tests...
Is there anything else I can test on before sending the patches?

I'm sad to say that there isn't any formalized testing yet at all; I just use
it and see whether it still works.

I haven't implemented the metadata diff yet, but would be good to send
the refactoring first, and then the graph and metadata diff. Would
also be good to wait until next week to do so, as 2,9 is forking this
week.

2.9 has forked, feel free to send it.

John.

Ok, I'll send you first, then if all is well, commit.

Would be good to have some tests, though... :wink:

cheers,
--renato