summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* use ArgOperand APIGabor Greif2010-06-281-12/+12
| | | | llvm-svn: 107017
* use ArgOperand API (some hunks I could split)Gabor Greif2010-06-251-13/+13
| | | | llvm-svn: 106824
* use (even more, still) ArgOperand APIGabor Greif2010-06-241-8/+8
| | | | llvm-svn: 106750
* use (even more) ArgOperand APIGabor Greif2010-06-241-5/+5
| | | | llvm-svn: 106744
* use ArgOperand APIGabor Greif2010-06-241-6/+5
| | | | llvm-svn: 106743
* use ArgOperand APIGabor Greif2010-06-241-31/+30
| | | | llvm-svn: 106740
* Teach instCombine to remove malloc+free if malloc's only uses are comparisonsDuncan Sands2010-05-271-0/+2
| | | | | | to null. Patch by Matti Niemenmaa. llvm-svn: 104871
* further clarify alignment of globals, fix instcombineChris Lattner2010-04-281-17/+20
| | | | | | | to not increase the alignment of globals with an assigned alignment and section. llvm-svn: 102476
* use abstract accessors to CallInstGabor Greif2010-04-201-2/+2
| | | | llvm-svn: 101899
* Revert 101465, it broke internal OpenGL testing.Eric Christopher2010-04-161-78/+81
| | | | | | | 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-81/+78
| | | | | | | | | | | | | 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-78/+81
| | | | llvm-svn: 101434
* reapply r101364, which has been backed out in r101368Gabor Greif2010-04-151-81/+78
| | | | | | | | | | | | | 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-78/+81
| | | | llvm-svn: 101368
* rotate CallInst operands, i.e. move callee to the backGabor Greif2010-04-151-81/+78
| | | | | | | | | | 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-11/+21
| | | | | | | 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-21/+11
| | | | llvm-svn: 100199
* Reapply address space patch after fixing an issue in MemCopyOptimizer.Mon P Wang2010-04-021-11/+21
| | | | | | | 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-21/+11
| | | | llvm-svn: 99948
* Added support for address spaces and added a isVolatile field to memcpy, ↵Mon P Wang2010-03-301-11/+21
| | | | | | | | | 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
* Fix an incorrect logic causing instcombine to miss some _chk -> non-chk ↵Evan Cheng2010-03-231-1/+1
| | | | | | transformations. llvm-svn: 99263
* Add a setCalledFunction member to InvokeInst (like in CallInst)Gabor Greif2010-03-201-1/+1
| | | | | | | and use this (as well as getCalledValue) to access the callee, instead of {g|s}etOperand(0). llvm-svn: 99084
* Factor checked library call optimization into a common helper class and use itBenjamin Kramer2010-03-121-104/+28
| | | | | | to unify the almost identical code in CodeGenPrepare and InstCombineCalls. llvm-svn: 98338
* stpcpy is so similar to strcpy, it doesn't deserve a complete copy of the ↵Benjamin Kramer2010-03-111-22/+5
| | | | | | __strcpy_chk -> strcpy code. llvm-svn: 98284
* Lower stpcpy_chk when possible.Eric Christopher2010-03-111-0/+13
| | | | llvm-svn: 98274
* Add strncpy libcall creator. Use it when it should be used.Eric Christopher2010-03-111-1/+2
| | | | llvm-svn: 98219
* Re-commit 97860 with fix. getMallocAllocatedType may return null.Evan Cheng2010-03-081-0/+10
| | | | llvm-svn: 98000
* Let the fallthrough handle whether or not we've changed anythingEric Christopher2010-03-061-1/+3
| | | | | | before we try to optimize. llvm-svn: 97876
* Migrate _chk call lowering from SimplifyLibCalls to InstCombine. StubEric Christopher2010-03-061-2/+127
| | | | | | | | 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
* Temporarily revert:Eric Christopher2010-03-061-10/+0
| | | | | | | | | | | | | Log: Transform @llvm.objectsize to integer if the argument is a result of malloc of known size. Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp llvm/trunk/test/Transforms/InstCombine/objsize.ll It appears to be causing swb and nightly test failures. llvm-svn: 97866
* Transform @llvm.objectsize to integer if the argument is a result of malloc ↵Evan Cheng2010-03-061-0/+10
| | | | | | of known size. llvm-svn: 97860
* Instcombine should turn llvm.objectsize of a alloca with static size to an ↵Evan Cheng2010-03-051-9/+22
| | | | | | integer. llvm-svn: 97827
* Add missing break for Intrinsic::objectsize case. It was falling through to ↵Evan Cheng2010-03-051-0/+1
| | | | | | the following Intrinsic::bswap code. I have no idea why it wasn't breaking stuff. llvm-svn: 97774
* Instcombine constant folding can normalize gep with negative index to index ↵Evan Cheng2010-02-221-4/+9
| | | | | | with large offset. When instcombine objsize checking transformation sees these geps where the offset seemingly point out of bound, it should just return "i don't know" rather than asserting. llvm-svn: 96825
* There are two ways of checking for a given type, for example isa<PointerType>(T)Duncan Sands2010-02-161-5/+5
| | | | | | | 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-1/+1
| | | | | | isInteger, we now have isFloatTy and isIntegerTy. Requested by Chris! llvm-svn: 96223
* Fix a problem where we had bitcasted operands that gave usEric Christopher2010-02-131-5/+9
| | | | | | | odd offsets since the bitcasted pointer size and the offset pointer size are going to be different types for the GEP vs base object. llvm-svn: 96134
* Make sure that ConstantExpr offsets also aren't off of externEric Christopher2010-02-111-2/+8
| | | | | | | | symbols. Thanks to Duncan Sands for the testcase! llvm-svn: 95877
* Add ConstantExpr handling to Intrinsic::objectsize lowering.Eric Christopher2010-02-111-1/+26
| | | | | | | Update testcase accordingly now that we can optimize another section. llvm-svn: 95846
* Move Intrinsic::objectsize lowering back to InstCombineCalls andEric Christopher2010-02-091-1/+19
| | | | | | enable constant 0 offset lowering. llvm-svn: 95691
* Remove this code for now. I have a better idea and will rewrite withEric Christopher2010-02-051-41/+0
| | | | | | that in mind. llvm-svn: 95402
* Temporarily revert this since it appears to have caused a buildEric Christopher2010-02-041-49/+23
| | | | | | failure. llvm-svn: 95294
* Rework constant expr and array handling for objectsize instcombining.Eric Christopher2010-02-041-23/+49
| | | | | | | | | | Fix bugs where we would compute out of bounds as in bounds, and where we couldn't know that the linker could override the size of an array. Add a few new testcases, change existing testcase to use a private global array instead of extern. llvm-svn: 95283
* If we're dealing with a zero-length array, don't lower to anyEric Christopher2010-02-031-4/+9
| | | | | | particular size, we just don't know what the length is yet. llvm-svn: 95266
* Recommit this, looks like it wasn't the cause.Eric Christopher2010-02-031-68/+93
| | | | llvm-svn: 95165
* Hopefully temporarily revert this.Eric Christopher2010-02-021-93/+68
| | | | llvm-svn: 95154
* Reformat my last patch slightly.Eric Christopher2010-02-021-4/+4
| | | | llvm-svn: 95147
* Re-add strcmp and known size object size checking optimization.Eric Christopher2010-02-021-10/+34
| | | | | | Passed bootstrap and nightly test run here. llvm-svn: 95145
* fix rdar://7590304, a miscompilation of objc apps on arm. The callerChris Lattner2010-02-011-3/+7
| | | | | | | | | of objc message send was getting marked arm_apcscc, but the prototype isn't. This is fine at runtime because objcmsgsend is implemented in assembly. Only turn a mismatched caller and callee into 'unreachable' if the callee is a definition. llvm-svn: 94986
* fix rdar://7590304, an infinite loop in instcombine. In the invokeChris Lattner2010-02-011-1/+6
| | | | | | | | | | | | | case, instcombine can't zap the invoke for fear of changing the CFG. However, we have to do something to prevent the next iteration of instcombine from inserting another store -> undef before the invoke thereby getting into infinite iteration between dead store elim and store insertion. Just zap the callee to null, which will prevent the next iteration from doing anything. llvm-svn: 94985
OpenPOWER on IntegriCloud