<div dir="ltr">On Tue, Feb 5, 2013 at 8:06 AM, Sean Silva <span dir="ltr"><<a href="mailto:silvas@purdue.edu" target="_blank">silvas@purdue.edu</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">> Batch<br>
> [...]<br>
> Repeat this process as long as progress ensues.<br>
<br>
Have you done a ballpark estimate of how much resident memory this<br>
would need for, say LLVM's codebase? Are you planning to do this<br>
entirely in-core? If not, then how are you planning to make this<br>
scale?<br>
<br>
> Interactive<br>
><br>
> Pick as specific function parameter or method and make it const.<br>
> This would involve checking all of the routines that it calls with that parameter, and making changes to fix their interfaces (if necessary).<br>
<br>
This seems pretty ambitious. AFAIK nobody has even written a robust<br>
and useful tool based on Clang that coherently lets you pick a<br>
function and see all the call sites in a codebase (otherwise I would<br>
be using it!). I would recommend starting with just that aspect. My<br></blockquote><div><br></div><div style>That is not entirely true. There might not be an open sourced tool, but there are publicly available ones.</div>
<div style>This is an example from Chromium's code search:</div><div style><a href="https://code.google.com/p/chromium/codesearch#chrome/src/base/memory/ref_counted.h&q=class:scoped_refptr&sq=package:chrome&type=cs&l=254">https://code.google.com/p/chromium/codesearch#chrome/src/base/memory/ref_counted.h&q=class:scoped_refptr&sq=package:chrome&type=cs&l=254</a><br>
</div><div style>You can click for example on the operator T*() const and get a list where this is called throughout the Chromium codebase.</div><div style><br></div><div style>Generally, we've also internally done transformations that are very similar in scale and complexity on our internal ~100MLOC codebase. You can make such things scale by doing MapReduce like algorithms, which first map all possible function calls / parameters as keys with locations, and then basically reduce the graph of const-dependencies. Since I've implemented MapReduce style algorithms with standard unix tools (sort, cat) this also works for smaller problems if you don't have large infrastructure at hand.</div>
<div style><br></div><div style>Cheers,</div><div style>/Manuel</div><div style><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

impression is that the new Modules functionality that dgregor is<br>
working on will go a long way to making this easier, so pragmatically<br>
your time might be best spent helping to move that feature along.<br>
<span class=""><font color="#888888"><br>
-- Sean Silva<br>
</font></span><div class=""><div class="h5">_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
</div></div></blockquote></div><br></div></div>