summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/Reassociate.cpp
Commit message (Collapse)AuthorAgeFilesLines
* For PR950:Reid Spencer2006-10-261-1/+3
| | | | | | | | Make necessary changes to support DIV -> [SUF]Div. This changes llvm to have three division instructions: signed, unsigned, floating point. The bytecode and assembler are bacwards compatible, however. llvm-svn: 31195
* For PR950:Reid Spencer2006-10-201-1/+1
| | | | | | | | This patch implements the first increment for the Signless Types feature. All changes pertain to removing the ConstantSInt and ConstantUInt classes in favor of just using ConstantInt. llvm-svn: 31063
* eliminate RegisterOpt. It does the same thing as RegisterPass.Chris Lattner2006-08-271-1/+1
| | | | llvm-svn: 29925
* Fix Transforms/Reassociate/2006-04-27-ReassociateVector.llChris Lattner2006-04-281-2/+3
| | | | llvm-svn: 28007
* Implement a FIXME, recusively reassociatingChris Lattner2006-03-141-26/+65
| | | | | | | | A*A*B + A*A*C --> A*(A*B+A*C) --> A*(A*(B+C)) This implements Reassociate/mul-factor3.ll llvm-svn: 26757
* extract some code into a method, no functionality changeChris Lattner2006-03-141-50/+56
| | | | llvm-svn: 26755
* Promote shifts by a constant to multiplies so that we can reassociateChris Lattner2006-03-141-13/+17
| | | | | | | (x<<1)+(y<<1) -> (X+Y)<<1. This implements Transforms/Reassociate/shift-factor.ll llvm-svn: 26753
* Add factoring of multiplications, e.g. turning A*A+A*B into A*(A+B).Chris Lattner2006-03-041-49/+186
| | | | | | Testcase here: Transforms/Reassociate/mulfactor.ll llvm-svn: 26524
* Make iostream #inclusion explicitChris Lattner2006-01-221-0/+1
| | | | llvm-svn: 25514
* Fix a problem that Dan Berlin noticed, where reassociation would not succeedChris Lattner2005-09-021-0/+6
| | | | | | | | | | | | | | | | | | in building maximal expressions before simplifying them. In particular, i cases like this: X-(A+B+X) the code would consider A+B+X to be a maximal expression (not understanding that the single use '-' would be turned into a + later), simplify it (a noop) then later get simplified again. Each of these simplify steps is where the cost of reassociation comes from, so this patch should speed up the already fast pass a bit. Thanks to Dan for noticing this! llvm-svn: 23214
* Avoid creating garbage instructions, just move the old add instructionChris Lattner2005-09-021-9/+11
| | | | | | to where we need it when converting -(A+B+C) -> -A + -B + -C. llvm-svn: 23213
* add some assertions and fix problems where reassociate could access theChris Lattner2005-09-021-2/+11
| | | | | | Ops vector out of range llvm-svn: 23211
* Fix Regression/Transforms/Reassociate/2005-08-24-Crash.llChris Lattner2005-08-241-1/+7
| | | | llvm-svn: 23019
* Use the new 'moveBefore' method to simplify some code. Really, which isChris Lattner2005-08-081-3/+2
| | | | | | easier to understand? :) llvm-svn: 22706
* Eliminate all remaining tabs and trailing spaces.Jeff Cohen2005-07-271-10/+10
| | | | llvm-svn: 22523
* Fix Reassociate/shifttest.llChris Lattner2005-05-101-6/+7
| | | | llvm-svn: 21839
* Implement Reassociate/mul-neg-add.llChris Lattner2005-05-081-0/+12
| | | | llvm-svn: 21788
* Bail out earlierChris Lattner2005-05-081-4/+4
| | | | llvm-svn: 21786
* Teach reassociate that 0-X === X*-1Chris Lattner2005-05-081-4/+46
| | | | llvm-svn: 21785
* Fix PR557 and basictest[34].ll.Chris Lattner2005-05-081-12/+27
| | | | | | | | This makes reassociate realize that loads should be treated as unmovable, and gives distinct ranks to distinct values defined in the same basic block, allowing reassociate to do its thing. llvm-svn: 21783
* Add debugging informationChris Lattner2005-05-081-0/+18
| | | | llvm-svn: 21781
* eliminate gotosChris Lattner2005-05-081-3/+4
| | | | llvm-svn: 21780
* Improve reassociation handling of inverses, implementing inverses.ll.Chris Lattner2005-05-081-2/+104
| | | | llvm-svn: 21778
* Refactor some codeChris Lattner2005-05-081-45/+55
| | | | llvm-svn: 21772
* Handle some simple cases where we can see that values get annihilated.Chris Lattner2005-05-081-7/+42
| | | | llvm-svn: 21771
* Rewrite the guts of the reassociate pass to be more efficient and logical. ↵Chris Lattner2005-05-071-103/+185
| | | | | | | | | Instead of trying to do local reassociation tweaks at each level, only process an expression tree once (at its root). This does not improve the reassociation pass in any real way. llvm-svn: 21768
* Convert shifts to muls to assist reassociation. This implementsChris Lattner2005-05-071-2/+27
| | | | | | Reassociate/shifttest.ll llvm-svn: 21761
* Simplify the code and rearrange it. No major functionality changes here.Chris Lattner2005-05-071-62/+82
| | | | llvm-svn: 21759
* Remove trailing whitespaceMisha Brukman2005-04-211-5/+5
| | | | llvm-svn: 21427
* This mega patch converts us from using Function::a{iterator|begin|end} toChris Lattner2005-03-151-1/+1
| | | | | | | | using Function::arg_{iterator|begin|end}. Likewise Module::g* -> Module::global_*. This patch is contributed by Gabor Greif, thanks! llvm-svn: 20597
* Changes For Bug 352Reid Spencer2004-09-011-3/+3
| | | | | | | | Move include/Config and include/Support into include/llvm/Config, include/llvm/ADT and include/llvm/Support. From here on out, all LLVM public header files must be under include/llvm/. llvm-svn: 16137
* Fix #includes of i*.h => Instructions.h as per PR403.Misha Brukman2004-07-291-1/+1
| | | | llvm-svn: 15328
* Fixes working towards PR341Chris Lattner2004-07-151-4/+4
| | | | llvm-svn: 14839
* Make this pass use a more specific debug message than "Processing:".Brian Gaeke2004-07-011-1/+1
| | | | llvm-svn: 14541
* Finegrainify namespacificationChris Lattner2004-01-091-4/+2
| | | | llvm-svn: 10725
* Put all LLVM code into the llvm namespace, as per bug 109.Brian Gaeke2003-11-111-0/+5
| | | | llvm-svn: 9903
* Declare FunctionPasses as such so that they can be used in FunctionPassManager.Misha Brukman2003-11-071-1/+1
| | | | llvm-svn: 9768
* Added LLVM project notice to the top of every C++ source file.John Criswell2003-10-201-0/+7
| | | | | | Header files will be on the way. llvm-svn: 9298
* Change the Opcode enum for PHI nodes from "Instruction::PHINode" to ↵Chris Lattner2003-10-191-1/+1
| | | | | | "Instruction::PHI" to be more consistent with the other instructions. llvm-svn: 9269
* Decrease usage of use_size()Chris Lattner2003-10-151-3/+3
| | | | llvm-svn: 9135
* Credits now go into the top-level CREDITS.TXTMisha Brukman2003-09-221-3/+0
| | | | llvm-svn: 8662
* Spell `necessary' correctly.Misha Brukman2003-08-181-1/+1
| | | | llvm-svn: 7944
* Assign arguments different ranks so they get grouped togetherChris Lattner2003-08-131-4/+10
| | | | llvm-svn: 7813
* Fix bug: Reassociate/2003-08-12-InfiniteLoop.llChris Lattner2003-08-121-5/+6
| | | | llvm-svn: 7792
* Assign finer grained ranks, make sure to reassociate top-level after ↵Chris Lattner2003-08-121-7/+11
| | | | | | reassociating bottom level llvm-svn: 7787
* DEBUG got moved to Support/Debug.hChris Lattner2003-08-011-0/+1
| | | | llvm-svn: 7492
* Fix spellingChris Lattner2003-05-021-1/+1
| | | | llvm-svn: 5983
* Remove unnecesary &*'sChris Lattner2003-04-231-1/+1
| | | | llvm-svn: 5872
* Rename Instruction::hasSideEffects() -> mayWriteToMemory()Chris Lattner2003-02-241-1/+1
| | | | llvm-svn: 5620
* Fix a huge performance problem in reassociate by introducing aChris Lattner2002-12-151-1/+7
| | | | | | rank map cache for instruction ranks llvm-svn: 5030
OpenPOWER on IntegriCloud