summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Oops...I committed too much.Bill Wendling2009-03-131-30/+28
| | | | llvm-svn: 66867
* Temporarily XFAIL this test.Bill Wendling2009-03-131-28/+30
| | | | llvm-svn: 66866
* Update the list of function annotations for nocapture. All of these came upNick Lewycky2009-02-151-47/+186
| | | | | | | | | | | when I was looking at functions used by python. Highlights include, better largefile support (64-bit file sizes on 32-bit systems), fputs string is nocapture, popen/pclose added (popen being noalias return), modf and frexp and friends. Also added some missing 'break' statements and combined identical sections. llvm-svn: 64615
* Mark strto* as readonly when the endptr is null.Nick Lewycky2009-02-131-1/+3
| | | | llvm-svn: 64460
* On strtod and friends, mark 'endptr' nocapture in the function prototype, andNick Lewycky2009-02-131-3/+37
| | | | | | mark the first argument nocapture if endptr=NULL for each particular call. llvm-svn: 64453
* Don't mark all args to strtod and friends as nocapture.Nick Lewycky2009-02-121-7/+0
| | | | llvm-svn: 64352
* Fix copy and pasted typos that prevented strtok_r, realloc, getenv, ungetc,Nick Lewycky2009-01-181-22/+152
| | | | | | | | | | | | | | | | | | | putc, puts, perror, vscanf and vsscanf from getting annotations. Add annotations for eight printf functions, memalign, pread and pwrite. On Linux, llvm-gcc sometimes renames strdup, getc, putc, strtok_r, scanf and sscanf. Match the alternate function names. Fix a crash annotating opendir. Don't mark fsetpos's second parameter as nocapture. It's supposed to be captured. Do mark fopen's path and mode strings as nocapture. Mark ferror as readonly, but not fileno which may set errno. llvm-svn: 62456
* Move the libcall annotating part from doFinalization to doInitialization.Nick Lewycky2009-01-051-18/+77
| | | | | | | | | | | | | 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! llvm-svn: 61658
* Run a post-pass that marks known function declarations by name.Nick Lewycky2009-01-041-0/+443
| | | | llvm-svn: 61632
* Turn strcmp into memcmp, such as strcmp(P, "x") --> memcmp(P, "x", 2).Nick Lewycky2008-12-211-2/+30
| | | | llvm-svn: 61297
* Optimize memmove and memset into the LLVM builtins. Note that these Eli Friedman2008-11-301-4/+57
| | | | | | only show up in code from front-ends besides llvm-gcc, like clang. llvm-svn: 60287
* reapply Sanjiv's patch to genericize memcpy/memset/memmove to take anChris Lattner2008-11-211-3/+4
| | | | | | arbitrary integer width for the count. llvm-svn: 59823
* Revert r59802. It was breaking the build of llvm-gcc:Bill Wendling2008-11-211-4/+3
| | | | | | | | | | | | | | | | | | | | | g++ -m32 -c -g -DIN_GCC -W -Wall -Wwrite-strings -Wmissing-format-attribute -fno-common -mdynamic-no-pic -DHAVE_CONFIG_H -Wno-unused -DTARGET_NAME=\"i386-apple-darwin9.5.0\" -I. -I. -I../../llvm-gcc.src/gcc -I../../llvm-gcc.src/gcc/. -I../../llvm-gcc.src/gcc/../include -I./../intl -I../../llvm-gcc.src/gcc/../libcpp/include -I../../llvm-gcc.src/gcc/../libdecnumber -I../libdecnumber -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.obj/include -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/include -DENABLE_LLVM -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.obj/../llvm.src/include -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -I. -I. -I../../llvm-gcc.src/gcc -I../../llvm-gcc.src/gcc/. -I../../llvm-gcc.src/gcc/../include -I./../intl -I../../llvm-gcc.src/gcc/../libcpp/include -I../../llvm-gcc.src/gcc/../libdecnumber -I../libdecnumber -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.obj/include -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/include ../../llvm-gcc.src/gcc/llvm-types.cpp -o llvm-types.o ../../llvm-gcc.src/gcc/llvm-convert.cpp: In member function 'void TreeToLLVM::EmitMemCpy(llvm::Value*, llvm::Value*, llvm::Value*, unsigned int)': ../../llvm-gcc.src/gcc/llvm-convert.cpp:1496: error: 'memcpy_i32' is not a member of 'llvm::Intrinsic' ../../llvm-gcc.src/gcc/llvm-convert.cpp:1496: error: 'memcpy_i64' is not a member of 'llvm::Intrinsic' ../../llvm-gcc.src/gcc/llvm-convert.cpp: In member function 'void TreeToLLVM::EmitMemMove(llvm::Value*, llvm::Value*, llvm::Value*, unsigned int)': ../../llvm-gcc.src/gcc/llvm-convert.cpp:1512: error: 'memmove_i32' is not a member of 'llvm::Intrinsic' ../../llvm-gcc.src/gcc/llvm-convert.cpp:1512: error: 'memmove_i64' is not a member of 'llvm::Intrinsic' ../../llvm-gcc.src/gcc/llvm-convert.cpp: In member function 'void TreeToLLVM::EmitMemSet(llvm::Value*, llvm::Value*, llvm::Value*, unsigned int)': ../../llvm-gcc.src/gcc/llvm-convert.cpp:1528: error: 'memset_i32' is not a member of 'llvm::Intrinsic' ../../llvm-gcc.src/gcc/llvm-convert.cpp:1528: error: 'memset_i64' is not a member of 'llvm::Intrinsic' make[3]: *** [llvm-convert.o] Error 1 make[3]: *** Waiting for unfinished jobs.... rm fsf-funding.pod gcov.pod gfdl.pod cpp.pod gpl.pod gcc.pod make[2]: *** [all-stage1-gcc] Error 2 make[1]: *** [stage1-bubble] Error 2 make: *** [all] Error 2 llvm-svn: 59809
* Make mem[cpy,move,set] intrinsics overloaded.Sanjiv Gupta2008-11-211-3/+4
| | | | llvm-svn: 59802
* Add intrinsic forms of pow and exp2. The non-intrinsicDale Johannesen2008-09-041-0/+10
| | | | | | forms remain to handle older IR files, but will go away soon. llvm-svn: 55781
* Tidy up several unbeseeming casts from pointer to intptr_t.Dan Gohman2008-09-041-1/+1
| | | | llvm-svn: 55779
* Have IRBuilder take a template argument on whether or not to preserveEric Christopher2008-08-081-45/+46
| | | | | | | names. This can save a lot of allocations if you aren't going to be looking at the output. llvm-svn: 54546
* - Re-apply 52748 and friends with fix. GetConstantStringInfo() returns an ↵Evan Cheng2008-06-301-82/+1
| | | | | | | | empty string for ConstantAggregateZero case which surprises selectiondag. - Correctly handle memcpy from constant string which is zero-initialized. llvm-svn: 52891
* Revert (52748 and friends):Anton Korobeynikov2008-06-291-1/+82
| | | | | | | | | | | | Move GetConstantStringInfo to lib/Analysis. Remove string output routine from Constant. Update all callers. Change debug intrinsic api slightly to accomodate move of routine, these now return values instead of strings. This unbreaks llvm-gcc bootstrap. llvm-svn: 52884
* Remove unused function.Eric Christopher2008-06-261-82/+1
| | | | llvm-svn: 52749
* Fix the crash on SimplifyLibCalls/2005-05-20-sprintf-crash.llChris Lattner2008-06-161-1/+1
| | | | llvm-svn: 52295
* lower calls to abs to inline code, PR2337Chris Lattner2008-06-091-1/+26
| | | | llvm-svn: 52138
* Fix PR2341 - when the length is 4 use an i32 notDuncan Sands2008-05-191-8/+10
| | | | | | an i16! Cleaned up trailing whitespace while there. llvm-svn: 51240
* Fix: Some classes were derived from a class in an anonymous namespace, but theyBill Wendling2008-05-051-0/+2
| | | | | | themselves weren't in the anonymous namespace. llvm-svn: 50673
* strength reduce exp2 into ldexp, rdar://5852514Chris Lattner2008-05-021-1/+52
| | | | llvm-svn: 50586
* 1) add '-debug' outputChris Lattner2008-05-011-11/+19
| | | | | | | 2) Return NULL instead of false in several places for tidiness. 3) fix a bug optimizing sprintf(p, "%c", x) llvm-svn: 50521
* Delete the IPO simplify-libcalls and completely reimplement it asChris Lattner2008-05-011-0/+1437
a FunctionPass. This makes it simpler, fixes dozens of bugs, adds a couple of minor features, and shrinks is considerably: from 2214 to 1437 lines. llvm-svn: 50520
OpenPOWER on IntegriCloud