summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/Instructions.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Change uses of Function::front to Function::getEntryBlock for readability.Dan Gohman2007-03-221-1/+1
| | | | llvm-svn: 35265
* Use modern variable name. ConstantUnsignedInt is long since dead. NoReid Spencer2007-03-011-2/+2
| | | | | | functional change with this patch. llvm-svn: 34806
* 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. llvm-svn: 34760
* 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 llvm-svn: 34544
* For PR1195:Reid Spencer2007-02-151-1/+1
| | | | | | | Change use of "packed" term to "vector" in comments, strings, variable names, etc. llvm-svn: 34300
* For PR1195:Reid Spencer2007-02-151-31/+31
| | | | | | | Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and PackedTyID -> VectorTyID. No functional changes. llvm-svn: 34293
* 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%. llvm-svn: 34233
* eliminate instruction ctors that take vectors.Chris Lattner2007-02-131-37/+0
| | | | llvm-svn: 34228
* Add invokeinst and callinst ctors that don't take vectors.Chris Lattner2007-02-131-11/+47
| | | | llvm-svn: 34214
* remove some dead methods.Chris Lattner2007-02-131-25/+8
| | | | llvm-svn: 34213
* 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. llvm-svn: 33776
* silence some warnings when assertions are disabled.Chris Lattner2007-02-011-2/+8
| | | | llvm-svn: 33747
* Fix build breakage by using correct arguments to getIndexedType in theReid Spencer2007-01-311-6/+10
| | | | | | GEP constructors. llvm-svn: 33726
* implement the new GEP instruction ctors.Chris Lattner2007-01-311-5/+23
| | | | llvm-svn: 33708
* 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. llvm-svn: 33692
* Fix an assertion message.Reid Spencer2007-01-261-1/+1
| | | | llvm-svn: 33519
* For PR970:Reid Spencer2007-01-211-30/+14
| | | | | | | Clean up handling of isFloatingPoint() and dealing with PackedType. Patch by Gordon Henriksen! llvm-svn: 33415
* For PR1117:Reid Spencer2007-01-171-29/+29
| | | | | | Expose the previously hidden checkCast function as CastInst::castIsValid. llvm-svn: 33282
* 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! :) llvm-svn: 33225
* teach VMCore to accept i1 add's and shiftsChris Lattner2007-01-151-10/+10
| | | | llvm-svn: 33223
* 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. llvm-svn: 33113
* Rename BoolTy as Int1Ty. Patch by Sheng Zhou.Reid Spencer2007-01-111-3/+3
| | | | llvm-svn: 33076
* For PR1043:Zhou Sheng2007-01-111-5/+5
| | | | | | | Merge ConstantIntegral and ConstantBool into ConstantInt. Remove ConstantIntegral and ConstantBool from LLVM. llvm-svn: 33073
* For PR950:Reid Spencer2006-12-311-26/+12
| | | | | | Change signed integer type names to unsigned equivalents. llvm-svn: 32780
* 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. llvm-svn: 32751
* 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. llvm-svn: 32655
* 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. llvm-svn: 32456
* 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. llvm-svn: 32300
* 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. llvm-svn: 32244
* Implement createPointerCast.Reid Spencer2006-12-051-0/+25
| | | | llvm-svn: 32212
* 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. llvm-svn: 32191
* 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. llvm-svn: 32164
* Unbreak VC++ build.Jeff Cohen2006-12-021-1/+1
| | | | llvm-svn: 32113
* For PR950:Reid Spencer2006-11-271-18/+583
| | | | | | | | | | 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-11-201-0/+196
| | | | | | | | First in a series of patches to convert SetCondInst into ICmpInst and FCmpInst using only two opcodes and having the instructions contain their predicate value. Nothing uses these classes yet. More patches to follow. llvm-svn: 31867
* For PR950:Reid Spencer2006-11-081-11/+0
| | | | | | | | This patch converts the old SHR instruction into two instructions, AShr (Arithmetic) and LShr (Logical). The Shr instructions now are not dependent on the sign of their operands. llvm-svn: 31542
* For PR950:Reid Spencer2006-11-021-2/+15
| | | | | | Replace the REM instruction with UREM, SREM and FREM. llvm-svn: 31369
* For PR950:Reid Spencer2006-10-261-1/+17
| | | | | | | | Make necessary changes to support DIV -> [SUF]Div. This changes llvm to have three division instructions: signed, unsigned, floating point. The bytecode and assembler are bacwards compatible, however. llvm-svn: 31195
* For PR950:Reid Spencer2006-10-201-7/+7
| | | | | | | | 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
* Add insertelement/extractelement helper ctors.Chris Lattner2006-10-051-0/+53
| | | | llvm-svn: 30750
* add a helper methodChris Lattner2006-09-181-0/+16
| | | | llvm-svn: 30452
* Add ShiftInst::isLogical/ArithmeticShift methods.Chris Lattner2006-09-171-0/+11
| | | | llvm-svn: 30445
* Add some out-of-line virtual dtors so that the class has a "home", preventingChris Lattner2006-06-211-0/+13
| | | | | | vtables for (e.g.) Instruction from being emitted into every .o file. llvm-svn: 28898
* remove dead varChris Lattner2006-05-141-1/+1
| | | | llvm-svn: 28287
* Add an assertion for a common errorChris Lattner2006-05-101-1/+4
| | | | llvm-svn: 28210
* Add assertions that verify that the actual arguments to a call or invoke matchChris Lattner2006-05-031-4/+22
| | | | | | the prototype of the called function. llvm-svn: 28070
* Move these ctors out of lineChris Lattner2006-04-141-0/+13
| | | | llvm-svn: 27713
* Add methods to check insertelement/extractelement instructions for validity,Chris Lattner2006-04-081-6/+37
| | | | | | check validity when instructions are created. llvm-svn: 27523
* Add shufflevector support, todo, implement better constant folding.Chris Lattner2006-04-081-6/+57
| | | | llvm-svn: 27510
* Teach BinaryOperator::createNot to work with packed integer typesChris Lattner2006-03-251-2/+9
| | | | llvm-svn: 27124
OpenPOWER on IntegriCloud