summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/Reassociate.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Clean up the use of static and anonymous namespaces. This turned upDan Gohman2008-05-131-4/+4
| | | | | | | several things that were neither in an anonymous namespace nor static but not intended to be global. llvm-svn: 51017
* Don't include <map> in Pass.h, which doesn't need it. This requiresDan Gohman2008-03-211-0/+1
| | | | | | adding <map> to many files that actually do need it. llvm-svn: 48667
* simplify some code, BreakUpSubtract always returns nonnull now.Chris Lattner2008-02-181-4/+2
| | | | llvm-svn: 47251
* fix pastoChris Lattner2008-02-171-1/+1
| | | | llvm-svn: 47242
* Split up subtracts into add+negate if they have a reassociable use or operandChris Lattner2008-02-171-5/+8
| | | | | | that is also a subtract. This implements PR2047 and Transforms/Reassociate/subtest2.ll llvm-svn: 47241
* make the logic for breaking up subtracts more explicit, no Chris Lattner2008-02-171-9/+22
| | | | | | functionality change. llvm-svn: 47239
* Use empty() instead of comparing size() with zero.Dan Gohman2008-01-291-1/+1
| | | | llvm-svn: 46514
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45418
* Fix typo in comment.Nick Lewycky2007-05-061-1/+1
| | | | llvm-svn: 36873
* Drop 'const'Devang Patel2007-05-031-2/+2
| | | | llvm-svn: 36662
* Use 'static const char' instead of 'static const int'.Devang Patel2007-05-021-2/+2
| | | | | | | Due to darwin gcc bug, one version of darwin linker coalesces static const int, which defauts PassID based pass identification. llvm-svn: 36652
* Do not use typeinfo to identify pass in pass manager.Devang Patel2007-05-011-0/+4
| | | | llvm-svn: 36632
* Prefer non-virtual calls to ConstantInt::isZero over virtual calls toReid Spencer2007-03-021-4/+4
| | | | | | Constant::isNullValue() in situations where it is possible. llvm-svn: 34821
* Use isUnitValue() instead of getZExtValue() == 1 which will prevent anReid Spencer2007-03-011-1/+1
| | | | | | assert if the ConstantInt's value is large. llvm-svn: 34814
* For PR1195:Reid Spencer2007-02-151-1/+1
| | | | | | | Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and PackedTyID -> VectorTyID. No functional changes. llvm-svn: 34293
* Simplify code by using value::takenameChris Lattner2007-02-111-8/+6
| | | | llvm-svn: 34176
* Apply the VISIBILITY_HIDDEN field to the remaining anonymous classes inReid Spencer2007-02-051-2/+3
| | | | | | | the Transforms library. This reduces debug library size by 132 KB, debug binary size by 376 KB, and reduces link time for llvm tools slightly. llvm-svn: 33939
* For PR970:Reid Spencer2007-01-211-28/+24
| | | | | | | Clean up handling of isFloatingPoint() and dealing with PackedType. Patch by Gordon Henriksen! llvm-svn: 33415
* rename Type::isIntegral to Type::isInteger, eliminating the old Type::isInteger.Chris Lattner2007-01-151-1/+1
| | | | | | | | | rename Type::getIntegralTypeMask to Type::getIntegerTypeMask. This makes naming much more consistent. For example, there are now no longer any instances of IntegerType that are not considered isInteger! :) llvm-svn: 33225
* For PR1043:Zhou Sheng2007-01-111-2/+2
| | | | | | | Merge ConstantIntegral and ConstantBool into ConstantInt. Remove ConstantIntegral and ConstantBool from LLVM. llvm-svn: 33073
* For PR950:Reid Spencer2006-12-231-4/+5
| | | | | | | | This patch removes the SetCC instructions and replaces them with the ICmp and FCmp instructions. The SetCondInst instruction has been removed and been replaced with ICmpInst and FCmpInst. llvm-svn: 32751
* Switch over Transforms/Scalar to use the STATISTIC macro. For each statisticChris Lattner2006-12-191-6/+5
| | | | | | | converted, we lose a static initializer. This also allows GCC to emit warnings about unused statistics. llvm-svn: 32690
* Removing even more <iostream> includes.Bill Wendling2006-12-071-19/+15
| | | | llvm-svn: 32320
* Detemplatize the Statistic class. The only type it is instantiated withChris Lattner2006-12-061-5/+5
| | | | | | is 'unsigned'. llvm-svn: 32279
* Remove the 'printname' argument to WriteAsOperand. It is always true, andChris Lattner2006-12-061-1/+1
| | | | | | passing false would make the asmprinter fail anyway. llvm-svn: 32264
* For PR950:Reid Spencer2006-11-021-1/+3
| | | | | | Replace the REM instruction with UREM, SREM and FREM. llvm-svn: 31369
* 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
OpenPOWER on IntegriCloud