summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Use empty() instead of comparing size() with zero.Dan Gohman2008-01-291-1/+1
| | | | llvm-svn: 46514
* Transform calls to memcpy into llvm.memcpy calls, patch by Eli Friedman.Chris Lattner2008-01-281-0/+30
| | | | llvm-svn: 46433
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45418
* Change the PointerType api for creating pointer types. The old functionality ↵Christopher Lamb2007-12-171-26/+26
| | | | | | of PointerType::get() has become PointerType::getUnqual(), which returns a pointer in the generic address space. The new prototype of PointerType::get() requires both a type and an address space. llvm-svn: 45082
* Fix off by 1 bug in printf->puts lowering.Dale Johannesen2007-10-241-1/+3
| | | | llvm-svn: 43309
* minor long double related changesDale Johannesen2007-09-281-4/+2
| | | | llvm-svn: 42439
* Next round of APFloat changes.Dale Johannesen2007-09-061-11/+16
| | | | | | | | | | | | | | Use APFloat in UpgradeParser and AsmParser. Change all references to ConstantFP to use the APFloat interface rather than double. Remove the ConstantFP double interfaces. Use APFloat functions for constant folding arithmetic and comparisons. (There are still way too many places APFloat is just a wrapper around host float/double, but we're getting there.) llvm-svn: 41747
* New CallInst interface to address GLIBCXX_DEBUG errors caused byDavid Greene2007-08-011-12/+20
| | | | | | | | indexing an empty std::vector. Updates to all clients. llvm-svn: 40660
* Fix typo in comment.Nick Lewycky2007-05-061-1/+1
| | | | llvm-svn: 36873
* Drop 'const'Devang Patel2007-05-031-2/+2
| | | | llvm-svn: 36662
* Use 'static const char' instead of 'static const int'.Devang Patel2007-05-021-2/+2
| | | | | | | Due to darwin gcc bug, one version of darwin linker coalesces static const int, which defauts PassID based pass identification. llvm-svn: 36652
* Do not use typeinfo to identify pass in pass manager.Devang Patel2007-05-011-0/+4
| | | | llvm-svn: 36632
* fix SimplifyLibCalls/IsDigit.llChris Lattner2007-04-151-1/+1
| | | | llvm-svn: 36047
* Implement a few missing xforms: printf("foo\n") -> puts. printf("x") -> putcharChris Lattner2007-04-141-9/+48
| | | | | | | | printf("") -> noop. Still need to do the xforms for fprintf. This implements Transforms/SimplifyLibCalls/Printf.ll llvm-svn: 35984
* Fix a typo that broke SimplifyLibCalls/SPrintF.ll (pr1315)Chris Lattner2007-04-081-1/+1
| | | | llvm-svn: 35768
* implement a fixme: move optimizations for fwrite out of fputs into a newChris Lattner2007-04-081-26/+56
| | | | | | fwrite optimizer. llvm-svn: 35758
* Significantly simplify the clients of GetConstantStringInfo, by having itChris Lattner2007-04-071-235/+154
| | | | | | just return the string itself. llvm-svn: 35755
* Fix problems in the sprintf optimizerChris Lattner2007-04-071-81/+60
| | | | llvm-svn: 35754
* Change CastToCStr to take a pointer instead of a reference.Chris Lattner2007-04-071-82/+76
| | | | | | Fix some miscompilations in fprintf optimizer. llvm-svn: 35753
* Fix an off-by-one error that broke Prolangs/deriv2 with llc on x86Chris Lattner2007-04-071-1/+1
| | | | | | and Prolangs-C/cdecl llvm-svn: 35749
* fix a miscompilation in printf optimizer.Chris Lattner2007-04-071-38/+36
| | | | llvm-svn: 35713
* trunc to bool no longer compares against zeroChris Lattner2007-04-071-10/+5
| | | | llvm-svn: 35712
* cleanups for strlen optimizerChris Lattner2007-04-071-34/+21
| | | | llvm-svn: 35711
* Introduce a new ReplaceCallWith method, which simplifies a lot of code.Chris Lattner2007-04-071-186/+86
| | | | llvm-svn: 35710
* fixes for strcpy optimizerChris Lattner2007-04-071-53/+42
| | | | llvm-svn: 35709
* Fix bugs in strncmp.Chris Lattner2007-04-071-62/+52
| | | | llvm-svn: 35708
* fix 3 miscompilations and several compielr crashes in strcmp optimizer.Chris Lattner2007-04-071-44/+35
| | | | llvm-svn: 35707
* Fix several nasty bugs in the strchr optimizer, this fixesChris Lattner2007-04-061-48/+54
| | | | | | SimplifyLibCalls/2007-04-06-strchr-miscompile.ll and PR1307 llvm-svn: 35706
* clean up strcat optimizer, no functionality change.Chris Lattner2007-04-061-28/+21
| | | | llvm-svn: 35704
* rename getConstantStringLength -> GetConstantStringInfo. Make it returnChris Lattner2007-04-061-74/+83
| | | | | | the start index of the array as well as the length. No functionality change. llvm-svn: 35703
* Prefer non-virtual calls to ConstantInt::isZero over virtual calls toReid Spencer2007-03-021-3/+3
| | | | | | Constant::isNullValue() in situations where it is possible. llvm-svn: 34821
* eliminate a bunch of vector-related heap trafficChris Lattner2007-02-131-47/+53
| | | | llvm-svn: 34222
* Apply the VISIBILITY_HIDDEN field to the remaining anonymous classes inReid Spencer2007-02-051-32/+35
| | | | | | | the Transforms library. This reduces debug library size by 132 KB, debug binary size by 376 KB, and reduces link time for llvm tools slightly. llvm-svn: 33939
* eliminate temporary vectorsChris Lattner2007-01-311-6/+3
| | | | llvm-svn: 33712
* For PR1136: Rename GlobalVariable::isExternal as isDeclaration to avoidReid Spencer2007-01-301-1/+1
| | | | | | confusion with external linkage types. llvm-svn: 33663
* Correct a comment.Owen Anderson2007-01-201-1/+1
| | | | llvm-svn: 33397
* rename Type::isIntegral to Type::isInteger, eliminating the old Type::isInteger.Chris Lattner2007-01-151-5/+5
| | | | | | | | | rename Type::getIntegralTypeMask to Type::getIntegerTypeMask. This makes naming much more consistent. For example, there are now no longer any instances of IntegerType that are not considered isInteger! :) llvm-svn: 33225
* Eliminate calls to isInteger, generalizing code and tightening checks as needed.Chris Lattner2007-01-151-5/+5
| | | | llvm-svn: 33218
* Remove over-general comparisonsChris Lattner2007-01-121-4/+6
| | | | llvm-svn: 33147
* For PR1064:Reid Spencer2007-01-121-7/+11
| | | | | | | | | | | | | | | | | | | | | | | Implement the arbitrary bit-width integer feature. The feature allows integers of any bitwidth (up to 64) to be defined instead of just 1, 8, 16, 32, and 64 bit integers. This change does several things: 1. Introduces a new Derived Type, IntegerType, to represent the number of bits in an integer. The Type classes SubclassData field is used to store the number of bits. This allows 2^23 bits in an integer type. 2. Removes the five integer Type::TypeID values for the 1, 8, 16, 32 and 64-bit integers. These are replaced with just IntegerType which is not a primitive any more. 3. Adjust the rest of LLVM to account for this change. Note that while this incremental change lays the foundation for arbitrary bit-width integers, LLVM has not yet been converted to actually deal with them in any significant way. Most optimization passes, for example, will still only deal with the byte-width integer types. Future increments will rectify this situation. llvm-svn: 33113
* Rename BoolTy as Int1Ty. Patch by Sheng Zhou.Reid Spencer2007-01-111-1/+1
| | | | llvm-svn: 33076
* Types should be const.Reid Spencer2007-01-071-2/+2
| | | | llvm-svn: 33001
* Change the interface to Module::getOrInsertFunction to be easier to use,to ↵Chris Lattner2007-01-071-81/+49
| | | | | | | | resolve PR1088, and to help PR411. This simplifies many clients also llvm-svn: 32989
* For PR950:Reid Spencer2006-12-311-96/+95
| | | | | | | | | | | | | This patch replaces signed integer types with signless ones: 1. [US]Byte -> Int8 2. [U]Short -> Int16 3. [U]Int -> Int32 4. [U]Long -> Int64. 5. Removal of isSigned, isUnsigned, getSignedVersion, getUnsignedVersion and other methods related to signedness. In a few places this warranted identifying the signedness information from other sources. llvm-svn: 32785
* For PR950:Reid Spencer2006-12-231-21/+19
| | | | | | | | This patch removes the SetCC instructions and replaces them with the ICmp and FCmp instructions. The SetCondInst instruction has been removed and been replaced with ICmpInst and FCmpInst. llvm-svn: 32751
* Get rid of a useless if statement whose then and else blocks were identical.Reid Spencer2006-12-211-4/+1
| | | | llvm-svn: 32729
* switch statistics over to not use static ctors.Chris Lattner2006-12-191-3/+3
| | | | llvm-svn: 32709
* Eliminate static ctors due to Statistic objectsChris Lattner2006-12-191-8/+6
| | | | llvm-svn: 32693
* Fix some casts. isdigit(c) returns 0 or 1, not 0 or -1Reid Spencer2006-12-131-3/+3
| | | | llvm-svn: 32534
* Replace CastInst::createInferredCast calls with more accurate castReid Spencer2006-12-131-26/+29
| | | | | | creation calls. llvm-svn: 32521
OpenPOWER on IntegriCloud