<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jul 19, 2013 at 1:41 PM, Rafael Espíndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 19 July 2013 15:52, Sean Silva <<a href="mailto:silvas@purdue.edu">silvas@purdue.edu</a>> wrote:<br>

> +@llvm.compiler_used = appending global [1 x void ()*] [void ()* @g],<br>
> section "llvm.metadata"<br>
><br>
> @llvm.compiler.used?<br>
<br>
</div>duh, fixed.<br>
<div class="im"><br>
> +GlobalVariable *<br>
> +llvm::collectUsedGlobalVariables(const Module &M, const char *Name,<br>
> +                                 SmallPtrSet<GlobalValue *, 8> &Set) {<br>
><br>
> (for a future patch). The return value seems kind of arbitrary; it seems to<br>
> be just to save a name lookup in the module. Maybe this function should take<br>
> a GlobalVariable * instead of a name? and leave it to the client to extract<br>
> the GlobalVariable* from the module? You could also then remove the `const<br>
> Module &M` parameter. Also, the function does something pretty specific, so<br>
> maybe it should have a more specific-sounding name.<br>
<br>
</div>Doing the lookup also shares a bit of code for passes that need look<br>
at llvm.used and llvm.compiler.used. Maybe a better change would be to<br>
pass just a boolean instead of the name?<br></blockquote><div><br></div><div>You probably know the right thing to do here better than I do. Mine was just an "peephole" observation.</div><div><br></div><div>-- Sean Silva </div>
</div></div></div>