summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/InstCombine
Commit message (Collapse)AuthorAgeFilesLines
* use getArgOperand (corrected by CallInst::ArgOffset) instead of getOperandGabor Greif2010-06-301-3/+3
| | | | llvm-svn: 107275
* use ArgOperand APIGabor Greif2010-06-281-12/+12
| | | | llvm-svn: 107017
* use ArgOperand APIGabor Greif2010-06-281-4/+4
| | | | llvm-svn: 107016
* use ArgOperand API (some hunks I could split)Gabor Greif2010-06-251-13/+13
| | | | llvm-svn: 106824
* use ArgOperand APIGabor Greif2010-06-241-3/+3
| | | | llvm-svn: 106752
* 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
* use ArgOperand APIGabor Greif2010-06-241-4/+4
| | | | llvm-svn: 106737
* use ArgOperand API, also tighten the type of visitFree to make this work out ↵Gabor Greif2010-06-242-7/+7
| | | | | | smoothly llvm-svn: 106736
* use ArgOperand APIGabor Greif2010-06-241-1/+1
| | | | llvm-svn: 106707
* Move FindAvailableLoadedValue isSafeToLoadUnconditionally out ofDan Gohman2010-05-281-0/+1
| | | | | | | lib/Transforms/Utils and into lib/Analysis so that Analysis passes can use them. llvm-svn: 104949
* Teach instcombine to promote alloca array sizes.Dan Gohman2010-05-281-0/+12
| | | | llvm-svn: 104945
* Fix instcombine's handling of alloca to accept non-i32 types.Dan Gohman2010-05-281-8/+7
| | | | llvm-svn: 104935
* Teach instCombine to remove malloc+free if malloc's only uses are comparisonsDuncan Sands2010-05-274-46/+49
| | | | | | to null. Patch by Matti Niemenmaa. llvm-svn: 104871
* Fix a missing newline in debug output.Dan Gohman2010-05-251-1/+1
| | | | llvm-svn: 104644
* I got tired of VISIBILITY_HIDDEN colliding with the gcc enum. Rename itDuncan Sands2010-05-112-3/+3
| | | | | | | to LLVM_LIBRARY_VISIBILITY and introduce LLVM_GLOBAL_VISIBILITY, which is the opposite, for future use by dragonegg. llvm-svn: 103495
* Teach instcombine to transform a bitcast/(zext|trunc)/bitcast sequenceChris Lattner2010-05-081-0/+70
| | | | | | | | | | | with a vector input and output into a shuffle vector. This sort of sequence happens when the input code stores with one type and reloads with another type and then SROA promotes to i96 integers, which make everyone sad. This fixes rdar://7896024 llvm-svn: 103354
* 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
* move some select simplifications out out instcombine intoChris Lattner2010-04-201-31/+13
| | | | | | inst simplify. No functionality change. llvm-svn: 101873
* Revert 101465, it broke internal OpenGL testing.Eric Christopher2010-04-165-95/+98
| | | | | | | 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-165-98/+95
| | | | | | | | | | | | | 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-165-95/+98
| | | | llvm-svn: 101434
* reapply r101364, which has been backed out in r101368Gabor Greif2010-04-155-98/+95
| | | | | | | | | | | | | 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-155-95/+98
| | | | llvm-svn: 101368
* rotate CallInst operands, i.e. move callee to the backGabor Greif2010-04-155-98/+95
| | | | | | | | | | 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
* Minor code simplification.Dan Gohman2010-04-091-9/+5
| | | | llvm-svn: 100859
* Add variants of ult, ule, etc. which take a uint64_t RHS, for convenience.Dan Gohman2010-04-081-1/+1
| | | | llvm-svn: 100824
* Say bitcast instead of bitconvert.Dan Gohman2010-04-071-1/+1
| | | | llvm-svn: 100720
* 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-062-2/+128
| | | | | | | | 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
* fix PR6512, a case where instcombine would incorrectly merge loadsChris Lattner2010-03-051-0/+2
| | | | | | from different addr spaces. llvm-svn: 97813
* Fix PR6503. This turned into a much more interesting and nasty bug. Various Chris Lattner2010-03-053-139/+107
| | | | | | | | | | | parts of the cmp|cmp and cmp&cmp folding logic wasn't prepared for vectors (unrelated to the bug but noticed while in the code) and the code was *definitely* not safe to use by the (cast icmp)|(cast icmp) handling logic that I added in r95855. Fix all this up by changing the various routines to more consistently use IRBuilder and not pass in the I which had the wrong type. llvm-svn: 97801
OpenPOWER on IntegriCloud