<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 23, 2015 at 1:50 PM, Khilan Gudka <span dir="ltr"><<a href="mailto:Khilan.Gudka@cl.cam.ac.uk" target="_blank">Khilan.Gudka@cl.cam.ac.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Hi all</p>
<p dir="ltr">I appreciate the feedback and it looks like recording the information using MD nodes may not have been the right choice.</p></blockquote><div>Just to be clear - there's a few different flavors of metadata. One of them is explicitly typed/built in to LLVM (such as the debug info metadata you're seeing), but there's a generic unstructured metadata you can use that doesn't require modifications to LLVM. Though you might still need changes to whatever bitcode linking tool you're using to insert your custom metadata, but it shouldn't be too invasive, I'd imagine? </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<p dir="ltr">I quite like the idea of having the build system dump the library information.</p></blockquote><div>*nod* I'd certainly consider options like this. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<p dir="ltr">Thanks<span class="HOEnZb"><font color="#888888"><br>
Khilan</font></span></p><div class="HOEnZb"><div class="h5">
<div class="gmail_quote">On 23 Mar 2015 20:15, "Duncan P. N. Exon Smith" <<a href="mailto:dexonsmith@apple.com" target="_blank">dexonsmith@apple.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
> On 2015-Mar-23, at 09:52, Eric Christopher <<a href="mailto:echristo@gmail.com" target="_blank">echristo@gmail.com</a>> wrote:<br>
><br>
><br>
><br>
> On Mon, Mar 23, 2015 at 9:50 AM David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>> wrote:<br>
> On Mon, Mar 23, 2015 at 8:15 AM, Khilan Gudka <<a href="mailto:Khilan.Gudka@cl.cam.ac.uk" target="_blank">Khilan.Gudka@cl.cam.ac.uk</a>> wrote:<br>
> Hi David<br>
><br>
> Thanks for your email.<br>
><br>
> What's the benefit/purpose of the MDLLVMModule over just having the MDCompileUnits themselves? I would imagine the user cares about which source file the problem was in (obtained from the MDCompileUnit), not the sequence of BC modules that may've been built into?<br>
><br>
> We envisage it to be useful when an analysis tool built using LLVM needs to know which MDCompileUnits were part of a particular library that has been linked in. For instance, we're currently analysing the sandboxing behaviour within the Chromium web browser, which comprises hundreds of internal libraries and many external ones. To be able to perform this analysis we have to link them all together into a single .bc/.ll file.<br>
><br>
> Having the module structure allows us to model interactions between different modules (without manually (and sometimes unreliably) having to work out which source file corresponds to which library (e.g. libssl, libpci, libpolicy, librenderer, etc)). It also allows an analysis tool to support turning on/off output warnings for particular libraries (as they can lead to a lot of analysis output).<br>
><br>
> Fair enough - I've no idea/opinion on whether that's the right abstraction (other people with more domain knowledge of analysis infrastructure might chime in with some thoughts).<br>
><br>
> Practically speaking: would directory paths be sufficient? The MDCompileUnits already have information about where the source file was.<br>
><br>
><br>
> I agree, this seems very weird. You have very good source location information down to directory/file/line/column for individual instructions in the existing metadata scheme, I'm not sure what this is getting you over that?<br>
><br>
<br>
Seems weird to me too.<br>
<br>
Moreover, this isn't really debug info, and it's not clear that it's<br>
generally useful, so adding first-class support for it via specialized<br>
metadata nodes seems premature.<br>
<br>
> -eric<br>
><br>
><br>
> - David<br>
><br>
><br>
><br>
><br>
> I would be very grateful if someone could review this.<br>
><br>
> Thanks<br>
><br>
> --<br>
> Khilan Gudka<br>
> Research Associate<br>
> Security Group<br>
> Computer Laboratory<br>
> University of Cambridge<br>
> <a href="http://www.cl.cam.ac.uk/~kg365/" target="_blank">http://www.cl.cam.ac.uk/~kg365/</a><br>
><br>
><br>
> _______________________________________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
><br>
><br>
><br>
> _______________________________________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
> _______________________________________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
<br>
</blockquote></div>
</div></div></blockquote></div><br></div></div>