summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
Commit message (Collapse)AuthorAgeFilesLines
* For this transform: store V, (cast P) -> store (cast V), PReid Spencer2007-01-191-3/+4
| | | | | | | don't allow the transform if V and the pointer's element type are different width integer types. llvm-svn: 33371
* For PR1043:Reid Spencer2007-01-196-40/+44
| | | | | | | | | | | | | | 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
* Fix InstCombine/2007-01-18-VectorInfLoop.ll, a case where instcombineChris Lattner2007-01-181-3/+9
| | | | | | infinitely loops. llvm-svn: 33343
* Clean up some code around the store V, (cast P) -> store (cast V), PReid Spencer2007-01-181-8/+14
| | | | | | | | | transform. Change some variable names so it is clear what is source and what is dest of the cast. Also, add an assert to ensure that the integer to integer case is asserting if the bitwidths are different. This prevents illegal casts from being formed and catches bitwidth bugs sooner. llvm-svn: 33337
* For PR1094:Reid Spencer2007-01-171-4/+4
| | | | | | | Adjust the use of SetVector for changes in SetVector's interface. Patch by Gordon Henriksen. llvm-svn: 33280
* Fix a regression in my isIntegral patch that broke 471.omnetpp. This isChris Lattner2007-01-151-6/+8
| | | | | | | | because TargetData::getTypeSize() returns the same for i1 and i8. This fix is not right for the full generality of bitwise types, but it fixes the regression. llvm-svn: 33237
* Don't print address of ETNode. Print the DFSNumIn which uniquely identifiesNick Lewycky2007-01-151-34/+65
| | | | | | | | | | | | | | | the basic block and is stable across runs in gdb or valgrind. Make Node::update handle edges which dominate and are tighter than existing edges. Replace makeEqual's "squeeze theorem" code. Fixes miscompilation. Gate the calls to defToOps and opsToDef. Before this, we were getting IG edges about values which weren't even defined in the dominated area. This reduces the size of the IG by about half. llvm-svn: 33236
* Implement InstCombine/phi.ll:test7, deletion of trivial value loops forChris Lattner2007-01-151-2/+16
| | | | | | induction variables. llvm-svn: 33234
* simplify some code now that types are signlessChris Lattner2007-01-151-46/+12
| | | | llvm-svn: 33232
* delete stores to allocas with one use. This is a trivial form of DSE whichChris Lattner2007-01-151-0/+18
| | | | | | often kicks in for ?: expressions. llvm-svn: 33231
* rename Type::isIntegral to Type::isInteger, eliminating the old Type::isInteger.Chris Lattner2007-01-1510-81/+81
| | | | | | | | | 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
* Eliminate calls to isInteger, generalizing code and tightening checks as needed.Chris Lattner2007-01-157-32/+31
| | | | llvm-svn: 33218
* Fix Analysis/Dominators/2006-10-02-BreakCritEdges.llChris Lattner2007-01-151-1/+2
| | | | llvm-svn: 33210
* instcombine has always been miscompiling fcmp x, x, disregarding possibleChris Lattner2007-01-141-15/+39
| | | | | | NANs. This fixes PR1111 and Transforms/InstCombine/2007-01-14-FcmpSelf.ll llvm-svn: 33208
* Fix PR1110 and Analysis/Dominators/2007-01-14-BreakCritEdges.ll by beingChris Lattner2007-01-141-35/+40
| | | | | | more careful about unreachable code when updating dominator info. llvm-svn: 33204
* Fix Transforms/InstCombine/2007-01-13-ExtCompareMiscompile.ll, which is partChris Lattner2007-01-131-3/+13
| | | | | | of PR1107 llvm-svn: 33185
* Fix indentation to prior level for easier diffs.Reid Spencer2007-01-131-70/+69
| | | | llvm-svn: 33184
* "Default context" blocks can occur after a non-default one. This meantNick Lewycky2007-01-131-8/+12
| | | | | | | | | that properties were being applied where they didn't belong. Fixes crash in new MiBench testcase. Also mark debugging code as such in #ifdef. llvm-svn: 33177
* Fix a minor bug handling constant exprs, introduced by a recent patch.Chris Lattner2007-01-131-1/+1
| | | | llvm-svn: 33175
* fix a bug in a recent patchChris Lattner2007-01-131-1/+1
| | | | llvm-svn: 33164
* simplify some codeChris Lattner2007-01-121-8/+2
| | | | llvm-svn: 33150
* Remove over-general comparisonsChris Lattner2007-01-121-4/+6
| | | | llvm-svn: 33147
* eliminate redundant checkChris Lattner2007-01-121-1/+0
| | | | llvm-svn: 33132
* Branch conditions must be i1Chris Lattner2007-01-121-3/+1
| | | | llvm-svn: 33129
* For PR1064:Reid Spencer2007-01-126-37/+50
| | | | | | | | | | | | | | | | | | | | | | | Implement the arbitrary bit-width integer feature. The feature allows integers of any bitwidth (up to 64) to be defined instead of just 1, 8, 16, 32, and 64 bit integers. This change does several things: 1. Introduces a new Derived Type, IntegerType, to represent the number of bits in an integer. The Type classes SubclassData field is used to store the number of bits. This allows 2^23 bits in an integer type. 2. Removes the five integer Type::TypeID values for the 1, 8, 16, 32 and 64-bit integers. These are replaced with just IntegerType which is not a primitive any more. 3. Adjust the rest of LLVM to account for this change. Note that while this incremental change lays the foundation for arbitrary bit-width integers, LLVM has not yet been converted to actually deal with them in any significant way. Most optimization passes, for example, will still only deal with the byte-width integer types. Future increments will rectify this situation. llvm-svn: 33113
* Implement review feedback for the ConstantBool->ConstantInt merge. ChrisReid Spencer2007-01-1211-60/+71
| | | | | | | | 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
* If we know that it's a constant being casted, propagate through the castNick Lewycky2007-01-121-1/+10
| | | | | | | instruction. Doesn't work the other way though (can't recover bits that have been truncated). llvm-svn: 33104
* Clean up logic after ConstantBool removal.Nick Lewycky2007-01-121-20/+14
| | | | llvm-svn: 33096
* Rename BoolTy as Int1Ty. Patch by Sheng Zhou.Reid Spencer2007-01-1111-39/+39
| | | | llvm-svn: 33076
* Remove unnecessary boolean type check.Zhou Sheng2007-01-111-2/+1
| | | | llvm-svn: 33075
* For PR1043:Zhou Sheng2007-01-1114-283/+304
| | | | | | | Merge ConstantIntegral and ConstantBool into ConstantInt. Remove ConstantIntegral and ConstantBool from LLVM. llvm-svn: 33073
* Fixed indentation.Zhou Sheng2007-01-111-4/+4
| | | | llvm-svn: 33072
* Quiet compiler warning. The only reason the function is marked virtualNick Lewycky2007-01-111-0/+2
| | | | | | is so that it can be called from inside a debugger. llvm-svn: 33067
* New predicate simplifier!Nick Lewycky2007-01-111-974/+1155
| | | | | | Please do not enable, there is still some known miscompile problem. llvm-svn: 33066
* Fix a bug in heap-sra that caused compilation failure of office-ispell.Chris Lattner2007-01-091-3/+19
| | | | llvm-svn: 33043
* Unbreak VC++ build.Jeff Cohen2007-01-081-1/+1
| | | | llvm-svn: 33021
* Comparison of primitive type sizes should now be done in bits, not bytes.Reid Spencer2007-01-083-12/+14
| | | | | | | This patch converts getPrimitiveSize to getPrimitiveSizeInBits where it is appropriate to do so (comparison of integer primitive types). llvm-svn: 33012
* For PR1097:Reid Spencer2007-01-081-1/+1
| | | | | | | | Enable complex addressing modes on 64-bit platforms involving two induction variables by keeping a size and scale in 64-bits not 32. Patch by Dan Gohman. llvm-svn: 33011
* Types should be const.Reid Spencer2007-01-071-2/+2
| | | | llvm-svn: 33001
* this pass is unusedChris Lattner2007-01-071-436/+0
| | | | llvm-svn: 32998
* Change the interface to Module::getOrInsertFunction to be easier to use,to ↵Chris Lattner2007-01-073-182/+80
| | | | | | | | resolve PR1088, and to help PR411. This simplifies many clients also llvm-svn: 32989
* prepare for adjustment to getOrInsertFunction methodChris Lattner2007-01-071-6/+8
| | | | llvm-svn: 32985
* relax some typesChris Lattner2007-01-074-21/+20
| | | | llvm-svn: 32982
* relax typesChris Lattner2007-01-071-7/+7
| | | | llvm-svn: 32981
* relax some typesChris Lattner2007-01-072-4/+3
| | | | llvm-svn: 32980
* add -debug output for -indvars.Chris Lattner2007-01-071-6/+19
| | | | llvm-svn: 32971
* Fix regressions in InstCombine/call-cast-target.ll and ↵Chris Lattner2007-01-061-1/+5
| | | | | | InstCombine/2003-11-13-ConstExprCastCall.ll llvm-svn: 32959
* For PR411:Reid Spencer2007-01-063-13/+13
| | | | | | | | | Take an incremental step towards type plane elimination. This change separates types from values in the symbol tables by finally making use of the TypeSymbolTable class. This yields more natural interfaces for dealing with types and unclutters the SymbolTable class. llvm-svn: 32956
* this final call to canLosslesslyBitCastTo is dead, because ValueRequiresCastChris Lattner2007-01-061-4/+0
| | | | | | is only called on integers. llvm-svn: 32949
* simplify some more code now that there are not multiple different integerChris Lattner2007-01-061-8/+4
| | | | | | types of the same size llvm-svn: 32948
OpenPOWER on IntegriCloud