Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | change the objectsize intrinsic signature: add a 3rd parameter to denote the ↵ | Nuno Lopes | 2012-05-09 | 1 | -2/+2 | |
| | | | | | | | | maximum runtime performance penalty that the user is willing to accept. This commit only adds the parameter. Code taking advantage of it will follow. llvm-svn: 156473 | |||||
* | FileCheckify, un-XFAIL SimplifyLibCalls/floor test | Joe Groff | 2012-04-18 | 1 | -10/+31 | |
| | | | | | | Fixes build on MSVC llvm-svn: 154970 | |||||
* | Move win32 SimplifyLibcall test under Transforms | Joe Groff | 2012-04-18 | 1 | -0/+275 | |
| | | | | llvm-svn: 154967 | |||||
* | Replace all instances of dg.exp file with lit.local.cfg, since all tests are ↵ | Eli Bendersky | 2012-02-16 | 2 | -3/+1 | |
| | | | | | | | | run with LIT now and now Dejagnu. dg.exp is no longer needed. Patch reviewed by Daniel Dunbar. It will be followed by additional cleanup patches. llvm-svn: 150664 | |||||
* | Turn cos(-x) into cos(x). Patch by Alexander Malyshev! | Nick Lewycky | 2011-12-27 | 1 | -0/+14 | |
| | | | | llvm-svn: 147291 | |||||
* | Give string constants generated by IRBuilder private linkage. | Benjamin Kramer | 2011-12-22 | 1 | -1/+1 | |
| | | | | | | Fixes PR11640. llvm-svn: 147144 | |||||
* | Only replace fwrite with fputc, if the return value is unused. | Joerg Sonnenberger | 2011-12-12 | 1 | -0/+13 | |
| | | | | llvm-svn: 146411 | |||||
* | Add support for custom names for library functions in TargetLibraryInfo. ↵ | Eli Friedman | 2011-11-17 | 1 | -0/+30 | |
| | | | | | | | | | | Add a custom name for fwrite and fputs on x86-32 OSX. Make SimplifyLibCalls honor the custom names for fwrite and fputs. Fixes <rdar://problem/9815881>. llvm-svn: 144876 | |||||
* | SimplifyLibCalls: Use IRBuilder.CreateGlobalString when creating a string ↵ | Benjamin Kramer | 2011-10-29 | 1 | -2/+3 | |
| | | | | | | | | for printf->puts, which correctly sets the unnamed_addr bit on the resulting GlobalVariable. Fixes PR11264. llvm-svn: 143289 | |||||
* | "@string = constant i8 0" is a value i8* string of length zero. Analyze that | Nick Lewycky | 2011-10-20 | 1 | -0/+6 | |
| | | | | | | correctly in GetStringLength, fixing PR11181! llvm-svn: 142558 | |||||
* | Fixed quoting on default data layout option. | Lang Hames | 2011-10-17 | 1 | -1/+1 | |
| | | | | llvm-svn: 142286 | |||||
* | PR11061: Make simplifylibcalls fold strcmp("", x) correctly. | Eli Friedman | 2011-10-05 | 2 | -44/+124 | |
| | | | | | | While I'm here, fix the related issue with strncmp, add some actual tests for strcmp and strncmp, and start using StringRef::compare for constant folding instead of using strcmp/strncmp so that the optimized IR isn't dependent on the host's implementation of strcmp. llvm-svn: 141227 | |||||
* | Stop emitting instructions with the name "tmp" they eat up memory and have ↵ | Benjamin Kramer | 2011-09-27 | 1 | -6/+6 | |
| | | | | | | | | to be uniqued, without any benefit. If someone prefers %tmp42 to %42, run instnamer. llvm-svn: 140634 | |||||
* | Move "atomic" and "volatile" designations on instructions after the opcode | Eli Friedman | 2011-08-12 | 1 | -11/+11 | |
| | | | | | | | | | | of the instruction. Note that this change affects the existing non-atomic load and store instructions; the parser now accepts both forms, and the change is noted in the release notes. llvm-svn: 137527 | |||||
* | rip out a ton of intrinsic modernization logic from AutoUpgrade.cpp, which is | Chris Lattner | 2011-06-18 | 1 | -11/+10 | |
| | | | | | | | | | for pre-2.9 bitcode files. We keep x86 unaligned loads, movnt, crc32, and the target indep prefetch change. As usual, updating the testsuite is a PITA. llvm-svn: 133337 | |||||
* | Preserve line number information while simplifying libcalls. | Devang Patel | 2011-03-09 | 1 | -0/+24 | |
| | | | | llvm-svn: 127362 | |||||
* | Optimize fprintf -> iprintf if there are no floating point arguments | Richard Osborne | 2011-03-03 | 1 | -0/+21 | |
| | | | | | | and siprintf is available on the target. llvm-svn: 126940 | |||||
* | Optimize sprintf -> siprintf if there are no floating point arguments | Richard Osborne | 2011-03-03 | 1 | -0/+21 | |
| | | | | | | and siprintf is available on the target. llvm-svn: 126937 | |||||
* | Optimize printf -> iprintf if there are no floating point arguments | Richard Osborne | 2011-03-03 | 1 | -0/+29 | |
| | | | | | | | and iprintf is available on the target. Currently iprintf is only marked as being available on the XCore. llvm-svn: 126935 | |||||
* | Delete obsolete test. | Dan Gohman | 2011-02-28 | 1 | -46/+0 | |
| | | | | llvm-svn: 126680 | |||||
* | SimplifyLibCalls: Add missing legalize check on various printf to puts and | Daniel Dunbar | 2011-02-12 | 1 | -7/+20 | |
| | | | | | | putchar transforms, their return values are not compatible. llvm-svn: 125442 | |||||
* | tests: FileCheckize | Daniel Dunbar | 2011-02-12 | 1 | -3/+5 | |
| | | | | llvm-svn: 125441 | |||||
* | Revert r64460. strtol and friends cannot be marked readonly, even with | Dan Gohman | 2010-12-17 | 1 | -1/+1 | |
| | | | | | | | | | a null endptr argument, because they may write to errno. This fixes a seflhost miscompile observed on Linux targets when TBAA was enabled. llvm-svn: 122014 | |||||
* | Add a puts optimization that converts puts() to putchar('\n'). | Anders Carlsson | 2010-11-30 | 1 | -0/+15 | |
| | | | | llvm-svn: 120398 | |||||
* | Fix a typo. | Anders Carlsson | 2010-11-30 | 1 | -1/+1 | |
| | | | | llvm-svn: 120394 | |||||
* | Rename this test to FPuts.ll since it actually tests fputs. | Anders Carlsson | 2010-11-30 | 1 | -0/+0 | |
| | | | | llvm-svn: 120393 | |||||
* | Fix some broken CHECK lines. | Benjamin Kramer | 2010-11-29 | 1 | -1/+1 | |
| | | | | llvm-svn: 120332 | |||||
* | test/Transforms/SimplifyLibCalls/floor.ll: Mark as XFAIL:win32 due to lack ↵ | NAKAMURA Takumi | 2010-10-28 | 1 | -0/+2 | |
| | | | | | | of nearbyintf on MSVC. [PR8466] llvm-svn: 117529 | |||||
* | Add constant folding for strspn and strcspn to SimplifyLibCalls. | Benjamin Kramer | 2010-09-30 | 1 | -0/+41 | |
| | | | | llvm-svn: 115116 | |||||
* | Add strpbrk folding to SimplifyLibCalls. | Benjamin Kramer | 2010-09-29 | 1 | -0/+25 | |
| | | | | llvm-svn: 115111 | |||||
* | Simplify the loop in StrChrOptimizer. FileCheckize test. | Benjamin Kramer | 2010-09-29 | 1 | -14/+14 | |
| | | | | llvm-svn: 115095 | |||||
* | Teach SimplifyLibCalls how to optimize strrchr. | Benjamin Kramer | 2010-09-29 | 1 | -0/+23 | |
| | | | | llvm-svn: 115091 | |||||
* | Make sure that simplify libcalls does not replace a call with one calling | Rafael Espindola | 2010-06-16 | 1 | -0/+16 | |
| | | | | | | convention with a new call with a different calling convention. llvm-svn: 106134 | |||||
* | simplify-libcalls: fold strncmp(x, y, 1) -> memcmp(x, y, 1) | Benjamin Kramer | 2010-06-16 | 1 | -0/+7 | |
| | | | | | | | The memcmp will be optimized further and even the pathological case 'strstr(x, "x") == x' generates optimal code now. llvm-svn: 106097 | |||||
* | simplify-libcalls: fold strstr(a, b) == a -> strncmp(a, b, strlen(b)) == 0 | Benjamin Kramer | 2010-06-15 | 1 | -0/+12 | |
| | | | | llvm-svn: 106047 | |||||
* | The memcpy intrinsic only takes i8* for %src and %dst, so cast them to that | Nick Lewycky | 2010-05-31 | 1 | -0/+20 | |
| | | | | | | first. Fixes PR7265. llvm-svn: 105206 | |||||
* | Properly promote operands when optimizing a single-character memcmp. | Benjamin Kramer | 2010-05-25 | 1 | -1/+13 | |
| | | | | llvm-svn: 104648 | |||||
* | Reapply address space patch after fixing an issue in MemCopyOptimizer. | Mon P Wang | 2010-04-04 | 1 | -1/+1 | |
| | | | | | | | Added support for address spaces and added a isVolatile field to memcpy, memmove, and memset, e.g., llvm.memcpy.i32(i8*, i8*, i32, i32) -> llvm.memcpy.p0i8.p0i8.i32(i8*, i8*, i32, i32, i1) llvm-svn: 100304 | |||||
* | Revert r100191 since it breaks objc in clang | Mon P Wang | 2010-04-02 | 1 | -1/+1 | |
| | | | | llvm-svn: 100199 | |||||
* | Reapply address space patch after fixing an issue in MemCopyOptimizer. | Mon P Wang | 2010-04-02 | 1 | -1/+1 | |
| | | | | | | | Added support for address spaces and added a isVolatile field to memcpy, memmove, and memset, e.g., llvm.memcpy.i32(i8*, i8*, i32, i32) -> llvm.memcpy.p0i8.p0i8.i32(i8*, i8*, i32, i32, i1) llvm-svn: 100191 | |||||
* | Revert Mon Ping's change 99928, since it broke all the llvm-gcc buildbots. | Bob Wilson | 2010-03-30 | 1 | -1/+1 | |
| | | | | llvm-svn: 99948 | |||||
* | Added support for address spaces and added a isVolatile field to memcpy, ↵ | Mon P Wang | 2010-03-30 | 1 | -1/+1 | |
| | | | | | | | | | memmove, and memset, e.g., llvm.memcpy.i32(i8*, i8*, i32, i32) -> llvm.memcpy.p0i8.p0i8.i32(i8*, i8*, i32, i32, i1) A update of langref will occur in a subsequent checkin. llvm-svn: 99928 | |||||
* | Teach simplify libcall to transform __strcpy_chk to __memcpy_chk to enable ↵ | Evan Cheng | 2010-03-23 | 1 | -20/+27 | |
| | | | | | | optimizations down stream. llvm-svn: 99282 | |||||
* | Migrate _chk call lowering from SimplifyLibCalls to InstCombine. Stub | Eric Christopher | 2010-03-06 | 2 | -30/+0 | |
| | | | | | | | | out the remainder of the calls that we should lower in some way and move the tests to the new correct directory. Fix up tests that are now optimized more than they were before by -instcombine. llvm-svn: 97875 | |||||
* | Safely turn memset_chk etc. to non-chk variant if the known object size is ↵ | Evan Cheng | 2010-03-05 | 1 | -0/+18 | |
| | | | | | | >= memset / memcpy / memmove size. llvm-svn: 97828 | |||||
* | Recommit this, looks like it wasn't the cause. | Eric Christopher | 2010-02-03 | 1 | -0/+12 | |
| | | | | llvm-svn: 95165 | |||||
* | Hopefully temporarily revert this. | Eric Christopher | 2010-02-02 | 1 | -12/+0 | |
| | | | | llvm-svn: 95154 | |||||
* | Re-add strcmp and known size object size checking optimization. | Eric Christopher | 2010-02-02 | 1 | -0/+12 | |
| | | | | | | Passed bootstrap and nightly test run here. llvm-svn: 95145 | |||||
* | Revert my last couple of patches. They appear to have broken bison. | Eric Christopher | 2010-01-29 | 1 | -12/+0 | |
| | | | | llvm-svn: 94841 | |||||
* | Make strcpy_chk lower to strcpy if we have a safe size. | Eric Christopher | 2010-01-29 | 1 | -0/+12 | |
| | | | | llvm-svn: 94783 |