summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* use ArgOperand APIGabor Greif2010-06-241-75/+75
| | | | llvm-svn: 106731
* Make sure that simplify libcalls does not replace a call with one callingRafael Espindola2010-06-161-0/+5
| | | | | | 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 Kramer2010-06-161-0/+3
| | | | | | | 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)) == 0Benjamin Kramer2010-06-151-0/+31
| | | | llvm-svn: 106047
* Kill unneeded SExt.Benjamin Kramer2010-05-261-1/+1
| | | | llvm-svn: 104692
* Properly promote operands when optimizing a single-character memcmp.Benjamin Kramer2010-05-251-3/+6
| | | | llvm-svn: 104648
* Revert 101465, it broke internal OpenGL testing.Eric Christopher2010-04-161-75/+75
| | | | | | | Probably the best way to know that all getOperand() calls have been handled is to replace that API instead of updating. llvm-svn: 101579
* reapply r101434Gabor Greif2010-04-161-75/+75
| | | | | | | | | | | | | with a fix for self-hosting rotate CallInst operands, i.e. move callee to the back of the operand array the motivation for this patch are laid out in my mail to llvm-commits: more efficient access to operands and callee, faster callgraph-construction, smaller compiler binary llvm-svn: 101465
* back out r101423 and r101397, they break llvm-gcc self-host on darwin10Gabor Greif2010-04-161-75/+75
| | | | llvm-svn: 101434
* reapply r101364, which has been backed out in r101368Gabor Greif2010-04-151-75/+75
| | | | | | | | | | | | | with a fix rotate CallInst operands, i.e. move callee to the back of the operand array the motivation for this patch are laid out in my mail to llvm-commits: more efficient access to operands and callee, faster callgraph-construction, smaller compiler binary llvm-svn: 101397
* back out r101364, as it trips the linux nightlybot on some clang C++ testsGabor Greif2010-04-151-75/+75
| | | | llvm-svn: 101368
* rotate CallInst operands, i.e. move callee to the backGabor Greif2010-04-151-75/+75
| | | | | | | | | | of the operand array the motivation for this patch are laid out in my mail to llvm-commits: more efficient access to operands and callee, faster callgraph-construction, smaller compiler binary llvm-svn: 101364
* Reapply address space patch after fixing an issue in MemCopyOptimizer.Mon P Wang2010-04-041-13/+16
| | | | | | | 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 Wang2010-04-021-16/+13
| | | | llvm-svn: 100199
* Reapply address space patch after fixing an issue in MemCopyOptimizer.Mon P Wang2010-04-021-13/+16
| | | | | | | 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 Wilson2010-03-301-16/+13
| | | | llvm-svn: 99948
* Added support for address spaces and added a isVolatile field to memcpy, ↵Mon P Wang2010-03-301-13/+16
| | | | | | | | | 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
* Move OptChkCall off LibCallOptimization into StrCpyOpt.Evan Cheng2010-03-241-7/+6
| | | | llvm-svn: 99418
* Teach simplify libcall to transform __strcpy_chk to __memcpy_chk to enable ↵Evan Cheng2010-03-231-5/+20
| | | | | | optimizations down stream. llvm-svn: 99282
* str[r]chr returns its pointer argument so we cannot mark it as nocapture. ↵Benjamin Kramer2010-03-161-1/+0
| | | | | | Thanks to Duncan for spotting my mistake. llvm-svn: 98671
* Mark str[r]chr readonly.Benjamin Kramer2010-03-161-1/+10
| | | | llvm-svn: 98663
* Migrate _chk call lowering from SimplifyLibCalls to InstCombine. StubEric Christopher2010-03-061-134/+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
* Move SimplifyLibCalls's LibCall builders to a separate file so theyEric Christopher2010-03-051-386/+33
| | | | | | | | can be used in more places. Add an argument for the TargetData that most of them need. Update for the getInt8PtrTy() change. Should be no functionality change. llvm-svn: 97844
* Safely turn memset_chk etc. to non-chk variant if the known object size is ↵Evan Cheng2010-03-051-13/+19
| | | | | | >= memset / memcpy / memmove size. llvm-svn: 97828
* Move GetStringLength and helper from SimplifyLibCalls to ValueTracking.Eric Christopher2010-03-051-124/+0
| | | | | | No functionality change. llvm-svn: 97793
* There are two ways of checking for a given type, for example isa<PointerType>(T)Duncan Sands2010-02-161-159/+159
| | | | | | | and T->isPointerTy(). Convert most instances of the first form to the second form. Requested by Chris. llvm-svn: 96344
* Uniformize the names of type predicates: rather than having isFloatTy andDuncan Sands2010-02-151-11/+11
| | | | | | isInteger, we now have isFloatTy and isIntegerTy. Requested by Chris! llvm-svn: 96223
* Recommit this, looks like it wasn't the cause.Eric Christopher2010-02-031-2/+7
| | | | llvm-svn: 95165
* Hopefully temporarily revert this.Eric Christopher2010-02-021-7/+2
| | | | llvm-svn: 95154
* Re-add strcmp and known size object size checking optimization.Eric Christopher2010-02-021-2/+7
| | | | | | Passed bootstrap and nightly test run here. llvm-svn: 95145
* Don't need to check the last argument since it'll always be bool. We alsoEric Christopher2010-02-021-5/+1
| | | | | | don't use TargetData here. llvm-svn: 95040
* More indentation/tabification fixes.Eric Christopher2010-02-021-13/+13
| | | | llvm-svn: 95036
* Untabify previous commit.Eric Christopher2010-02-021-3/+3
| | | | llvm-svn: 95035
* Formatting.Eric Christopher2010-02-011-3/+3
| | | | llvm-svn: 95027
* Revert my last couple of patches. They appear to have broken bison.Eric Christopher2010-01-291-7/+5
| | | | llvm-svn: 94841
* Make strcpy_chk lower to strcpy if we have a safe size.Eric Christopher2010-01-291-5/+7
| | | | llvm-svn: 94783
* Reapply 94059 while fixing the calling convention setupEric Christopher2010-01-231-0/+47
| | | | | | for strcpy. llvm-svn: 94287
* Revert 94059. It is breaking the MultiSource/Benchmarks/Prolangs-C/bisonBob Wilson2010-01-221-45/+0
| | | | | | test on ARM. llvm-svn: 94198
* 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
OpenPOWER on IntegriCloud