On 24 September 2012 15:00, Eli Friedman <span dir="ltr"><<a href="mailto:eli.friedman@gmail.com" target="_blank">eli.friedman@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="HOEnZb"><div class="h5">On Mon, Sep 24, 2012 at 2:44 PM, Nick Lewycky <<a href="mailto:nlewycky@google.com">nlewycky@google.com</a>> wrote:<br>
> This patch extends dead store elimination to treat<br>
> strcpy/strncpy/strcat/strncat as stores that can be removed. There are some<br>
> more functions we could do this for, such as<br>
> sprintf/snprintf/vsprintf/vsnprintf, but TargetLibraryInfo doesn't have<br>
> entries for those yet.<br>
><br>
> The test uses -basicaa to get the target library info, but I don't specify a<br>
> triple because at the moment there are no targets which disable strcpy and<br>
> friends. Ideas for future-proofing this would be appreciated.<br>
<br>
</div></div>Can you extract the change to add "TLI = AA->getTargetLibraryInfo();"<br>
etc. out into a separate patch?  That would make it a bit easier to<br>
review.<br>
<br>
The concept seems fine; I didn't look too closely at the details.<br></blockquote><div><br></div><div>Thanks. I've gone ahead and submitted it in two patches, with the business end in the second patch, since I'm more confident it's correct than I was earlier. I'd appreciate post-commit review on the patch!</div>

<div><br></div><div>Nick</div><div><br></div></div>