LLVM API Documentation
| enum llvm::ISD::CondCode |
ISD::CondCode enum - These are ordered carefully to make the bitfields below work out, when considering SETFALSE (something that never exists dynamically) as 0. "U" -> Unsigned (for integer operands) or Unordered (for floating point), "L" -> Less than, "G" -> Greater than, "E" -> Equal to. If the "N" column is 1, the result of the comparison is undefined if the input is a NAN.
All of these (except for the 'always folded ops') should be handled for floating point. For integer, only the SETEQ,SETNE,SETLT,SETLE,SETGT, SETGE,SETULT,SETULE,SETUGT, and SETUGE opcodes are used.
Note that these are laid out in a specific order to allow bit-twiddling to transform conditions.
| SETFALSE | |
| SETOEQ | |
| SETOGT | |
| SETOGE | |
| SETOLT | |
| SETOLE | |
| SETONE | |
| SETO | |
| SETUO | |
| SETUEQ | |
| SETUGT | |
| SETUGE | |
| SETULT | |
| SETULE | |
| SETUNE | |
| SETTRUE | |
| SETFALSE2 | |
| SETEQ | |
| SETGT | |
| SETGE | |
| SETLT | |
| SETLE | |
| SETNE | |
| SETTRUE2 | |
| SETCC_INVALID |
Definition at line 721 of file SelectionDAGNodes.h.
| enum llvm::ISD::CvtCode |
CvtCode enum - This enum defines the various converts CONVERT_RNDSAT supports.
Definition at line 802 of file SelectionDAGNodes.h.
LoadExtType enum - This enum defines the three variants of LOADEXT (load with extension).
SEXTLOAD loads the integer operand and sign extends it to a larger integer result type. ZEXTLOAD loads the integer operand and zero extends it to a larger integer result type. EXTLOAD is used for three things: floating point extending loads, integer extending loads [the top bits are undefined], and vector extending loads [load into low elt].
Definition at line 699 of file SelectionDAGNodes.h.
MemIndexedMode enum - This enum defines the load / store indexed addressing modes.
UNINDEXED "Normal" load / store. The effective address is already computed and is available in the base pointer. The offset operand is always undefined. In addition to producing a chain, an unindexed load produces one value (result of the load); an unindexed store does not produce a value.
PRE_INC Similar to the unindexed mode where the effective address is PRE_DEC the value of the base pointer add / subtract the offset. It considers the computation as being folded into the load / store operation (i.e. the load / store does the address computation as well as performing the memory transaction). The base operand is always undefined. In addition to producing a chain, pre-indexed load produces two values (result of the load and the result of the address computation); a pre-indexed store produces one value (result of the address computation).
POST_INC The effective address is the value of the base pointer. The POST_DEC value of the offset operand is then added to / subtracted from the base after memory transaction. In addition to producing a chain, post-indexed load produces two values (the result of the load and the result of the base +/- offset computation); a post-indexed store produces one value (the the result of the base +/- offset computation).
Definition at line 678 of file SelectionDAGNodes.h.
| enum llvm::ISD::NodeType |
ISD::NodeType enum - This enum defines the target-independent operators for a SelectionDAG.
Targets may also define target-dependent operator codes for SDNodes. For example, on x86, these are the enum values in the X86ISD namespace. Targets should aim to use target-independent operators to model their instruction sets as much as possible, and only use target-dependent operators when they have special requirements.
Finally, during and after selection proper, SNodes may use special operator codes that correspond directly with MachineInstr opcodes. These are used to represent selected instructions. See the isMachineOpcode() and getMachineOpcode() member functions of SDNode.
| DELETED_NODE | |
| EntryToken | |
| TokenFactor | |
| AssertSext | |
| AssertZext | |
| BasicBlock | |
| VALUETYPE | |
| CONDCODE | |
| Register | |
| Constant | |
| ConstantFP | |
| GlobalAddress | |
| GlobalTLSAddress | |
| FrameIndex | |
| JumpTable | |
| ConstantPool | |
| ExternalSymbol | |
| GLOBAL_OFFSET_TABLE | |
| FRAMEADDR | |
| RETURNADDR | |
| FRAME_TO_ARGS_OFFSET | |
| EXCEPTIONADDR | |
| LSDAADDR | |
| EHSELECTION | |
| EH_RETURN | |
| TargetConstant | |
| TargetConstantFP | |
| TargetGlobalAddress | |
| TargetGlobalTLSAddress | |
| TargetFrameIndex | |
| TargetJumpTable | |
| TargetConstantPool | |
| TargetExternalSymbol | |
| INTRINSIC_WO_CHAIN | RESULT = INTRINSIC_WO_CHAIN(INTRINSICID, arg1, arg2, ...) This node represents a target intrinsic function with no side effects. The first operand is the ID number of the intrinsic from the llvm::Intrinsic namespace. The operands to the intrinsic follow. The node has returns the result of the intrinsic. |
| INTRINSIC_W_CHAIN | RESULT,OUTCHAIN = INTRINSIC_W_CHAIN(INCHAIN, INTRINSICID, arg1, ...) This node represents a target intrinsic function with side effects that returns a result. The first operand is a chain pointer. The second is the ID number of the intrinsic from the llvm::Intrinsic namespace. The operands to the intrinsic follow. The node has two results, the result of the intrinsic and an output chain. |
| INTRINSIC_VOID | OUTCHAIN = INTRINSIC_VOID(INCHAIN, INTRINSICID, arg1, arg2, ...) This node represents a target intrinsic function with side effects that does not return a result. The first operand is a chain pointer. The second is the ID number of the intrinsic from the llvm::Intrinsic namespace. The operands to the intrinsic follow. |
| CopyToReg | |
| CopyFromReg | |
| UNDEF | |
| EXTRACT_ELEMENT | |
| BUILD_PAIR | |
| MERGE_VALUES | |
| ADD | |
| SUB | |
| MUL | |
| SDIV | |
| UDIV | |
| SREM | |
| UREM | |
| SMUL_LOHI | |
| UMUL_LOHI | |
| SDIVREM | |
| UDIVREM | |
| CARRY_FALSE | |
| ADDC | |
| SUBC | |
| ADDE | |
| SUBE | |
| SADDO | |
| UADDO | |
| SSUBO | |
| USUBO | |
| SMULO | |
| UMULO | |
| FADD | |
| FSUB | |
| FMUL | |
| FDIV | |
| FREM | |
| FCOPYSIGN | |
| FGETSIGN | |
| BUILD_VECTOR | BUILD_VECTOR(ELT0, ELT1, ELT2, ELT3,...) - Return a vector with the specified, possibly variable, elements. The number of elements is required to be a power of two. The types of the operands must all be the same and must match the vector element type, except that integer types are allowed to be larger than the element type, in which case the operands are implicitly truncated. |
| INSERT_VECTOR_ELT | INSERT_VECTOR_ELT(VECTOR, VAL, IDX) - Returns VECTOR with the element at IDX replaced with VAL. If the type of VAL is larger than the vector element type then VAL is truncated before replacement. |
| EXTRACT_VECTOR_ELT | EXTRACT_VECTOR_ELT(VECTOR, IDX) - Returns a single element from VECTOR identified by the (potentially variable) element number IDX. If the return type is an integer type larger than the element type of the vector, the result is extended to the width of the return type. |
| CONCAT_VECTORS | CONCAT_VECTORS(VECTOR0, VECTOR1, ...) - Given a number of values of vector type with the same length and element type, this produces a concatenated vector result value, with length equal to the sum of the lengths of the input vectors. |
| EXTRACT_SUBVECTOR | EXTRACT_SUBVECTOR(VECTOR, IDX) - Returns a subvector from VECTOR (an vector value) starting with the (potentially variable) element number IDX, which must be a multiple of the result vector length. |
| VECTOR_SHUFFLE | VECTOR_SHUFFLE(VEC1, VEC2) - Returns a vector, of the same type as VEC1/VEC2. A VECTOR_SHUFFLE node also contains an array of constant int values that indicate which value (or undef) each result element will get. These constant ints are accessible through the ShuffleVectorSDNode class. This is quite similar to the Altivec 'vperm' instruction, except that the indices must be constants and are in terms of the element size of VEC1/VEC2, not in terms of bytes. |
| SCALAR_TO_VECTOR | SCALAR_TO_VECTOR(VAL) - This represents the operation of loading a scalar value into element 0 of the resultant vector type. The top elements 1 to N-1 of the N-element vector are undefined. The type of the operand must match the vector element type, except when they are integer types. In this case the operand is allowed to be wider than the vector element type, and is implicitly truncated to it. |
| MULHU | |
| MULHS | |
| AND | |
| OR | |
| XOR | |
| SHL | |
| SRA | |
| SRL | |
| ROTL | |
| ROTR | |
| BSWAP | |
| CTTZ | |
| CTLZ | |
| CTPOP | |
| SELECT | |
| SELECT_CC | |
| SETCC | |
| VSETCC | |
| SHL_PARTS | |
| SRA_PARTS | |
| SRL_PARTS | |
| SIGN_EXTEND | |
| ZERO_EXTEND | |
| ANY_EXTEND | |
| TRUNCATE | |
| SINT_TO_FP | |
| UINT_TO_FP | |
| SIGN_EXTEND_INREG | |
| FP_TO_SINT | FP_TO_[US]INT - Convert a floating point value to a signed or unsigned integer. |
| FP_TO_UINT | |
| FP_ROUND |
X = FP_ROUND(Y, TRUNC) - Rounding 'Y' from a larger floating point type down to the precision of the destination VT. TRUNC is a flag, which is always an integer that is zero or one. If TRUNC is 0, this is a normal rounding, if it is 1, this FP_ROUND is known to not change the value of Y. The TRUNC = 1 case is used in cases where we know that the value will not be modified by the node, because Y is not using any of the extra precision of source type. This allows certain transformations like FP_EXTEND(FP_ROUND(X,1)) -> X which are not safe for FP_EXTEND(FP_ROUND(X,0)) because the extra bits aren't removed. |
| FLT_ROUNDS_ | |
| FP_ROUND_INREG | X = FP_ROUND_INREG(Y, VT) - This operator takes an FP register, and rounds it to a floating point value. It then promotes it and returns it in a register of the same size. This operation effectively just discards excess precision. The type to round down to is specified by the VT operand, a VTSDNode. |
| FP_EXTEND | X = FP_EXTEND(Y) - Extend a smaller FP type into a larger FP type. |
| BIT_CONVERT | |
| CONVERT_RNDSAT | |
| FNEG | |
| FABS | |
| FSQRT | |
| FSIN | |
| FCOS | |
| FPOWI | |
| FPOW | |
| FLOG | |
| FLOG2 | |
| FLOG10 | |
| FEXP | |
| FEXP2 | |
| FCEIL | |
| FTRUNC | |
| FRINT | |
| FNEARBYINT | |
| FFLOOR | |
| LOAD | |
| STORE | |
| DYNAMIC_STACKALLOC | |
| BR | |
| BRIND | |
| BR_JT | |
| BRCOND | |
| BR_CC | |
| INLINEASM | |
| DBG_LABEL | |
| EH_LABEL | |
| DECLARE | |
| STACKSAVE | |
| STACKRESTORE | |
| CALLSEQ_START | |
| CALLSEQ_END | |
| VAARG | |
| VACOPY | |
| VAEND | |
| VASTART | |
| SRCVALUE | |
| MEMOPERAND | |
| PCMARKER | |
| READCYCLECOUNTER | |
| HANDLENODE | |
| DBG_STOPPOINT | |
| DEBUG_LOC | |
| TRAMPOLINE | |
| TRAP | |
| PREFETCH | |
| MEMBARRIER | |
| ATOMIC_CMP_SWAP | |
| ATOMIC_SWAP | |
| ATOMIC_LOAD_ADD | |
| ATOMIC_LOAD_SUB | |
| ATOMIC_LOAD_AND | |
| ATOMIC_LOAD_OR | |
| ATOMIC_LOAD_XOR | |
| ATOMIC_LOAD_NAND | |
| ATOMIC_LOAD_MIN | |
| ATOMIC_LOAD_MAX | |
| ATOMIC_LOAD_UMIN | |
| ATOMIC_LOAD_UMAX | |
| BUILTIN_OP_END |
Definition at line 79 of file SelectionDAGNodes.h.
| ISD::CondCode llvm::ISD::getSetCCAndOperation | ( | ISD::CondCode | Op1, | |
| ISD::CondCode | Op2, | |||
| bool | isInteger | |||
| ) |
getSetCCAndOperation - Return the result of a logical AND between different comparisons of identical values: ((X op1 Y) & (X op2 Y)). This function returns SETCC_INVALID if it is not possible to represent the resultant comparison.
getSetCCAndOperation - Return the result of a logical AND between different comparisons of identical values: ((X op1 Y) & (X op2 Y)). This function returns zero if it is not possible to represent the resultant comparison.
Definition at line 290 of file SelectionDAG.cpp.
References isSignedOp(), SETCC_INVALID, SETEQ, SETFALSE, SETOEQ, SETOGT, SETOLT, SETUEQ, SETUGT, SETULT, and SETUO.
| ISD::CondCode llvm::ISD::getSetCCInverse | ( | ISD::CondCode | Op, | |
| bool | isInteger | |||
| ) |
getSetCCInverse - Return the operation corresponding to !(X op Y), where 'op' is a valid SetCC operation.
getSetCCInverse - Return the operation corresponding to !(X op Y), where 'op' is a valid SetCC operation.
Definition at line 229 of file SelectionDAG.cpp.
References SETTRUE2.
Referenced by combineSelectAndUse(), and llvm::TargetLowering::SimplifySetCC().
| ISD::CondCode llvm::ISD::getSetCCOrOperation | ( | ISD::CondCode | Op1, | |
| ISD::CondCode | Op2, | |||
| bool | isInteger | |||
| ) |
getSetCCOrOperation - Return the result of a logical OR between different comparisons of identical values: ((X op1 Y) | (X op2 Y)). This function returns SETCC_INVALID if it is not possible to represent the resultant comparison.
getSetCCOrOperation - Return the result of a logical OR between different comparisons of identical values: ((X op1 Y) | (X op2 Y)). This function returns SETCC_INVALID if it is not possible to represent the resultant comparison.
Definition at line 266 of file SelectionDAG.cpp.
References isSignedOp(), Op, SETCC_INVALID, SETNE, SETTRUE2, and SETUNE.
| ISD::CondCode llvm::ISD::getSetCCSwappedOperands | ( | ISD::CondCode | Operation | ) |
getSetCCSwappedOperands - Return the operation corresponding to (Y op X) when given the operation for (X op Y).
getSetCCSwappedOperands - Return the operation corresponding to (Y op X) when given the operation for (X op Y).
Definition at line 217 of file SelectionDAG.cpp.
Referenced by llvm::SelectionDAG::FoldSetCC(), llvm::TargetLowering::SimplifySetCC(), and TranslateX86CC().
| unsigned llvm::ISD::getUnorderedFlavor | ( | CondCode | Cond | ) | [inline] |
getUnorderedFlavor - This function returns 0 if the condition is always false if an operand is a NaN, 1 if the condition is always true if the operand is a NaN, and 2 if the condition is undefined if the operand is a NaN.
Definition at line 775 of file SelectionDAGNodes.h.
Referenced by llvm::TargetLowering::SimplifySetCC().
Node predicates.
isBuildVectorAllOnes - Return true if the specified node is a BUILD_VECTOR where all of the elements are ~0 or undef.
isBuildVectorAllOnes - Return true if the specified node is a BUILD_VECTOR where all of the elements are ~0 or undef.
Definition at line 104 of file SelectionDAG.cpp.
References BIT_CONVERT, BUILD_VECTOR, llvm::SDValue::getNode(), llvm::SDNode::getNumOperands(), llvm::SDNode::getOpcode(), llvm::SDValue::getOpcode(), llvm::SDNode::getOperand(), and UNDEF.
isBuildVectorAllZeros - Return true if the specified node is a BUILD_VECTOR where all of the elements are 0 or undef.
isBuildVectorAllZeros - Return true if the specified node is a BUILD_VECTOR where all of the elements are 0 or undef.
Definition at line 145 of file SelectionDAG.cpp.
References BIT_CONVERT, BUILD_VECTOR, llvm::SDValue::getNode(), llvm::SDNode::getNumOperands(), llvm::SDNode::getOpcode(), llvm::SDValue::getOpcode(), llvm::SDNode::getOperand(), and UNDEF.
Referenced by isZeroShuffle(), and LowerVSETCC().
isDebugLabel - Return true if the specified node represents a debug label (i.e. ISD::DBG_LABEL or TargetInstrInfo::DBG_LABEL node).
isDebugLabel - Return true if the specified node represents a debug label (i.e. ISD::DBG_LABEL or TargetInstrInfo::DBG_LABEL node).
Definition at line 205 of file SelectionDAG.cpp.
References DBG_LABEL, llvm::TargetInstrInfo::DBG_LABEL, llvm::SDNode::getMachineOpcode(), llvm::SDNode::getOpcode(), and llvm::SDNode::isMachineOpcode().
| bool llvm::ISD::isEXTLoad | ( | const SDNode * | N | ) | [inline] |
isEXTLoad - Returns true if the specified node is a EXTLOAD.
Definition at line 2441 of file SelectionDAGNodes.h.
References EXTLOAD.
Referenced by llvm::PIC16TargetLowering::ExpandLoad(), and isFloatingPointZero().
| bool llvm::ISD::isNON_EXTLoad | ( | const SDNode * | N | ) | [inline] |
isNON_EXTLoad - Returns true if the specified node is a non-extending load.
Definition at line 2434 of file SelectionDAGNodes.h.
References NON_EXTLOAD.
Referenced by EltsFromConsecutiveLoads(), llvm::PIC16TargetLowering::ExpandLoad(), isFloatingPointZero(), isScalarLoadToVector(), llvm::PPCTargetLowering::PerformDAGCombine(), ShouldXformToMOVLP(), and TranslateX86CC().
| bool llvm::ISD::isNON_TRUNCStore | ( | const SDNode * | N | ) | [inline] |
isNON_TRUNCStore - Returns true if the specified node is a non-truncating store.
Definition at line 2477 of file SelectionDAGNodes.h.
| bool llvm::ISD::isNormalLoad | ( | const SDNode * | N | ) | [inline] |
isNormalLoad - Returns true if the specified node is a non-extending and unindexed load.
Definition at line 2426 of file SelectionDAGNodes.h.
References llvm::dyn_cast(), llvm::LSBaseSDNode::getAddressingMode(), llvm::LoadSDNode::getExtensionType(), NON_EXTLOAD, and UNINDEXED.
Referenced by PerformSTORECombine().
| bool llvm::ISD::isNormalStore | ( | const SDNode * | N | ) | [inline] |
isNormalStore - Returns true if the specified node is a non-truncating and unindexed store.
Definition at line 2469 of file SelectionDAGNodes.h.
References llvm::dyn_cast(), llvm::LSBaseSDNode::getAddressingMode(), llvm::StoreSDNode::isTruncatingStore(), and UNINDEXED.
isScalarToVector - Return true if the specified node is a ISD::SCALAR_TO_VECTOR node or a BUILD_VECTOR node where only the low element is not an undef.
isScalarToVector - Return true if the specified node is a ISD::SCALAR_TO_VECTOR node or a BUILD_VECTOR node where only the low element is not an undef.
Definition at line 185 of file SelectionDAG.cpp.
References BUILD_VECTOR, llvm::SDNode::getNumOperands(), llvm::SDNode::getOpcode(), llvm::SDValue::getOpcode(), llvm::SDNode::getOperand(), SCALAR_TO_VECTOR, UNDEF, and V.
| bool llvm::ISD::isSEXTLoad | ( | const SDNode * | N | ) | [inline] |
isSEXTLoad - Returns true if the specified node is a SEXTLOAD.
Definition at line 2448 of file SelectionDAGNodes.h.
References SEXTLOAD.
Referenced by llvm::PIC16TargetLowering::ExpandLoad(), llvm::ARMTargetLowering::getPostIndexedAddressParts(), and llvm::ARMTargetLowering::getPreIndexedAddressParts().
| bool llvm::ISD::isSignedIntSetCC | ( | CondCode | Code | ) | [inline] |
isSignedIntSetCC - Return true if this is a setcc instruction that performs a signed comparison when used with integer operands.
Definition at line 754 of file SelectionDAGNodes.h.
References SETGE, SETGT, SETLE, and SETLT.
Referenced by ExtendUsesToFormExtLoad(), and llvm::TargetLowering::SimplifySetCC().
| bool llvm::ISD::isTrueWhenEqual | ( | CondCode | Cond | ) | [inline] |
isTrueWhenEqual - Return true if the specified condition returns true if the two operands to the condition are equal. Note that if one of the two operands is a NaN, this value is meaningless.
Definition at line 767 of file SelectionDAGNodes.h.
Referenced by GetResultOfComparison(), llvm::ScalarEvolution::isKnownPredicate(), llvm::ICmpInst::isTrueWhenEqual(), and llvm::TargetLowering::SimplifySetCC().
| bool llvm::ISD::isTRUNCStore | ( | const SDNode * | N | ) | [inline] |
isTRUNCStore - Returns true if the specified node is a truncating store.
Definition at line 2483 of file SelectionDAGNodes.h.
| bool llvm::ISD::isUNINDEXEDLoad | ( | const SDNode * | N | ) | [inline] |
isUNINDEXEDLoad - Returns true if the specified node is an unindexed load.
Definition at line 2462 of file SelectionDAGNodes.h.
References UNINDEXED.
| bool llvm::ISD::isUNINDEXEDStore | ( | const SDNode * | N | ) | [inline] |
isUNINDEXEDStore - Returns true if the specified node is an unindexed store.
Definition at line 2489 of file SelectionDAGNodes.h.
References UNINDEXED.
| bool llvm::ISD::isUnsignedIntSetCC | ( | CondCode | Code | ) | [inline] |
| bool llvm::ISD::isZEXTLoad | ( | const SDNode * | N | ) | [inline] |
isZEXTLoad - Returns true if the specified node is a ZEXTLOAD.
Definition at line 2455 of file SelectionDAGNodes.h.
References ZEXTLOAD.
Referenced by llvm::SelectionDAG::ComputeMaskedBits(), and llvm::PIC16TargetLowering::ExpandLoad().