* Correct the function prototypes for some of the functions to match the
authorReid Spencer <rspencer@reidspencer.com>
Wed, 4 May 2005 03:20:21 +0000 (03:20 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Wed, 4 May 2005 03:20:21 +0000 (03:20 +0000)
commit58b563ce4351996dd403646231fed40794a0aa4c
tree562e1a29c33087ebece2d78e78222420c5e5a8cb
parent0b861485ec857c5c7113dad0c28480a2c7a16184
* Correct the function prototypes for some of the functions to match the
  actual spec (int -> uint)
* Add the ability to get/cache the strlen function prototype.
* Make sure generated values are appropriately named for debugging purposes
* Add the SPrintFOptimiation for 4 casts of sprintf optimization:
    sprintf(str,cstr) -> llvm.memcpy(str,cstr) (if cstr has no %)
    sprintf(str,"")   -> store sbyte 0, str
    sprintf(str,"%s",src) -> llvm.memcpy(str,src) (if src is constant)
    sprintf(str,"%c",chr) -> store chr, str   ; store sbyte 0, str+1

The sprintf optimization didn't fire as much as I had hoped:

  2 MultiSource/Applications/SPASS
  5 MultiSource/Benchmarks/McCat/18-imp
 22 MultiSource/Benchmarks/Prolangs-C/TimberWolfMC
  1 MultiSource/Benchmarks/Prolangs-C/assembler
  6 MultiSource/Benchmarks/Prolangs-C/unix-smail
  2 MultiSource/Benchmarks/mediabench/mpeg2/mpeg2dec

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