[llvm-commits] patch: DSE for str[n]{cat,cpy}

Nick Lewycky nlewycky at google.com
Mon Sep 24 14:44:32 PDT 2012


This patch extends dead store elimination to treat
strcpy/strncpy/strcat/strncat as stores that can be removed. There are some
more functions we could do this for, such as
sprintf/snprintf/vsprintf/vsnprintf, but TargetLibraryInfo doesn't have
entries for those yet.

The test uses -basicaa to get the target library info, but I don't specify
a triple because at the moment there are no targets which disable strcpy
and friends. Ideas for future-proofing this would be appreciated.

Please review!

Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120924/763b55be/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dse-libcalls-1.patch
Type: application/octet-stream
Size: 11033 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120924/763b55be/attachment.obj>


More information about the llvm-commits mailing list