aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore/Instructions.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update GEP constructors to use an iterator interface to fixDavid Greene2007-09-041-73/+0
| | | | | | | GLIBCXX_DEBUG issues. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41697 91177308-0d34-0410-b5e6-96231b3b80d8
* Update InvokeInst to work like CallInstDavid Greene2007-08-271-22/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41506 91177308-0d34-0410-b5e6-96231b3b80d8
* sink clone() down the class hierarchy from CmpInst into ICmpInst/FCmpInst.Chris Lattner2007-08-241-2/+5
| | | | | | | | This eliminates a conditional on that path, and ensures ICmpInst/FCmpInst both have an out-of-line virtual method to home the class. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41371 91177308-0d34-0410-b5e6-96231b3b80d8
* New CallInst interface to address GLIBCXX_DEBUG errors caused byDavid Greene2007-08-011-6/+7
| | | | | | | | | indexing an empty std::vector. Updates to all clients. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40660 91177308-0d34-0410-b5e6-96231b3b80d8
* Add constructor overloads for LoadInst and StoreInst that insert at theDan Gohman2007-07-181-0/+20
| | | | | | | end of a BasicBlock and have an alignment parameter. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40016 91177308-0d34-0410-b5e6-96231b3b80d8
* Enhance BinaryOperator::isNot to support vector not.Chris Lattner2007-06-151-1/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37585 91177308-0d34-0410-b5e6-96231b3b80d8
* Update comments to say "vector" instead of "packed".Dan Gohman2007-05-111-10/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36995 91177308-0d34-0410-b5e6-96231b3b80d8
* add a GEP helper functionChris Lattner2007-04-271-0/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36515 91177308-0d34-0410-b5e6-96231b3b80d8
* PR400 work phase 1. Add attributed load/store instructions for ↵Christopher Lamb2007-04-221-0/+42
| | | | | | volatile/align to LLVM. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36349 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR1136:Reid Spencer2007-04-221-0/+22
| | | | | | | | Add reference counting to ParamAttrsList and make use of it in Function, CallInst and InvokeInst classes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36346 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR1146:Reid Spencer2007-04-221-2/+0
| | | | | | | | | Make ParamAttrsList objects unique. You can no longer directly create or destroy them but instead must go through the ParamAttrsList::get() interface. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36327 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert Christopher Lamb's load/store alignment changes.Reid Spencer2007-04-211-42/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36309 91177308-0d34-0410-b5e6-96231b3b80d8
* add support for alignment attributes on load/store instructionsChristopher Lamb2007-04-211-0/+42
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36301 91177308-0d34-0410-b5e6-96231b3b80d8
* add GetElementPtrInst::hasAllZeroIndices, a long-overdue helper method.Chris Lattner2007-04-141-0/+16
| | | | | | | Writing it twice in the same day was too much for me. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35978 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bug where ICmpInst objects instantiated directly with a name wouldReid Spencer2007-04-111-2/+2
| | | | | | | | not retain that name. Not noticed because AsmParser always sets name after construction. However, llvm2cpp noticed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35903 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR1146:Reid Spencer2007-04-091-0/+6
| | | | | | | | | | | * Add ParamAttrs to InvokeInst class too. * Make sure all initializes of ParamAttrs in CallInst and InvokeInst are 0 * Destruct the ParamAttrs in Call/Invoke destructors to avoid memory leaks. This will change when ParamAttrsList is uniquified but needs to be correct until then. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35824 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR1146:Reid Spencer2007-04-091-0/+4
| | | | | | | | * Add ParamAttrList pointers to Function and CallInst. * Move the implementation of ParamAttrList from Type.cpp to Function.cpp git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35818 91177308-0d34-0410-b5e6-96231b3b80d8
* Change uses of Function::front to Function::getEntryBlock for readability.Dan Gohman2007-03-221-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35265 91177308-0d34-0410-b5e6-96231b3b80d8
* Use modern variable name. ConstantUnsignedInt is long since dead. NoReid Spencer2007-03-011-2/+2
| | | | | | | functional change with this patch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34806 91177308-0d34-0410-b5e6-96231b3b80d8
* Provide an ICmpInst::makeConstantRange to generate a ConstantRange valueReid Spencer2007-02-281-0/+36
| | | | | | | | from a predicate and an APInt. This is removed from ConstantRange class so that ConstantRange doesn't have to depend on lib/VMCore. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34760 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor the setName stuff, moving it down the inheritance hierarchy, toChris Lattner2007-02-241-67/+197
| | | | | | | solve a crash in -instcombine -debug that was hit while investigating PR1217 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34544 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR1195:Reid Spencer2007-02-151-1/+1
| | | | | | | | Change use of "packed" term to "vector" in comments, strings, variable names, etc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34300 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR1195:Reid Spencer2007-02-151-31/+31
| | | | | | | | Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and PackedTyID -> VectorTyID. No functional changes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34293 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch UnaryOperators to default to passing names up by const char* when ↵Chris Lattner2007-02-131-8/+46
| | | | | | | | | possible. This speeds up bcreading by 1.5%. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34233 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate instruction ctors that take vectors.Chris Lattner2007-02-131-37/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34228 91177308-0d34-0410-b5e6-96231b3b80d8
* Add invokeinst and callinst ctors that don't take vectors.Chris Lattner2007-02-131-11/+47
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34214 91177308-0d34-0410-b5e6-96231b3b80d8
* remove some dead methods.Chris Lattner2007-02-131-25/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34213 91177308-0d34-0410-b5e6-96231b3b80d8
* Changes to support making the shift instructions be true BinaryOperators.Reid Spencer2007-02-021-1/+8
| | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33776 91177308-0d34-0410-b5e6-96231b3b80d8
* silence some warnings when assertions are disabled.Chris Lattner2007-02-011-2/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33747 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix build breakage by using correct arguments to getIndexedType in theReid Spencer2007-01-311-6/+10
| | | | | | | GEP constructors. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33726 91177308-0d34-0410-b5e6-96231b3b80d8
* implement the new GEP instruction ctors.Chris Lattner2007-01-311-5/+23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33708 91177308-0d34-0410-b5e6-96231b3b80d8
* Revise APIs for creating constantexpr GEPs to not require the use of vectors.Chris Lattner2007-01-311-5/+6
| | | | | | | This allows us to eliminate many temporary vectors, and theirassociated malloc/free pairs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33692 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix an assertion message.Reid Spencer2007-01-261-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33519 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR970:Reid Spencer2007-01-211-30/+14
| | | | | | | | Clean up handling of isFloatingPoint() and dealing with PackedType. Patch by Gordon Henriksen! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33415 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR1117:Reid Spencer2007-01-171-29/+29
| | | | | | | Expose the previously hidden checkCast function as CastInst::castIsValid. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33282 91177308-0d34-0410-b5e6-96231b3b80d8
* rename Type::isIntegral to Type::isInteger, eliminating the old Type::isInteger.Chris Lattner2007-01-151-33/+33
| | | | | | | | | | 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! :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33225 91177308-0d34-0410-b5e6-96231b3b80d8
* teach VMCore to accept i1 add's and shiftsChris Lattner2007-01-151-10/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33223 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR1064:Reid Spencer2007-01-121-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33113 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename BoolTy as Int1Ty. Patch by Sheng Zhou.Reid Spencer2007-01-111-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33076 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR1043:Zhou Sheng2007-01-111-5/+5
| | | | | | | | Merge ConstantIntegral and ConstantBool into ConstantInt. Remove ConstantIntegral and ConstantBool from LLVM. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33073 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR950:Reid Spencer2006-12-311-26/+12
| | | | | | | Change signed integer type names to unsigned equivalents. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32780 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR950:Reid Spencer2006-12-231-74/+63
| | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32751 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the createInferredCast methods now that their last uses have beenReid Spencer2006-12-181-14/+0
| | | | | | | removed. All casting is now explicit and not inferred by VMCore. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32655 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement createIntegerCast and createFPCast factory methods for handlingReid Spencer2006-12-121-0/+52
| | | | | | | | | integer and floating point cast creation. createIntegerCast generates ZExt/SExt, BitCast or Trunc. createFPCast generates FPExt, Bitcast, or FPTrunc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32456 91177308-0d34-0410-b5e6-96231b3b80d8
* Provide a getOpcode() method on CmpInst to ensure the opcode is returnedReid Spencer2006-12-071-2/+1
| | | | | | | as the right type. Use this to shorten some code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32300 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix Transforms/InstCombine/2006-12-05-fp-to-int-ext.ll, fixing an out-of-Chris Lattner2006-12-051-3/+10
| | | | | | | stack-space issue in the ppc bootstrap. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32244 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement createPointerCast.Reid Spencer2006-12-051-0/+25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32212 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement new cast creation functions for both instructions and constantReid Spencer2006-12-041-0/+48
| | | | | | | | expressions. These will get used to reduce clutter as we replace various calls to createInferredCast and getCast. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32191 91177308-0d34-0410-b5e6-96231b3b80d8
* Take a baby step towards getting rid of inferred casts. Provide methods onReid Spencer2006-12-041-4/+19
| | | | | | | | | CastInst and ConstantExpr that allow the signedness to be explicitly passed in and reliance on signedness removed from getCastOpcode. These are temporary measures useful during the conversion of inferred casts. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32164 91177308-0d34-0410-b5e6-96231b3b80d8
* Unbreak VC++ build.Jeff Cohen2006-12-021-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32113 91177308-0d34-0410-b5e6-96231b3b80d8