summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/SimplifyLibCalls
Commit message (Collapse)AuthorAgeFilesLines
...
* move an optimization for memcmp out of simplifylibcalls and into Chris Lattner2009-12-241-3/+0
| | | | | | | | | SDISel. This optimization was causing simplifylibcalls to introduce type-unsafe nastiness. This is the first step, I'll be expanding the memcmp optimizations shortly, covering things that we really really wouldn't want simplifylibcalls to do. llvm-svn: 92098
* reapply my strstr optimization. I have reproduced the x86-64 bootstrapChris Lattner2009-12-161-0/+48
| | | | | | | miscompile (i386.o miscompares) but it happens both with and without this patch. llvm-svn: 91532
* revert my strstr optimization, I'm told it breaks x86-64 bootstrap.Chris Lattner2009-12-161-48/+0
| | | | | | Will reapply with a fix when I get a chance. llvm-svn: 91486
* optimize strstr, PR5783Chris Lattner2009-12-151-0/+48
| | | | llvm-svn: 91438
* Teach SimplifyLibCalls to fold memcmp calls with constant arguments.Benjamin Kramer2009-11-051-0/+4
| | | | llvm-svn: 86141
* Fix SimplifyLibCalls to transfer attributes from callees rather thanDan Gohman2009-09-261-6/+6
| | | | | | | calls, since direct calls don't always reflect the attributes of their callees. llvm-svn: 82867
* I put the wrong rdar number in this test.Dan Gohman2009-09-261-1/+1
| | | | llvm-svn: 82829
* Transform pow(x, 0.5) to (x == -inf ? inf : fabs(sqrt(x))), which isDan Gohman2009-09-251-0/+33
| | | | | | typically faster then doing a general pow. llvm-svn: 82819
* Change tests from "opt %s" to "opt < %s" so that opt doesn't see theDan Gohman2009-09-1134-37/+37
| | | | | | | | input filename so that opt doesn't print the input filename in the output so that grep lines in the tests don't unintentionally match strings in the input filename. llvm-svn: 81537
* Use opt -S instead of piping bitcode output through llvm-dis.Dan Gohman2009-09-0831-34/+34
| | | | llvm-svn: 81257
* Change these tests to feed the assembly files to opt directly, insteadDan Gohman2009-09-0834-37/+37
| | | | | | of using llvm-as, now that opt supports this. llvm-svn: 81226
* Eliminate uses of %prcontext.Daniel Dunbar2009-09-051-1/+6
| | | | | | | - I'd appreciate it if someone else eyeballs my changes to make sure I captured the intent of the test. llvm-svn: 81083
* In C++, code is not allowed to call main. In C it is, thisChris Lattner2009-09-031-15/+0
| | | | | | | | | | simplifylibcalls optimization is thus valid for C++ but not C. It's not important enough to worry about for C++ apps, so just remove it. rdar://7191924 llvm-svn: 80887
* Add targetdata strings to these tests, since SimplifyLibCalls usesDan Gohman2009-08-198-2/+32
| | | | | | TargetData to find the pointer size. llvm-svn: 79490
* Fix SimplifyLibcalls and ValueTracking to check mayBeOverriddenDan Gohman2009-08-191-0/+26
| | | | | | before performing optimizations based on constant string values. llvm-svn: 79384
* Fix PR4645 which was fallout from the fix for PR4641.Daniel Dunbar2009-07-291-0/+24
| | | | | | - Call RAUW to delete all instructions (this is a patch from Nick Lewycky). llvm-svn: 77512
* Just discard the output, no need to turn it back into text.Nick Lewycky2009-07-291-1/+1
| | | | llvm-svn: 77439
* don't dump .bc file to stdout, and simplify this to a trivial testcase.Chris Lattner2009-07-291-158/+1
| | | | llvm-svn: 77436
* Bulk erasing instructions without RAUWing them is unsafe. Instead, break themNick Lewycky2009-07-291-0/+179
| | | | | | into a new BB that has no predecessors. llvm-svn: 77433
* Fix simplifylibcalls memset recognition to work on 64-bit platforms Eli Friedman2009-07-181-0/+12
| | | | | | where int is 32 bits. llvm-svn: 76293
* part of PR4405: disable a contentious optimization forChris Lattner2009-06-191-10/+0
| | | | | | | | strcmp -> memcmp when the lengths of the strings are unknown. Patch by Nick Lewycky! llvm-svn: 73751
* Split the Add, Sub, and Mul instruction opcodes into separateDan Gohman2009-06-041-1/+1
| | | | | | | | | | | | | | | integer and floating-point opcodes, introducing FAdd, FSub, and FMul. For now, the AsmParser, BitcodeReader, and IRBuilder all preserve backwards compatability, and the Core LLVM APIs preserve backwards compatibility for IR producers. Most front-ends won't need to change immediately. This implements the first step of the plan outlined here: http://nondot.org/sabre/LLVMNotes/IntegerOverflow.txt llvm-svn: 72897
* fix PR4284, a bug in simplifylibcalls handling memcmp. Patch by Chris Lattner2009-05-301-0/+14
| | | | | | Benjamin Kramer! llvm-svn: 72625
* Fix PR4206 - crash in simplify lib callsChris Lattner2009-05-131-0/+6
| | | | llvm-svn: 71644
* add some optimizations for strncpy/strncat and factor someChris Lattner2009-04-122-0/+52
| | | | | | code. Patch by Benjamin Kramer! llvm-svn: 68885
* Let the strcat optimizer return the pointer to the start of the buffer,Ed Schouten2009-04-061-0/+3
| | | | | | | | | instead of the place where it started to perform the string copy. - PR3661 - Patch by Benjamin Kramer! llvm-svn: 68443
* Mark strto* as readonly when the endptr is null.Nick Lewycky2009-02-131-4/+5
| | | | llvm-svn: 64460
* On strtod and friends, mark 'endptr' nocapture in the function prototype, andNick Lewycky2009-02-131-0/+13
| | | | | | mark the first argument nocapture if endptr=NULL for each particular call. llvm-svn: 64453
* Reapply r64300:Nick Lewycky2009-02-131-2/+2
| | | | | | | | | Make sure the SCC pass manager initializes any contained function pass managers. Without this, simplify-libcalls would add nocapture attributes when run on its own, but not when run as part of -std-compile-opts or similar. llvm-svn: 64443
* Revert r64300 and r64301. These were causing the following errors respectively:Bill Wendling2009-02-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During llvm-gcc bootstrap: Undefined symbols: "llvm::FPPassManager::doFinalization(llvm::Module&)", referenced from: (anonymous namespace)::CGPassManager::doFinalization(llvm::CallGraph&, llvm::Module&) in libLLVMipa.a(CallGraphSCCPass.o) "llvm::FPPassManager::doInitialization(llvm::Module&)", referenced from: (anonymous namespace)::CGPassManager::doInitialization(llvm::CallGraph&, llvm::Module&) in libLLVMipa.a(CallGraphSCCPass.o) ld: symbol(s) not found collect2: ld returned 1 exit status make[3]: *** [/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore.roots/llvmCore~obj/obj-llvm/Release/bin/opt] Error 1 During an LLVM release build: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/Release/bin/tblgen -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86 -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target -gen-register-desc -o /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Target/X86/Release/X86GenRegisterInfo.inc.tmp /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86/X86.td llvm[3]: Building X86.td instruction names with tblgen /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/Release/bin/tblgen -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86 -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target -gen-instr-enums -o /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Target/X86/Release/X86GenInstrNames.inc.tmp /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86/X86.td llvm[3]: Building X86.td instruction information with tblgen /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/Release/bin/tblgen -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86 -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target -gen-instr-desc -o /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Target/X86/Release/X86GenInstrInfo.inc.tmp /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86/X86.td llvm[3]: Building X86.td assembly writer with tblgen /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/Release/bin/tblgen -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86 -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target -gen-asm-writer -o /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Target/X86/Release/X86GenAsmWriter.inc.tmp /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86/X86.td llvm[3]: Compiling InstructionCombining.cpp for Release build if /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmgcc42.roots/llvmgcc42~dst/Developer/usr/bin/llvm-g++-4.2 -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/include -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Transforms/Scalar -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -O3 -fno-exceptions -Woverloaded-virtual -pedantic -Wall -W -Wwrite-strings -Wno-long-long -Wunused -Wno-unused-parameter -fstrict-aliasing -Wstrict-aliasing -c -MMD -MP -MF "/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar/Release/InstructionCombining.d.tmp" -MT "/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar/Release/InstructionCombining.lo" -MT "/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar/Release/InstructionCombining.o" -MT "/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar/Release/InstructionCombining.d" /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Transforms/Scalar/InstructionCombining.cpp -o /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar/Release/InstructionCombining.o ; \ then /bin/mv -f "/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar/Release/InstructionCombining.d.tmp" "/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Trans llvm-svn: 64311
* Make sure the SCC pass manager initializes any containedDuncan Sands2009-02-111-0/+12
| | | | | | | | function pass managers. Without this, simplify-libcalls would add nocapture attributes when run on its own, but not when run as part of -std-compile-opts or similar. llvm-svn: 64300
* Forgot this in the previous checkin: fopen now has nocapture, realloc isNick Lewycky2009-01-181-2/+2
| | | | | | supposed to take two arguments. llvm-svn: 62457
* Run a post-pass that marks known function declarations by name.Nick Lewycky2009-01-041-0/+12
| | | | llvm-svn: 61632
* Turn strcmp into memcmp, such as strcmp(P, "x") --> memcmp(P, "x", 2).Nick Lewycky2008-12-211-0/+10
| | | | llvm-svn: 61297
* Optimize memmove and memset into the LLVM builtins. Note that these Eli Friedman2008-11-302-0/+24
| | | | | | only show up in code from front-ends besides llvm-gcc, like clang. llvm-svn: 60287
* Add a new pass to simplify specific half_powr function calls. This isDan Gohman2008-11-041-0/+41
| | | | | | a specialized pass that it not likely to be generally useful. llvm-svn: 58732
* lower calls to abs to inline code, PR2337Chris Lattner2008-06-091-0/+11
| | | | llvm-svn: 52138
* sabre brings to my attention that the 'tr' suffix is also obsoleteGabor Greif2008-05-201-1/+1
| | | | llvm-svn: 51349
* Rename the last test with .llx extension to .ll, resolve duplicate test by ↵Gabor Greif2008-05-201-1/+1
| | | | | | renaming to isnan2. Now that no test has llx ending there is no need to search for them from dg.exp too. llvm-svn: 51328
* Fix PR2341 - when the length is 4 use an i32 notDuncan Sands2008-05-191-0/+14
| | | | | | an i16! Cleaned up trailing whitespace while there. llvm-svn: 51240
* strength reduce exp2 into ldexp, rdar://5852514Chris Lattner2008-05-021-0/+38
| | | | llvm-svn: 50586
* Update old-style syntax in some "not grep" tests.Dan Gohman2008-05-012-2/+2
| | | | llvm-svn: 50560
* fix typoChris Lattner2008-05-011-1/+1
| | | | llvm-svn: 50519
* instcombine does memset optzns.Chris Lattner2008-05-011-18/+0
| | | | llvm-svn: 50518
* simplifylibcalls doesn't optimize llvm.memmove, instcombine does.Chris Lattner2008-05-011-22/+0
| | | | llvm-svn: 50517
* no reason for simplifylibcalls to simplify intrinsics, instcombine doesChris Lattner2008-04-301-3/+1
| | | | | | a fine job. llvm-svn: 50470
* remove redundant check.Chris Lattner2008-04-301-3/+1
| | | | llvm-svn: 50469
* Generalize getUnaryFloatFunction to handle any FP unary function, automaticallyChris Lattner2008-04-091-0/+5
| | | | | | figuring out the suffix to use. implement pow(2,x) -> exp2(x). llvm-svn: 49437
* remove capital letter from test name.Chris Lattner2008-04-091-0/+0
| | | | llvm-svn: 49436
* many cleanups to the pow optimizer. Allow it to handle powf,Chris Lattner2008-04-091-4/+12
| | | | | | add support for pow(x, 2.0) -> x*x. llvm-svn: 49411
OpenPOWER on IntegriCloud