summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Revert my last couple of patches. They appear to have broken bison.Eric Christopher2010-01-291-36/+10
| | | | llvm-svn: 94841
* Add constant support to object size handling and remove defaultEric Christopher2010-01-291-10/+36
| | | | | | | | | lowering. We'll either figure it out, or not and be lowered by SelectionDAGBuild. Add test. llvm-svn: 94775
* Remove unnecessary dyn_cast and add a comment. Part of a WIP.Eric Christopher2010-01-081-4/+4
| | | | llvm-svn: 93026
* Move the object size intrinsic optimization to inst-combine and makeEric Christopher2010-01-061-0/+12
| | | | | | it work for any integer size return type. llvm-svn: 92853
* Move remaining stuff to the isInteger predicate.Benjamin Kramer2010-01-051-1/+1
| | | | llvm-svn: 92771
* split call handling out to InstCombineCalls.cppChris Lattner2010-01-051-0/+1130
llvm-svn: 92707
OpenPOWER on IntegriCloud