Implement the fprintf optimization which converts calls like this:
authorReid Spencer <rspencer@reidspencer.com>
Mon, 2 May 2005 23:59:26 +0000 (23:59 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Mon, 2 May 2005 23:59:26 +0000 (23:59 +0000)
commita1b43909389a06186394cb895ad18a7d25ea050f
tree21135b67d47638f0c5619297474452ac505e9337
parent6302abe69f2a741206c7b461776977fc7d4bf822
Implement the fprintf optimization which converts calls like this:
  fprintf(F,"hello") -> fwrite("hello",strlen("hello"),1,F)
  fprintf(F,"%s","hello") -> fwrite("hello",strlen("hello"),1,F)
  fprintf(F,"%c",'x') -> fputc('c',F)

This optimization fires severals times in llvm-test:

313 MultiSource/Applications/Burg
302 MultiSource/Benchmarks/Prolangs-C/TimberWolfMC
189 MultiSource/Benchmarks/Prolangs-C/mybison
175 MultiSource/Benchmarks/Prolangs-C/football
130 MultiSource/Benchmarks/Prolangs-C/unix-tbl

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