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. -- cheers, --renato http://systemcall.org/ Reclaim your digital rights, eliminate DRM, learn more at http://www.defectivebydesign.org/what_is_drm
On Feb 28, 2011, at 3:36 AM, Renato Golin wrote:> 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.
On 28 February 2011 18:00, John McCall <rjmccall at apple.com> wrote:> I have no objections to any of that.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
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