Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Suppress an unused variable warning when assertions are off; | Duncan Sands | 2010-01-08 | 1 | -2/+3 | |
| | | | | | | remove some trailing whitespace while there. llvm-svn: 93008 | |||||
* | fix an infinite loop in reassociate building emacs. | Chris Lattner | 2010-01-05 | 1 | -0/+4 | |
| | | | | llvm-svn: 92679 | |||||
* | Change errs() to dbgs(). | David Greene | 2010-01-05 | 1 | -15/+15 | |
| | | | | llvm-svn: 92617 | |||||
* | theoretically the negate we find could be in a different function, check | Chris Lattner | 2010-01-02 | 1 | -0/+4 | |
| | | | | | | for this case. llvm-svn: 92425 | |||||
* | When factoring multiply expressions across adds, factor both | Chris Lattner | 2010-01-01 | 1 | -21/+49 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | positive and negative forms of constants together. This allows us to compile: int foo(int x, int y) { return (x-y) + (x-y) + (x-y); } into: _foo: ## @foo subl %esi, %edi leal (%rdi,%rdi,2), %eax ret instead of (where the 3 and -3 were not factored): _foo: imull $-3, 8(%esp), %ecx imull $3, 4(%esp), %eax addl %ecx, %eax ret this started out as: movl 12(%ebp), %ecx imull $3, 8(%ebp), %eax subl %ecx, %eax subl %ecx, %eax subl %ecx, %eax ret This comes from PR5359. llvm-svn: 92381 | |||||
* | clean up some comments. | Chris Lattner | 2010-01-01 | 1 | -13/+13 | |
| | | | | llvm-svn: 92377 | |||||
* | switch from std::map to DenseMap for rank data structures. | Chris Lattner | 2010-01-01 | 1 | -13/+13 | |
| | | | | llvm-svn: 92375 | |||||
* | reuse negates where possible instead of always creating them from scratch. | Chris Lattner | 2009-12-31 | 1 | -1/+30 | |
| | | | | | | | | | | | | | | | | | | | | | This allows us to optimize test12 into: define i32 @test12(i32 %X) { %factor = mul i32 %X, -3 ; <i32> [#uses=1] %Z = add i32 %factor, 6 ; <i32> [#uses=1] ret i32 %Z } instead of: define i32 @test12(i32 %X) { %Y = sub i32 6, %X ; <i32> [#uses=1] %C = sub i32 %Y, %X ; <i32> [#uses=1] %Z = sub i32 %C, %X ; <i32> [#uses=1] ret i32 %Z } llvm-svn: 92373 | |||||
* | we don't need a smallptrset to detect duplicates, the values are | Chris Lattner | 2009-12-31 | 1 | -27/+27 | |
| | | | | | | sorted, so we can just do a linear scan. llvm-svn: 92372 | |||||
* | make reassociate more careful about not leaving around dead mul's | Chris Lattner | 2009-12-31 | 1 | -1/+7 | |
| | | | | llvm-svn: 92370 | |||||
* | remove debug | Chris Lattner | 2009-12-31 | 1 | -1/+1 | |
| | | | | llvm-svn: 92369 | |||||
* | teach reassociate to factor x+x+x -> x*3. While I'm at it, | Chris Lattner | 2009-12-31 | 1 | -22/+70 | |
| | | | | | | fix RemoveDeadBinaryOp to actually do something. llvm-svn: 92368 | |||||
* | change reassociate to use SmallVector for its key datastructures | Chris Lattner | 2009-12-31 | 1 | -15/+18 | |
| | | | | | | instead of std::vector. llvm-svn: 92366 | |||||
* | change an if to an assert, fix comment. | Chris Lattner | 2009-12-31 | 1 | -4/+4 | |
| | | | | llvm-svn: 92364 | |||||
* | move the rest of the add optimization code out to OptimizeAdd, | Chris Lattner | 2009-12-31 | 1 | -93/+94 | |
| | | | | | | improve some comments, simplify a bit of code. llvm-svn: 92363 | |||||
* | factor statistic updating better. | Chris Lattner | 2009-12-31 | 1 | -19/+9 | |
| | | | | llvm-svn: 92362 | |||||
* | simple fix for an incorrect factoring which causes a | Chris Lattner | 2009-12-31 | 1 | -0/+7 | |
| | | | | | | miscompilation, PR5458. llvm-svn: 92354 | |||||
* | factor code out into helper functions. | Chris Lattner | 2009-12-31 | 1 | -88/+109 | |
| | | | | llvm-svn: 92347 | |||||
* | switch some std::vector's to smallvector. Reduce nesting. | Chris Lattner | 2009-12-31 | 1 | -54/+57 | |
| | | | | llvm-svn: 92346 | |||||
* | use more modern datastructures. | Chris Lattner | 2009-12-31 | 1 | -4/+5 | |
| | | | | llvm-svn: 92344 | |||||
* | clean up -debug output. | Chris Lattner | 2009-12-31 | 1 | -3/+4 | |
| | | | | llvm-svn: 92343 | |||||
* | Remove LLVMContext from reassociate. It was threaded through every function but | Nick Lewycky | 2009-11-14 | 1 | -22/+14 | |
| | | | | | | ultimately never used. llvm-svn: 88763 | |||||
* | Make changes to rev 84292 as requested by Chris Lattner. | Victor Hernandez | 2009-10-21 | 1 | -2/+0 | |
| | | | | | | | Most changes are cleanup, but there is 1 correctness fix: I fixed InstCombine so that the icmp is removed only if the malloc call is removed (which requires explicit removal because the Worklist won't DCE any calls since they can have side-effects). llvm-svn: 84772 | |||||
* | Remove MallocInst from LLVM Instructions. | Victor Hernandez | 2009-10-17 | 1 | -1/+1 | |
| | | | | llvm-svn: 84299 | |||||
* | Autoupgrade malloc insts to malloc calls. | Victor Hernandez | 2009-10-17 | 1 | -1/+2 | |
| | | | | | | | | Update testcases that rely on malloc insts being present. Also prematurely remove MallocInst handling from IndMemRemoval and RaiseAllocations to help pass tests in this incremental step. llvm-svn: 84292 | |||||
* | calls are already unmovable, malloc doesn't need a special case. | Chris Lattner | 2009-09-27 | 1 | -2/+1 | |
| | | | | llvm-svn: 82933 | |||||
* | Enhance transform passes so that they apply the same tranforms to malloc ↵ | Victor Hernandez | 2009-09-18 | 1 | -1/+2 | |
| | | | | | | | | calls as to MallocInst. Reviewed by Dan Gohman. llvm-svn: 82300 | |||||
* | eliminate VISIBILITY_HIDDEN from Transforms/Scalar. PR4861 | Chris Lattner | 2009-09-02 | 1 | -3/+2 | |
| | | | | llvm-svn: 80766 | |||||
* | remove the std::ostream version of module and type printing. | Chris Lattner | 2009-08-23 | 1 | -3/+3 | |
| | | | | llvm-svn: 79823 | |||||
* | eliminate the "Value" printing methods that print to a std::ostream. | Chris Lattner | 2009-08-23 | 1 | -13/+14 | |
| | | | | | | This required converting a bunch of stuff off DOUT and other cleanups. llvm-svn: 79819 | |||||
* | Fix debug output to include a newline after printing a Value, now | Dan Gohman | 2009-08-17 | 1 | -7/+7 | |
| | | | | | | that Value's operator<< doesn't include one. llvm-svn: 79240 | |||||
* | Remove a bunch more now-unnecessary Context arguments. | Dan Gohman | 2009-08-12 | 1 | -1/+1 | |
| | | | | llvm-svn: 78809 | |||||
* | Move a few more APIs back to 2.5 forms. The only remaining ones left to ↵ | Owen Anderson | 2009-07-31 | 1 | -7/+5 | |
| | | | | | | | | change back are metadata related, which I'm waiting on to avoid conflicting with Devang. llvm-svn: 77721 | |||||
* | Move more code back to 2.5 APIs. | Owen Anderson | 2009-07-30 | 1 | -3/+3 | |
| | | | | llvm-svn: 77635 | |||||
* | Move ConstantExpr to 2.5 API. | Owen Anderson | 2009-07-29 | 1 | -2/+2 | |
| | | | | llvm-svn: 77494 | |||||
* | Revert the ConstantInt constructors back to their 2.5 forms where possible, ↵ | Owen Anderson | 2009-07-24 | 1 | -1/+1 | |
| | | | | | | thanks to contexts-on-types. More to come. llvm-svn: 77011 | |||||
* | Get rid of the Pass+Context magic. | Owen Anderson | 2009-07-22 | 1 | -17/+22 | |
| | | | | llvm-svn: 76702 | |||||
* | These don't really need contexts either. | Owen Anderson | 2009-07-13 | 1 | -6/+6 | |
| | | | | llvm-svn: 75528 | |||||
* | Move more functionality over to LLVMContext. | Owen Anderson | 2009-07-13 | 1 | -2/+2 | |
| | | | | llvm-svn: 75497 | |||||
* | Begin the painful process of tearing apart the rat'ss nest that is ↵ | Owen Anderson | 2009-07-13 | 1 | -15/+15 | |
| | | | | | | | | | Constants.cpp and ConstantFold.cpp. This involves temporarily hard wiring some parts to use the global context. This isn't ideal, but it's the only way I could figure out to make this process vaguely incremental. llvm-svn: 75445 | |||||
* | "LLVMContext* " --> "LLVMContext *" | Owen Anderson | 2009-07-06 | 1 | -2/+2 | |
| | | | | llvm-svn: 74878 | |||||
* | Even more passes being LLVMContext'd. | Owen Anderson | 2009-07-03 | 1 | -17/+23 | |
| | | | | llvm-svn: 74781 | |||||
* | Make the key of ValueRankMap an AssertingVH, so that we die violently | Chris Lattner | 2009-03-31 | 1 | -6/+7 | |
| | | | | | | if it dangles. llvm-svn: 68150 | |||||
* | This pass keeps a map of Instructions to Rank numbers, | Dale Johannesen | 2009-03-19 | 1 | -8/+14 | |
| | | | | | | | | | and was deleting Instructions without clearing the corresponding map entry. This led to nondeterministic behavior if the same address got allocated to another Instruction within a short time. llvm-svn: 67306 | |||||
* | Don't assign rank numbers to debug intrinsic "calls". | Dale Johannesen | 2009-03-06 | 1 | -1/+3 | |
| | | | | | | This is needed so debug info doesn't change codegen. llvm-svn: 66235 | |||||
* | Fix build failure. | Devang Patel | 2008-11-21 | 1 | -1/+1 | |
| | | | | llvm-svn: 59844 | |||||
* | Silence unused variable warnings. | Devang Patel | 2008-11-21 | 1 | -0/+3 | |
| | | | | llvm-svn: 59841 | |||||
* | Tidy up several unbeseeming casts from pointer to intptr_t. | Dan Gohman | 2008-09-04 | 1 | -1/+1 | |
| | | | | llvm-svn: 55779 | |||||
* | don't use the result of WriteAsOperand | Chris Lattner | 2008-08-19 | 1 | -4/+5 | |
| | | | | llvm-svn: 54979 | |||||
* | API change for {BinaryOperator|CmpInst|CastInst}::create*() --> Create. ↵ | Gabor Greif | 2008-05-16 | 1 | -7/+7 | |
| | | | | | | Legacy interfaces will be in place for some time. (Merge from use-diet branch.) llvm-svn: 51200 |