summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add strcpy_chk -> strcpy support for "don't know" object sizeEric Christopher2010-01-211-0/+45
| | | | | | answers. This will update as object size checking gets better information. llvm-svn: 94059
* Move the object size intrinsic optimization to inst-combine and makeEric Christopher2010-01-061-24/+0
| | | | | | it work for any integer size return type. llvm-svn: 92853
* Formatting.Mikhail Glushenkov2010-01-061-2/+2
| | | | llvm-svn: 92831
* Move remaining stuff to the isInteger predicate.Benjamin Kramer2010-01-051-12/+9
| | | | llvm-svn: 92771
* Change errs() to dbgs().David Greene2010-01-051-2/+2
| | | | llvm-svn: 92615
* 80-col violations, trailing whitespace.Mikhail Glushenkov2010-01-041-16/+20
| | | | llvm-svn: 92470
* move an optimization for memcmp out of simplifylibcalls and into Chris Lattner2009-12-241-13/+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
* reorder to follow a normal fall-through style, no functionality change.Chris Lattner2009-12-231-4/+3
| | | | llvm-svn: 92084
* Update objectsize intrinsic and associated dependencies. FixEric Christopher2009-12-231-1/+1
| | | | | | lowering code and update testcases. llvm-svn: 91979
* Whitespace fixes.Eric Christopher2009-12-221-4/+4
| | | | llvm-svn: 91875
* reapply my strstr optimization. I have reproduced the x86-64 bootstrapChris Lattner2009-12-161-9/+75
| | | | | | | 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-75/+9
| | | | | | Will reapply with a fix when I get a chance. llvm-svn: 91486
* 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
OpenPOWER on IntegriCloud