Move the libcall annotating part from doFinalization to doInitialization.
authorNick Lewycky <nicholas@mxc.ca>
Mon, 5 Jan 2009 00:07:50 +0000 (00:07 +0000)
committerNick Lewycky <nicholas@mxc.ca>
Mon, 5 Jan 2009 00:07:50 +0000 (00:07 +0000)
commit6cd0c048b88b96f90d0dd126995f014527c36a3d
tree3cbac8c493602f7f673ac8c03b2babe00dd8ca67
parent81e21674a6b7328ec6b4ad3841493c2ed23cc35d
Move the libcall annotating part from doFinalization to doInitialization.
Finalization occurs after all the FunctionPasses in the group have run, which
is clearly not what we want.

This also means that we have to make sure that we apply the right param
attributes when creating a new function.

Also, add a missed optimization: strdup and strndup. NoCapture and
NoAlias return!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61658 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/SimplifyLibCalls.cpp