summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/ScalarEvolution.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Instead of calculating constant factors, calculate the number of trailingNick Lewycky2007-11-221-54/+47
| | | | | | bits. Patch from Wojciech Matyjewicz. llvm-svn: 44268
* Small cleanup. Use APInt::getHighBitsSet method instead of shift left.Nick Lewycky2007-11-201-5/+4
| | | | | | "setcc" -> "icmp op" in comments. No functionality change. llvm-svn: 44249
* Be more careful when transforming | to +. Patch from Wojciech Matyjewicz.Nick Lewycky2007-11-201-6/+8
| | | | llvm-svn: 44248
* Reverted r44163 per requestAnton Korobeynikov2007-11-151-52/+4
| | | | llvm-svn: 44177
* Fix handling of overflow in loop calculation by adding new UDiv SCEV. This SCEVNick Lewycky2007-11-151-4/+51
| | | | | | | is disabled in the sense that it will refuse to create one from a UDiv instruction, until the code is better tested. llvm-svn: 44163
* Move the SCEV object factors from being static members of the individualDan Gohman2007-10-221-172/+188
| | | | | | | SCEV subclasses to being non-static member functions of the ScalarEvolution class. llvm-svn: 43224
* Build the correct range for loops with unusual bounds. Fix from Jay Foad.Nick Lewycky2007-09-271-1/+1
| | | | llvm-svn: 42394
* Next round of APFloat changes.Dale Johannesen2007-09-061-1/+2
| | | | | | | | | | | | | | Use APFloat in UpgradeParser and AsmParser. Change all references to ConstantFP to use the APFloat interface rather than double. Remove the ConstantFP double interfaces. Use APFloat functions for constant folding arithmetic and comparisons. (There are still way too many places APFloat is just a wrapper around host float/double, but we're getting there.) llvm-svn: 41747
* Use SmallVector instead of std::vector.Devang Patel2007-08-211-2/+2
| | | | llvm-svn: 41207
* Let scalar-evolution analyze loops with an unsigned comparison for the exitNick Lewycky2007-08-061-17/+35
| | | | | | condition. Fixes 1597. llvm-svn: 40867
* Don't assume it's safe to transform a loop just because it's dominated by anyNick Lewycky2007-08-061-1/+1
| | | | | | comparison. Fixes bug 1598. llvm-svn: 40866
* Handle decrementing loops properly. Fixes PR1533.Nick Lewycky2007-07-161-15/+13
| | | | | | | | Always pass the constant as the second parameter to HowManyLessThans. Remove obsolete "isSigned" parameter. llvm-svn: 39893
* Move the APInt form of SCEVUnknown::getIntegerSCEV to SCEVConstant::get, andDan Gohman2007-07-091-15/+14
| | | | | | | use SCEVConstant::get instead of SCEVUnknown::get when constructing a SCEV for a ConstantInt. llvm-svn: 38457
* Rename ScalarEvolution::deleteInstructionFromRecords toDan Gohman2007-06-191-14/+14
| | | | | | | | | deleteValueFromRecords and loosen the types to all it to accept Value* instead of just Instruction*, since this is what ScalarEvolution uses internally anyway. This allows more flexibility for future uses. llvm-svn: 37657
* In SCEVAddExpr::get, skip over any cast operands before looking for nestedDan Gohman2007-06-181-2/+5
| | | | | | | add operands after constant operands. The recent change to recognize sign-extend expressions caused this to be exposed more often. llvm-svn: 37628
* Add a SCEV class and supporting code for sign-extend expressions.Dan Gohman2007-06-151-0/+47
| | | | | | | | | | 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
* Optimize this test. Firstly, only Instructions may use other Instructions.Nick Lewycky2007-06-061-2/+2
| | | | | | | Secondly, checking whether removal succeeded tells you whether it was in the map to begin with. llvm-svn: 37469
* Fix PR1487 and Transforms/IndVar/2007-06-06-DeleteDanglesPtr.llNick Lewycky2007-06-061-3/+22
| | | | llvm-svn: 37459
* Drop 'const'Devang Patel2007-05-031-1/+1
| | | | llvm-svn: 36662
* Use 'static const char' instead of 'static const int'.Devang Patel2007-05-021-1/+1
| | | | | | | Due to darwin gcc bug, one version of darwin linker coalesces static const int, which defauts PassID based pass identification. llvm-svn: 36652
* Fix build error.Lauro Ramos Venancio2007-05-021-1/+1
| | | | llvm-svn: 36648
* Do not use typeinfo to identify pass in pass manager.Devang Patel2007-05-011-0/+1
| | | | llvm-svn: 36632
* Revert last patch. It was already fixed.Reid Spencer2007-04-161-6/+1
| | | | llvm-svn: 36102
* For PR1336:Reid Spencer2007-04-161-1/+6
| | | | | | | Fix a div-by-zero bug noticed by APInt. This fixes: test/Transforms/IndVarsSimplify/exit_value_tests.llx llvm-svn: 36099
* Fix a nasty bug introduced when apint'ified. This fixesChris Lattner2007-04-151-4/+4
| | | | | | Transforms/IndVarsSimplify/exit_value_tests.llx llvm-svn: 36081
* Eliminate unnecessary APInt construction.Zhou Sheng2007-04-071-8/+7
| | | | llvm-svn: 35740
* Make APInt variables do the computation stuffs instead ofZhou Sheng2007-04-071-14/+11
| | | | | | ConstantExpr::getXX if possible. llvm-svn: 35738
* Eliminate unnecessary zext/trunc stuffs.Zhou Sheng2007-04-071-14/+10
| | | | llvm-svn: 35737
* Treat xor of signbit like an add.Chris Lattner2007-04-021-1/+10
| | | | llvm-svn: 35586
* Guard further against APInt operations with operands of unequal bit width.Reid Spencer2007-03-041-4/+11
| | | | llvm-svn: 34897
* Fix an unequal bitwidth issue.Reid Spencer2007-03-021-3/+6
| | | | llvm-svn: 34831
* Prefer non-virtual calls to ConstantInt::isZero over virtual calls toReid Spencer2007-03-021-6/+6
| | | | | | Constant::isNullValue() in situations where it is possible. llvm-svn: 34821
* Make it possible to create an SCEVUnknown from an APInt as well as an int.Reid Spencer2007-03-011-0/+4
| | | | llvm-svn: 34816
* Construct ConstantInt with simpler constructor.Reid Spencer2007-03-011-4/+4
| | | | llvm-svn: 34795
* Fix last night's 445.gobmk breakage which was caused by comparison ofReid Spencer2007-03-011-0/+1
| | | | | | APInt's of unequal bitwidth. llvm-svn: 34790
* Remove the "isSigned" parameters from ConstantRange. It turns out theyReid Spencer2007-03-011-8/+7
| | | | | | | | are not needed as the results are the same with or without it. Patch by Nicholas Lewycky. llvm-svn: 34782
* APIntify various computations in ScalarEvolutionReid Spencer2007-03-011-55/+52
| | | | llvm-svn: 34780
* For PR1205:Reid Spencer2007-02-281-16/+20
| | | | | | Make GetConstantFactor compute its result using an APInt. llvm-svn: 34765
* For PR1205:Reid Spencer2007-02-281-4/+5
| | | | | | Adjust to changes in ConstantRange interface. llvm-svn: 34762
* For PR1205:Reid Spencer2007-02-281-21/+27
| | | | | | | Remove ConstantInt from ConstantRange interface and adjust its users to compensate. llvm-svn: 34758
* For PR1205:Reid Spencer2007-02-281-6/+5
| | | | | | | First round of ConstantRange changes. This makes all CR constructors use only APInt and not use ConstantInt. Clients are adjusted accordingly. llvm-svn: 34756
* Changes to support making the shift instructions be true BinaryOperators.Reid Spencer2007-02-021-1/+1
| | | | | | | | | | | | This feature is needed in order to support shifts of more than 255 bits on large integer types. This changes the syntax for llvm assembly to make shl, ashr and lshr instructions look like a binary operator: shl i32 %X, 1 instead of shl i32 %X, i8 1 Additionally, this should help a few passes perform additional optimizations. llvm-svn: 33776
* The local "ConstantFold" method is now just a watered down version ofChris Lattner2007-01-301-37/+3
| | | | | | | ConstantFoldInstOperands. Switch to ConstantFoldInstOperands and remove ConstantFold. llvm-svn: 33683
* adjust to constant folding api changes.Chris Lattner2007-01-301-2/+2
| | | | llvm-svn: 33673
* For PR1043:Reid Spencer2007-01-191-1/+1
| | | | | | | | | | | | | | This is the final patch for this PR. It implements some minor cleanup in the use of IntegerType, to wit: 1. Type::getIntegerTypeMask -> IntegerType::getBitMask 2. Type::Int*Ty changed to IntegerType* from Type* 3. ConstantInt::getType() returns IntegerType* now, not Type* This also fixes PR1120. Patch by Sheng Zhou. llvm-svn: 33370
* Unbreak VC++ build.Jeff Cohen2007-01-151-1/+1
| | | | llvm-svn: 33242
* rename Type::isIntegral to Type::isInteger, eliminating the old Type::isInteger.Chris Lattner2007-01-151-11/+11
| | | | | | | | | 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
* Update code to eliminate calls to isInteger, calling isIntegral instead.Chris Lattner2007-01-151-16/+11
| | | | llvm-svn: 33220
* Fix PR1101 and Analysis/ScalarEvolution/trip-count.llChris Lattner2007-01-141-3/+5
| | | | llvm-svn: 33193
* don't discriminate against boolChris Lattner2007-01-121-1/+1
| | | | llvm-svn: 33128
OpenPOWER on IntegriCloud