summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/ScalarEvolution.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Implement review feedback for the ConstantBool->ConstantInt merge. ChrisReid Spencer2007-01-121-4/+4
| | | | | | | | recommended that getBoolValue be replaced with getZExtValue and that get(bool) be replaced by get(const Type*, uint64_t). This implements those changes. llvm-svn: 33110
* Rename BoolTy as Int1Ty. Patch by Sheng Zhou.Reid Spencer2007-01-111-1/+1
| | | | llvm-svn: 33076
* For PR1043:Zhou Sheng2007-01-111-13/+15
| | | | | | | Merge ConstantIntegral and ConstantBool into ConstantInt. Remove ConstantIntegral and ConstantBool from LLVM. llvm-svn: 33073
* Convert uses of getPrimitiveSize that should be getPrimitiveSizeInBits.Reid Spencer2007-01-081-6/+6
| | | | llvm-svn: 33003
* Fix PR1015 and Transforms/IndVarsSimplify/2007-01-06-TripCount.ll, aChris Lattner2007-01-071-1/+15
| | | | | | miscompilation of Qt. llvm-svn: 32974
* cast of int to bool no longer does a compare, rendering this fixmeChris Lattner2007-01-071-1/+0
| | | | | | obsolete llvm-svn: 32972
* For PR950:Reid Spencer2006-12-311-47/+9
| | | | | | | | | | | | | This patch replaces signed integer types with signless ones: 1. [US]Byte -> Int8 2. [U]Short -> Int16 3. [U]Int -> Int32 4. [U]Long -> Int64. 5. Removal of isSigned, isUnsigned, getSignedVersion, getUnsignedVersion and other methods related to signedness. In a few places this warranted identifying the signedness information from other sources. llvm-svn: 32785
* For PR950:Reid Spencer2006-12-231-96/+102
| | | | | | | | 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
* Add a FIXME about signedness.Reid Spencer2006-12-211-0/+2
| | | | llvm-svn: 32732
* Add some comments about things that can go away once signless types are in.Reid Spencer2006-12-211-1/+8
| | | | llvm-svn: 32727
* eliminate static ctors from StatisticsChris Lattner2006-12-191-23/+19
| | | | llvm-svn: 32697
OpenPOWER on IntegriCloud