summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/ScalarEvolutionExpander.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Wind SCEV back in time, to Nov 18th. This 'fixes' PR3275, PR3294, PR3295,Nick Lewycky2009-01-131-9/+0
| | | | | | PR3296 and PR3302. llvm-svn: 62160
* Add a new SCEV representing signed division.Nick Lewycky2008-12-021-0/+9
| | | | llvm-svn: 60407
* do not use deprecated interfacesGabor Greif2008-10-131-3/+3
| | | | llvm-svn: 57433
* Expand SCEVUDiv of power of 2 to a lshr instruction.Nick Lewycky2008-07-081-0/+14
| | | | llvm-svn: 53217
* Use SCEVAddRecExpr::isAffine.Dan Gohman2008-06-221-2/+2
| | | | llvm-svn: 52614
* Move a few more SCEVExpander methods out-of-line.Dan Gohman2008-06-221-0/+21
| | | | llvm-svn: 52612
* Move SCEVExpander::visitAddExpr out-of-line.Dan Gohman2008-06-181-0/+10
| | | | llvm-svn: 52464
* Move LSR's private isZero function to a public SCEV memberDan Gohman2008-06-181-2/+1
| | | | | | function, and make use of it in several places. llvm-svn: 52463
* Fix PR2434. When scanning for exising binary operator to reuse don't Wojciech Matyjewicz2008-06-151-15/+15
| | | | | | | | | | | take into account the instrucion pointed by InsertPt. Thanks to it, returning the new value of InsertPt to the InsertBinop() caller can be avoided. The bug was, actually, in visitAddRecExpr() method which wasn't correctly handling changes of InsertPt. There shouldn't be any performance regression, as -gvn pass (run after -indvars) removes any redundant binops. llvm-svn: 52291
* Change 'while' loop to 'do' loop.Wojciech Matyjewicz2008-06-141-4/+11
| | | | | | | | | Add a safety measure. It isn't safe to assume in ScalarEvolutionExpander that all loops are in canonical form (but it should be safe for loops that have AddRecs). xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx llvm-svn: 52275
* API change for {BinaryOperator|CmpInst|CastInst}::create*() --> Create. ↵Gabor Greif2008-05-161-4/+4
| | | | | | Legacy interfaces will be in place for some time. (Merge from use-diet branch.) llvm-svn: 51200
* API changes for class Use size reduction, wave 1.Gabor Greif2008-04-061-3/+3
| | | | | | | | Specifically, introduction of XXX::Create methods for Users that have a potentially variable number of Uses. llvm-svn: 49277
* Add 'umax' similar to 'smax' SCEV. Closes PR2003.Nick Lewycky2008-02-201-1/+10
| | | | | | | | | | | | | | | Parse reversed smax and umax as smin and umin and express them with negative or binary-not SCEVs (which are really just subtract under the hood). Parse 'xor %x, -1' as (-1 - %x). Remove dead code (ConstantInt::get always returns a ConstantInt). Don't use getIntegerSCEV(-1, Ty). The first value is an int, then it gets passed into a uint64_t. Instead, create the -1 directly from ConstantInt::getAllOnesValue(). llvm-svn: 47360
* We should check that existing cast operation has the appropriate opcode ↵Wojciech Matyjewicz2008-02-091-19/+21
| | | | | | before we reuse it. llvm-svn: 46908
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45418
* Add new SCEV, SCEVSMax. This allows LLVM to analyze do-while loops.Nick Lewycky2007-11-251-0/+10
| | | | llvm-svn: 44319
* Move the SCEV object factors from being static members of the individualDan Gohman2007-10-221-5/+5
| | | | | | | SCEV subclasses to being non-static member functions of the ScalarEvolution class. llvm-svn: 43224
* Change "tmp." to "tmp" for temporaries created by ScalarEvolutionExpanderDan Gohman2007-09-141-1/+1
| | | | | | for consistency with many other transforms. llvm-svn: 41957
* - Use correct header for SCEV inside LoopPass.cppAnton Korobeynikov2007-08-201-0/+12
| | | | | | - Move SCEVExpander::expand() out-of-line workarounding possible toolchain bug llvm-svn: 41197
* Fold a binary operator with constant operands when expanding code for a SCEV.Dan Gohman2007-06-151-0/+5
| | | | llvm-svn: 37602
* Add a SCEV class and supporting code for sign-extend expressions.Dan Gohman2007-06-151-7/+6
| | | | | | | | | | This created an ambiguity for expandInTy to decide when to use sign-extension or zero-extension, but it turns out that most of its callers don't actually need a type conversion, now that LLVM types don't have explicit signedness. Drop expandInTy in favor of plain expand, and change the few places that actually need a type conversion to do it themselves. llvm-svn: 37591
* Be more careful when inserting reused instructions. This fixes ↵Chris Lattner2007-04-171-2/+7
| | | | | | CodeGen/Generic/2007-04-17-lsr-crash.ll llvm-svn: 36231
* CSE simple binary expressions when they are inserted. This makes LSR produceChris Lattner2007-04-131-5/+25
| | | | | | less huge code that needs to be cleaned up by sdisel. llvm-svn: 35959
* Prefer non-virtual calls to ConstantInt::isZero over virtual calls toReid Spencer2007-03-021-1/+1
| | | | | | Constant::isNullValue() in situations where it is possible. llvm-svn: 34821
* Avoid a potential assert out if the loop increment is > 64 bits.Reid Spencer2007-03-011-1/+1
| | | | llvm-svn: 34798
* For PR970:Reid Spencer2007-01-211-2/+1
| | | | | | | 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-1/+1
| | | | | | | Merge ConstantIntegral and ConstantBool into ConstantInt. Remove ConstantIntegral and ConstantBool from LLVM. llvm-svn: 33073
* Change the interface to SCEVExpander::InsertCastOfTo to take a cast opcodeReid Spencer2006-12-131-19/+2
| | | | | | | so the decision of which opcode to use is pushed upward to the caller. Adjust the callers to pass the expected opcode. llvm-svn: 32535
* Replace inferred getCast(V,Ty) calls with more strict variants.Reid Spencer2006-12-121-4/+22
| | | | | | | Rename getZeroExtend and getSignExtend to getZExt and getSExt to match the the casting mnemonics in the rest of LLVM. llvm-svn: 32514
* Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, areBill Wendling2006-12-071-3/+2
| | | | | | now cerr, cout, and NullStream resp. llvm-svn: 32298
* Fix 80 cols violationReid Spencer2006-12-041-2/+3
| | | | llvm-svn: 32179
* Replacing std::iostreams with llvm iostreams. Some of these changes involveBill Wendling2006-11-291-1/+1
| | | | | | | adding a temporary wrapper around the ostream to make it friendly to functions expecting an LLVM stream. This should be fixed in the future. llvm-svn: 31990
* For PR950:Reid Spencer2006-11-271-5/+4
| | | | | | | | | | The long awaited CAST patch. This introduces 12 new instructions into LLVM to replace the cast instruction. Corresponding changes throughout LLVM are provided. This passes llvm-test, llvm/test, and SPEC CPUINT2000 with the exception of 175.vpr which fails only on a slight floating point output difference. llvm-svn: 31931
* 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
* Pull the InsertCastOfTo out of the header, implement CSE'ing of arguments.Chris Lattner2006-02-041-0/+51
| | | | llvm-svn: 25973
* Fix a problem that Nate noticed with LSR:Chris Lattner2005-10-301-1/+26
| | | | | | | | | | | | | | | | | | | | When inserting code for an addrec expression with a non-unit stride, be more careful where we insert the multiply. In particular, insert the multiply in the outermost loop we can, instead of the requested insertion point. This allows LSR to notice the mul in the right loop, reducing it when it gets to it. This allows it to reduce the multiply, where before it missed it. This happens quite a bit in the test suite, for example, eliminating 2 multiplies in art, 3 in ammp, 4 in apsi, reducing from 1050 multiplies to 910 muls in galgel (!), from 877 to 859 in applu, and 36 to 30 in bzip2. This speeds up galgel from 16.45s to 16.01s, applu from 14.21 to 13.94s and fourinarow from 66.67s to 63.48s. This implements Transforms/LoopStrengthReduce/nested-reduce.ll llvm-svn: 24102
* Break SCEVExpander out of IndVarSimplify into its own .h/.cpp file so thatNate Begeman2005-07-301-0/+105
other passes may use it. llvm-svn: 22557
OpenPOWER on IntegriCloud