Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Delete the IPO simplify-libcalls and completely reimplement it as | Chris Lattner | 2008-05-01 | 1 | -2214/+0 |
| | | | | | | | | 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 | ||||
* | use string length computation to generalize several xforms. | Chris Lattner | 2008-04-30 | 1 | -36/+39 |
| | | | | llvm-svn: 50464 | ||||
* | Implement more aggressive support for analyzing string length. This | Chris Lattner | 2008-04-29 | 1 | -10/+136 |
| | | | | | | | | | | generalizes the previous code to handle the case when the string is not an immediate to the strlen call (for example, crazy stuff like strlen(c ? "foo" : "bart"+1) -> 3). This implements gcc.c-torture/execute/builtins/strlen-2.c. I will generalize other cases in simplifylibcalls to use the same routine later. llvm-svn: 50408 | ||||
* | don't assume that the argument passed to fprintf("%s" is a string. This | Chris Lattner | 2008-04-21 | 1 | -1/+1 |
| | | | | | | fixes a crash in opt on 433.milc. llvm-svn: 50023 | ||||
* | Disable an xform we've had for a long time, pow(x,0.5) -> sqrt. | Chris Lattner | 2008-04-10 | 1 | -0/+8 |
| | | | | | | This is not safe for all inputs. llvm-svn: 49458 | ||||
* | Generalize getUnaryFloatFunction to handle any FP unary function, automatically | Chris Lattner | 2008-04-09 | 1 | -17/+33 |
| | | | | | | figuring out the suffix to use. implement pow(2,x) -> exp2(x). llvm-svn: 49437 | ||||
* | use the new ConstantFP::get method to make this work with | Chris Lattner | 2008-04-09 | 1 | -11/+4 |
| | | | | | | long double and simplify the code. llvm-svn: 49435 | ||||
* | many cleanups to the pow optimizer. Allow it to handle powf, | Chris Lattner | 2008-04-09 | 1 | -34/+50 |
| | | | | | | add support for pow(x, 2.0) -> x*x. llvm-svn: 49411 | ||||
* | Use Intrinsic::getDeclaration in more places. | Duncan Sands | 2008-04-07 | 1 | -21/+7 |
| | | | | llvm-svn: 49338 | ||||
* | API changes for class Use size reduction, wave 1. | Gabor Greif | 2008-04-06 | 1 | -41/+41 |
| | | | | | | | | Specifically, introduction of XXX::Create methods for Users that have a potentially variable number of Uses. llvm-svn: 49277 | ||||
* | Check multiple return values. | Devang Patel | 2008-03-12 | 1 | -1/+2 |
| | | | | llvm-svn: 48267 | ||||
* | Get rid of hash_map. Use StringMap instead | Anton Korobeynikov | 2008-02-20 | 1 | -3/+3 |
| | | | | llvm-svn: 47373 | ||||
* | Unbreak build with gcc 4.3: provide missed includes and silence most ↵ | Anton Korobeynikov | 2008-02-20 | 1 | -0/+1 |
| | | | | | | annoying warnings. llvm-svn: 47367 | ||||
* | Use empty() instead of comparing size() with zero. | Dan Gohman | 2008-01-29 | 1 | -1/+1 |
| | | | | llvm-svn: 46514 | ||||
* | Transform calls to memcpy into llvm.memcpy calls, patch by Eli Friedman. | Chris Lattner | 2008-01-28 | 1 | -0/+30 |
| | | | | llvm-svn: 46433 | ||||
* | Remove attribution from file headers, per discussion on llvmdev. | Chris Lattner | 2007-12-29 | 1 | -2/+2 |
| | | | | llvm-svn: 45418 | ||||
* | Change the PointerType api for creating pointer types. The old functionality ↵ | Christopher Lamb | 2007-12-17 | 1 | -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 Johannesen | 2007-10-24 | 1 | -1/+3 |
| | | | | llvm-svn: 43309 | ||||
* | minor long double related changes | Dale Johannesen | 2007-09-28 | 1 | -4/+2 |
| | | | | llvm-svn: 42439 | ||||
* | Next round of APFloat changes. | Dale Johannesen | 2007-09-06 | 1 | -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 by | David Greene | 2007-08-01 | 1 | -12/+20 |
| | | | | | | | | indexing an empty std::vector. Updates to all clients. llvm-svn: 40660 | ||||
* | Fix typo in comment. | Nick Lewycky | 2007-05-06 | 1 | -1/+1 |
| | | | | llvm-svn: 36873 | ||||
* | Drop 'const' | Devang Patel | 2007-05-03 | 1 | -2/+2 |
| | | | | llvm-svn: 36662 | ||||
* | Use 'static const char' instead of 'static const int'. | Devang Patel | 2007-05-02 | 1 | -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 Patel | 2007-05-01 | 1 | -0/+4 |
| | | | | llvm-svn: 36632 | ||||
* | fix SimplifyLibCalls/IsDigit.ll | Chris Lattner | 2007-04-15 | 1 | -1/+1 |
| | | | | llvm-svn: 36047 | ||||
* | Implement a few missing xforms: printf("foo\n") -> puts. printf("x") -> putchar | Chris Lattner | 2007-04-14 | 1 | -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 Lattner | 2007-04-08 | 1 | -1/+1 |
| | | | | llvm-svn: 35768 | ||||
* | implement a fixme: move optimizations for fwrite out of fputs into a new | Chris Lattner | 2007-04-08 | 1 | -26/+56 |
| | | | | | | fwrite optimizer. llvm-svn: 35758 | ||||
* | Significantly simplify the clients of GetConstantStringInfo, by having it | Chris Lattner | 2007-04-07 | 1 | -235/+154 |
| | | | | | | just return the string itself. llvm-svn: 35755 | ||||
* | Fix problems in the sprintf optimizer | Chris Lattner | 2007-04-07 | 1 | -81/+60 |
| | | | | llvm-svn: 35754 | ||||
* | Change CastToCStr to take a pointer instead of a reference. | Chris Lattner | 2007-04-07 | 1 | -82/+76 |
| | | | | | | Fix some miscompilations in fprintf optimizer. llvm-svn: 35753 | ||||
* | Fix an off-by-one error that broke Prolangs/deriv2 with llc on x86 | Chris Lattner | 2007-04-07 | 1 | -1/+1 |
| | | | | | | and Prolangs-C/cdecl llvm-svn: 35749 | ||||
* | fix a miscompilation in printf optimizer. | Chris Lattner | 2007-04-07 | 1 | -38/+36 |
| | | | | llvm-svn: 35713 | ||||
* | trunc to bool no longer compares against zero | Chris Lattner | 2007-04-07 | 1 | -10/+5 |
| | | | | llvm-svn: 35712 | ||||
* | cleanups for strlen optimizer | Chris Lattner | 2007-04-07 | 1 | -34/+21 |
| | | | | llvm-svn: 35711 | ||||
* | Introduce a new ReplaceCallWith method, which simplifies a lot of code. | Chris Lattner | 2007-04-07 | 1 | -186/+86 |
| | | | | llvm-svn: 35710 | ||||
* | fixes for strcpy optimizer | Chris Lattner | 2007-04-07 | 1 | -53/+42 |
| | | | | llvm-svn: 35709 | ||||
* | Fix bugs in strncmp. | Chris Lattner | 2007-04-07 | 1 | -62/+52 |
| | | | | llvm-svn: 35708 | ||||
* | fix 3 miscompilations and several compielr crashes in strcmp optimizer. | Chris Lattner | 2007-04-07 | 1 | -44/+35 |
| | | | | llvm-svn: 35707 | ||||
* | Fix several nasty bugs in the strchr optimizer, this fixes | Chris Lattner | 2007-04-06 | 1 | -48/+54 |
| | | | | | | SimplifyLibCalls/2007-04-06-strchr-miscompile.ll and PR1307 llvm-svn: 35706 | ||||
* | clean up strcat optimizer, no functionality change. | Chris Lattner | 2007-04-06 | 1 | -28/+21 |
| | | | | llvm-svn: 35704 | ||||
* | rename getConstantStringLength -> GetConstantStringInfo. Make it return | Chris Lattner | 2007-04-06 | 1 | -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 to | Reid Spencer | 2007-03-02 | 1 | -3/+3 |
| | | | | | | Constant::isNullValue() in situations where it is possible. llvm-svn: 34821 | ||||
* | eliminate a bunch of vector-related heap traffic | Chris Lattner | 2007-02-13 | 1 | -47/+53 |
| | | | | llvm-svn: 34222 | ||||
* | Apply the VISIBILITY_HIDDEN field to the remaining anonymous classes in | Reid Spencer | 2007-02-05 | 1 | -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 vectors | Chris Lattner | 2007-01-31 | 1 | -6/+3 |
| | | | | llvm-svn: 33712 | ||||
* | For PR1136: Rename GlobalVariable::isExternal as isDeclaration to avoid | Reid Spencer | 2007-01-30 | 1 | -1/+1 |
| | | | | | | confusion with external linkage types. llvm-svn: 33663 | ||||
* | Correct a comment. | Owen Anderson | 2007-01-20 | 1 | -1/+1 |
| | | | | llvm-svn: 33397 | ||||
* | rename Type::isIntegral to Type::isInteger, eliminating the old Type::isInteger. | Chris Lattner | 2007-01-15 | 1 | -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 |