summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* optimize strstr, PR5783Chris Lattner2009-12-151-9/+75
| | | | llvm-svn: 91438
* add some other xforms that should be done as part of PR5783Chris Lattner2009-12-151-3/+4
| | | | llvm-svn: 91428
* tidy up, remove dependence on order of evaluation of function args from ↵Chris Lattner2009-12-021-15/+12
| | | | | | EmitMemCpy. llvm-svn: 90297
* Add more optimizations for object size checking, enable handling ofEric Christopher2009-11-211-35/+144
| | | | | | | object size intrinsic and verify return type is correct. Collect various code in one place. llvm-svn: 89523
* Revert "Add some rough optimizations for checking routines.", it buildeth not.Daniel Dunbar2009-11-201-119/+12
| | | | llvm-svn: 89482
* Add some rough optimizations for checking routines.Eric Christopher2009-11-201-12/+119
| | | | llvm-svn: 89479
* CreateIntCast takes an "isSigned" parameter. Pass "true" for it, rather thanDuncan Sands2009-11-161-1/+3
| | | | | | a name. llvm-svn: 88908
* fix PR5104: when printing a single character, return the result ofChris Lattner2009-11-091-9/+13
| | | | | | putchar in case there is an error. llvm-svn: 86515
* Teach SimplifyLibCalls to fold memcmp calls with constant arguments.Benjamin Kramer2009-11-051-4/+11
| | | | llvm-svn: 86141
* Add objectsize intrinsic and hook it up through codegen. Doesn'tEric Christopher2009-10-271-0/+25
| | | | | | do anything than return "I don't know" at the moment. llvm-svn: 85189
* 80-column and whitespace fixes.Eric Christopher2009-10-071-135/+156
| | | | llvm-svn: 83489
* Introduce and use convenience methods for getting pointer typesDuncan Sands2009-10-061-19/+19
| | | | | | | where the element is of a basic builtin type. For example, to get an i8* use getInt8PtrTy. llvm-svn: 83379
* strength reduce a ton of type equality tests to check the typeid (ThroughChris Lattner2009-10-051-10/+11
| | | | | | | | the new predicates I added) instead of going through a context and doing a pointer comparison. Besides being cheaper, this allows a smart compiler to turn the if sequence into a switch. llvm-svn: 83297
* Fix SimplifyLibCalls to transfer attributes from callees rather thanDan Gohman2009-09-261-4/+7
| | | | | | | calls, since direct calls don't always reflect the attributes of their callees. llvm-svn: 82867
* Rename ConstantFP's getInf to getInfinity.Dan Gohman2009-09-251-2/+2
| | | | llvm-svn: 82823
* Transform pow(x, 0.5) to (x == -inf ? inf : fabs(sqrt(x))), which isDan Gohman2009-09-251-15/+19
| | | | | | typically faster then doing a general pow. llvm-svn: 82819
* Enhance transform passes so that they apply the same tranforms to malloc ↵Victor Hernandez2009-09-181-1/+7
| | | | | | | | calls as to MallocInst. Reviewed by Dan Gohman. llvm-svn: 82300
* In C++, code is not allowed to call main. In C it is, thisChris Lattner2009-09-031-57/+4
| | | | | | | | | | 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
* eliminate VISIBILITY_HIDDEN from Transforms/Scalar. PR4861Chris Lattner2009-09-021-30/+29
| | | | llvm-svn: 80766
* Fix SimplifyLibcalls and ValueTracking to check mayBeOverriddenDan Gohman2009-08-191-1/+2
| | | | | | before performing optimizations based on constant string values. llvm-svn: 79384
* Make TargetData optional in SimplifyLibCalls.Dan Gohman2009-08-181-7/+45
| | | | llvm-svn: 79298
* Push LLVMContexts through the IntegerType APIs.Owen Anderson2009-08-131-91/+92
| | | | llvm-svn: 78948
* Move a few more APIs back to 2.5 forms. The only remaining ones left to ↵Owen Anderson2009-07-311-7/+7
| | | | | | | | change back are metadata related, which I'm waiting on to avoid conflicting with Devang. llvm-svn: 77721
* Move types back to the 2.5 API.Owen Anderson2009-07-291-20/+20
| | | | llvm-svn: 77516
* Fix PR4645 which was fallout from the fix for PR4641.Daniel Dunbar2009-07-291-8/+15
| | | | | | - Call RAUW to delete all instructions (this is a patch from Nick Lewycky). llvm-svn: 77512
* Move ConstantExpr to 2.5 API.Owen Anderson2009-07-291-1/+1
| | | | llvm-svn: 77494
* Bulk erasing instructions without RAUWing them is unsafe. Instead, break themNick Lewycky2009-07-291-7/+9
| | | | | | into a new BB that has no predecessors. llvm-svn: 77433
* Change ConstantArray to 2.5 API.Owen Anderson2009-07-281-1/+1
| | | | llvm-svn: 77347
* Move ConstantFP construction back to the 2.5-ish API.Owen Anderson2009-07-271-3/+3
| | | | llvm-svn: 77247
* Remove Value::getNameLenDaniel Dunbar2009-07-261-7/+6
| | | | llvm-svn: 77148
* Eliminate some uses of DOUT, cerr, and getNameStart().Daniel Dunbar2009-07-261-166/+165
| | | | llvm-svn: 77145
* Remove Value::{isName, getNameRef}.Daniel Dunbar2009-07-251-1/+1
| | | | | | Also, change MDString to use a StringRef. llvm-svn: 77098
* Revert the ConstantInt constructors back to their 2.5 forms where possible, ↵Owen Anderson2009-07-241-40/+40
| | | | | | thanks to contexts-on-types. More to come. llvm-svn: 77011
* Convert StringMap to using StringRef for its APIs.Daniel Dunbar2009-07-231-1/+1
| | | | | | | | | | | | - Yay for '-'s and simplifications! - I kept StringMap::GetOrCreateValue for compatibility purposes, this can eventually go away. Likewise the StringMapEntry Create functions still follow the old style. - NIFC. llvm-svn: 76888
* Get rid of the Pass+Context magic.Owen Anderson2009-07-221-4/+2
| | | | llvm-svn: 76702
* Fix simplifylibcalls memset recognition to work on 64-bit platforms Eli Friedman2009-07-181-2/+2
| | | | | | where int is 32 bits. llvm-svn: 76293
* Move the ConstantInt uniquing table into LLVMContextImpl. This exposed a ↵Owen Anderson2009-07-161-0/+2
| | | | | | | | number of issues in our current context-passing stuff, which is also fixed here llvm-svn: 76089
* Move more functionality over to LLVMContext.Owen Anderson2009-07-131-1/+1
| | | | llvm-svn: 75497
* Push LLVMContext _back_ through IRBuilder.Owen Anderson2009-07-081-1/+1
| | | | llvm-svn: 75040
* Switch GlobalVariable ctors to a sane API, where *either* a context or a ↵Owen Anderson2009-07-081-3/+2
| | | | | | module is required. llvm-svn: 75025
* Push LLVMContext through GlobalVariables and IRBuilder.Owen Anderson2009-07-081-1/+2
| | | | llvm-svn: 74985
* Even more passes being LLVMContext'd.Owen Anderson2009-07-031-72/+92
| | | | llvm-svn: 74781
* part of PR4405: disable a contentious optimization forChris Lattner2009-06-191-5/+3
| | | | | | | | strcmp -> memcmp when the lengths of the strings are unknown. Patch by Nick Lewycky! llvm-svn: 73751
* Revert IRBuilder CC propagation. Fix SimplifyLibCalls instead.Anton Korobeynikov2009-06-181-23/+62
| | | | llvm-svn: 73715
* 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-1/+1
| | | | | | Benjamin Kramer! llvm-svn: 72625
* Fix PR4206 - crash in simplify lib callsChris Lattner2009-05-131-1/+1
| | | | llvm-svn: 71644
* "There was a typo in my previous patch which leads to miscompilation ofChris Lattner2009-04-121-1/+1
| | | | | | | | | | | | | | strncat :( strncat(foo, "bar", 99) would be optimized to memcpy(foo+strlen(foo), "bar", 100, 1) instead of memcpy(foo+strlen(foo), "bar", 4, 1)" Patch by Benjamin Kramer! llvm-svn: 68905
* add some optimizations for strncpy/strncat and factor someChris Lattner2009-04-121-22/+114
| | | | | | 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-2/+2
| | | | | | | | | instead of the place where it started to perform the string copy. - PR3661 - Patch by Benjamin Kramer! llvm-svn: 68443
OpenPOWER on IntegriCloud