<div dir="ltr">Can we strengthen globalopt to symbolically execute at most one direct call to any given function, or is that crazy talk?</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Apr 30, 2014 at 4:48 PM, Nico Weber <span dir="ltr"><<a href="mailto:thakis@chromium.org" target="_blank">thakis@chromium.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I'd like to fix PR19590, which is about llvm.global_ctors containing<br>
functions that end up being empty after optimization (which causes the<br>
linker to add useless init_array entries to the output binary).<br>
globalopt removes empty functions from llvm.global_ctors, but by the<br>
time the function becomes empty globalopt has already run and it<br>
doesn't run again.<br>
<br>
I'm wondering what the best fix is:<br>
1. Should globalopt run once more after all other passes have run?<br>
2. Or should the llvm.global_ctors optimization code in globalopt be<br>
moved into a helper function somewhere that's called from both<br>
globalopt and a new optimization pass cdtoropt that does nothing but<br>
remove empty functions from llvm.global_ctors and llvm.global_dtors?<br>
Then only this new pass would be added after all other passes. (This<br>
new pass should run very quickly, it doesn't have to do much.)<br>
<br>
Thanks for any advice,<br>
Nico<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">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>
</blockquote></div><br></div>