LLVM API Documentation
#include <InstrTypes.h>
Public Member Functions | |
void * | operator new (size_t s) |
DECLARE_TRANSPARENT_OPERAND_ACCESSORS (Value) | |
Transparently provide more efficient getOperand methods. More... | |
DEFINE_HELPERS (Add, NSW) DEFINE_HELPERS(Add | |
NUW | DEFINE_HELPERS (Sub, NSW) DEFINE_HELPERS(Sub |
NUW NUW | DEFINE_HELPERS (Mul, NSW) DEFINE_HELPERS(Mul |
NUW NUW NUW | DEFINE_HELPERS (Shl, NSW) DEFINE_HELPERS(Shl |
NUW NUW NUW NUW | DEFINE_HELPERS (SDiv, Exact) DEFINE_HELPERS(UDiv |
NUW NUW NUW NUW Exact | DEFINE_HELPERS (AShr, Exact) DEFINE_HELPERS(LShr |
BinaryOps | getOpcode () const |
bool | swapOperands () |
void | setHasNoUnsignedWrap (bool b=true) |
void | setHasNoSignedWrap (bool b=true) |
void | setIsExact (bool b=true) |
bool | hasNoUnsignedWrap () const |
hasNoUnsignedWrap - Determine whether the no unsigned wrap flag is set. More... | |
bool | hasNoSignedWrap () const |
hasNoSignedWrap - Determine whether the no signed wrap flag is set. More... | |
bool | isExact () const |
isExact - Determine whether the exact flag is set. More... | |
![]() | |
~Instruction () | |
Instruction * | use_back () |
const Instruction * | use_back () const |
const BasicBlock * | getParent () const |
BasicBlock * | getParent () |
void | removeFromParent () |
void | eraseFromParent () |
void | insertBefore (Instruction *InsertPos) |
void | insertAfter (Instruction *InsertPos) |
void | moveBefore (Instruction *MovePos) |
unsigned | getOpcode () const |
getOpcode() returns a member of one of the enums like Instruction::Add. More... | |
const char * | getOpcodeName () const |
bool | isTerminator () const |
bool | isBinaryOp () const |
bool | isShift () |
bool | isCast () const |
bool | isLogicalShift () const |
bool | isArithmeticShift () const |
isArithmeticShift - Return true if this is an arithmetic shift right. More... | |
bool | hasMetadata () const |
bool | hasMetadataOtherThanDebugLoc () const |
MDNode * | getMetadata (unsigned KindID) const |
MDNode * | getMetadata (StringRef Kind) const |
void | getAllMetadata (SmallVectorImpl< std::pair< unsigned, MDNode * > > &MDs) const |
void | getAllMetadataOtherThanDebugLoc (SmallVectorImpl< std::pair< unsigned, MDNode * > > &MDs) const |
void | setMetadata (unsigned KindID, MDNode *Node) |
void | setMetadata (StringRef Kind, MDNode *Node) |
void | setDebugLoc (const DebugLoc &Loc) |
setDebugLoc - Set the debug location information for this instruction. More... | |
const DebugLoc & | getDebugLoc () const |
getDebugLoc - Return the debug location for this node as a DebugLoc. More... | |
void | setHasUnsafeAlgebra (bool B) |
void | setHasNoNaNs (bool B) |
void | setHasNoInfs (bool B) |
void | setHasNoSignedZeros (bool B) |
void | setHasAllowReciprocal (bool B) |
void | setFastMathFlags (FastMathFlags FMF) |
bool | hasUnsafeAlgebra () const |
Determine whether the unsafe-algebra flag is set. More... | |
bool | hasNoNaNs () const |
Determine whether the no-NaNs flag is set. More... | |
bool | hasNoInfs () const |
Determine whether the no-infs flag is set. More... | |
bool | hasNoSignedZeros () const |
Determine whether the no-signed-zeros flag is set. More... | |
bool | hasAllowReciprocal () const |
Determine whether the allow-reciprocal flag is set. More... | |
FastMathFlags | getFastMathFlags () const |
void | copyFastMathFlags (const Instruction *I) |
Copy I's fast-math flags. More... | |
bool | isAssociative () const |
bool | isCommutative () const |
bool | isIdempotent () const |
bool | isNilpotent () const |
bool | mayWriteToMemory () const |
bool | mayReadFromMemory () const |
bool | mayReadOrWriteMemory () const |
bool | mayThrow () const |
bool | mayReturn () const |
bool | mayHaveSideEffects () const |
Instruction * | clone () const |
bool | isIdenticalTo (const Instruction *I) const |
bool | isIdenticalToWhenDefined (const Instruction *I) const |
bool | isSameOperationAs (const Instruction *I, unsigned flags=0) const |
Determine if one instruction is the same operation as another. More... | |
bool | isUsedOutsideOfBlock (const BasicBlock *BB) const |
![]() | |
~User () | |
void | operator delete (void *Usr) |
operator delete - free memory allocated for User and Use objects More... | |
void | operator delete (void *, unsigned) |
placement delete - required by std, but never called. More... | |
void | operator delete (void *, unsigned, bool) |
placement delete - required by std, but never called. More... | |
Value * | getOperand (unsigned i) const |
void | setOperand (unsigned i, Value *Val) |
const Use & | getOperandUse (unsigned i) const |
Use & | getOperandUse (unsigned i) |
unsigned | getNumOperands () const |
op_iterator | op_begin () |
const_op_iterator | op_begin () const |
op_iterator | op_end () |
const_op_iterator | op_end () const |
value_op_iterator | value_op_begin () |
value_op_iterator | value_op_end () |
void | dropAllReferences () |
void | replaceUsesOfWith (Value *From, Value *To) |
![]() | |
virtual | ~Value () |
void | dump () const |
dump - Support for debugging, callable in GDB: V->dump() More... | |
void | print (raw_ostream &O, AssemblyAnnotationWriter *AAW=0) const |
Type * | getType () const |
LLVMContext & | getContext () const |
All values hold a context through their type. More... | |
bool | hasName () const |
ValueName * | getValueName () const |
void | setValueName (ValueName *VN) |
StringRef | getName () const |
void | setName (const Twine &Name) |
void | takeName (Value *V) |
void | replaceAllUsesWith (Value *V) |
bool | use_empty () const |
use_iterator | use_begin () |
const_use_iterator | use_begin () const |
use_iterator | use_end () |
const_use_iterator | use_end () const |
User * | use_back () |
const User * | use_back () const |
bool | hasOneUse () const |
bool | hasNUses (unsigned N) const |
bool | hasNUsesOrMore (unsigned N) const |
bool | isUsedInBasicBlock (const BasicBlock *BB) const |
unsigned | getNumUses () const |
void | addUse (Use &U) |
unsigned | getValueID () const |
unsigned | getRawSubclassOptionalData () const |
void | clearSubclassOptionalData () |
bool | hasSameSubclassOptionalData (const Value *V) const |
void | intersectOptionalDataWith (const Value *V) |
bool | hasValueHandle () const |
Value * | stripPointerCasts () |
Strips off any unneeded pointer casts, all-zero GEPs and aliases from the specified value, returning the original uncasted value. More... | |
const Value * | stripPointerCasts () const |
Value * | stripPointerCastsNoFollowAliases () |
Strips off any unneeded pointer casts and all-zero GEPs from the specified value, returning the original uncasted value. More... | |
const Value * | stripPointerCastsNoFollowAliases () const |
Value * | stripInBoundsConstantOffsets () |
Strips off unneeded pointer casts and all-constant GEPs from the specified value, returning the original pointer value. More... | |
const Value * | stripInBoundsConstantOffsets () const |
Value * | stripAndAccumulateInBoundsConstantOffsets (const DataLayout &DL, APInt &Offset) |
Strips like stripInBoundsConstantOffsets but also accumulates the constant offset stripped. More... | |
const Value * | stripAndAccumulateInBoundsConstantOffsets (const DataLayout &DL, APInt &Offset) const |
Value * | stripInBoundsOffsets () |
Strips off unneeded pointer casts and any in-bounds offsets from the specified value, returning the original pointer value. More... | |
const Value * | stripInBoundsOffsets () const |
bool | isDereferenceablePointer () const |
Value * | DoPHITranslation (const BasicBlock *CurBB, const BasicBlock *PredBB) |
const Value * | DoPHITranslation (const BasicBlock *CurBB, const BasicBlock *PredBB) const |
void | mutateType (Type *Ty) |
![]() | |
Instruction * | getPrevNode () |
Get the previous node, or 0 for the list head. More... | |
const Instruction * | getPrevNode () const |
Get the previous node, or 0 for the list head. More... | |
Instruction * | getNextNode () |
Get the next node, or 0 for the list tail. More... | |
const Instruction * | getNextNode () const |
Get the next node, or 0 for the list tail. More... | |
Static Public Member Functions | |
static BinaryOperator * | Create (BinaryOps Op, Value *S1, Value *S2, const Twine &Name=Twine(), Instruction *InsertBefore=0) |
static BinaryOperator * | Create (BinaryOps Op, Value *S1, Value *S2, const Twine &Name, BasicBlock *InsertAtEnd) |
static BinaryOperator * | CreateNSW (BinaryOps Opc, Value *V1, Value *V2, const Twine &Name="") |
static BinaryOperator * | CreateNSW (BinaryOps Opc, Value *V1, Value *V2, const Twine &Name, BasicBlock *BB) |
static BinaryOperator * | CreateNSW (BinaryOps Opc, Value *V1, Value *V2, const Twine &Name, Instruction *I) |
static BinaryOperator * | CreateNUW (BinaryOps Opc, Value *V1, Value *V2, const Twine &Name="") |
static BinaryOperator * | CreateNUW (BinaryOps Opc, Value *V1, Value *V2, const Twine &Name, BasicBlock *BB) |
static BinaryOperator * | CreateNUW (BinaryOps Opc, Value *V1, Value *V2, const Twine &Name, Instruction *I) |
static BinaryOperator * | CreateExact (BinaryOps Opc, Value *V1, Value *V2, const Twine &Name="") |
static BinaryOperator * | CreateExact (BinaryOps Opc, Value *V1, Value *V2, const Twine &Name, BasicBlock *BB) |
static BinaryOperator * | CreateExact (BinaryOps Opc, Value *V1, Value *V2, const Twine &Name, Instruction *I) |
NUW NUW NUW NUW Exact static Exact BinaryOperator * | CreateNeg (Value *Op, const Twine &Name="", Instruction *InsertBefore=0) |
static BinaryOperator * | CreateNeg (Value *Op, const Twine &Name, BasicBlock *InsertAtEnd) |
static BinaryOperator * | CreateNSWNeg (Value *Op, const Twine &Name="", Instruction *InsertBefore=0) |
static BinaryOperator * | CreateNSWNeg (Value *Op, const Twine &Name, BasicBlock *InsertAtEnd) |
static BinaryOperator * | CreateNUWNeg (Value *Op, const Twine &Name="", Instruction *InsertBefore=0) |
static BinaryOperator * | CreateNUWNeg (Value *Op, const Twine &Name, BasicBlock *InsertAtEnd) |
static BinaryOperator * | CreateFNeg (Value *Op, const Twine &Name="", Instruction *InsertBefore=0) |
static BinaryOperator * | CreateFNeg (Value *Op, const Twine &Name, BasicBlock *InsertAtEnd) |
static BinaryOperator * | CreateNot (Value *Op, const Twine &Name="", Instruction *InsertBefore=0) |
static BinaryOperator * | CreateNot (Value *Op, const Twine &Name, BasicBlock *InsertAtEnd) |
static bool | isNeg (const Value *V) |
static bool | isFNeg (const Value *V, bool IgnoreZeroSign=false) |
static bool | isNot (const Value *V) |
static const Value * | getNegArgument (const Value *BinOp) |
static Value * | getNegArgument (Value *BinOp) |
static const Value * | getFNegArgument (const Value *BinOp) |
static Value * | getFNegArgument (Value *BinOp) |
static const Value * | getNotArgument (const Value *BinOp) |
static Value * | getNotArgument (Value *BinOp) |
static bool | classof (const Instruction *I) |
static bool | classof (const Value *V) |
![]() | |
static const char * | getOpcodeName (unsigned OpCode) |
static bool | isTerminator (unsigned OpCode) |
static bool | isBinaryOp (unsigned Opcode) |
static bool | isShift (unsigned Opcode) |
Determine if the Opcode is one of the shift instructions. More... | |
static bool | isCast (unsigned OpCode) |
Determine if the OpCode is one of the CastInst instructions. More... | |
static bool | isAssociative (unsigned op) |
static bool | isCommutative (unsigned op) |
static bool | isIdempotent (unsigned op) |
static bool | isNilpotent (unsigned op) |
static bool | classof (const Value *V) |
Methods for support type inquiry through isa, cast, and dyn_cast: More... | |
![]() | |
static bool | classof (const Value *V) |
Protected Member Functions | |
void | init (BinaryOps iType) |
BinaryOperator (BinaryOps iType, Value *S1, Value *S2, Type *Ty, const Twine &Name, Instruction *InsertBefore) | |
BinaryOperator (BinaryOps iType, Value *S1, Value *S2, Type *Ty, const Twine &Name, BasicBlock *InsertAtEnd) | |
virtual BinaryOperator * | clone_impl () const LLVM_OVERRIDE |
![]() | |
void | setInstructionSubclassData (unsigned short D) |
unsigned | getSubclassDataFromInstruction () const |
Instruction (Type *Ty, unsigned iType, Use *Ops, unsigned NumOps, Instruction *InsertBefore=0) | |
Instruction (Type *Ty, unsigned iType, Use *Ops, unsigned NumOps, BasicBlock *InsertAtEnd) | |
![]() | |
void * | operator new (size_t s, unsigned Us) |
User (Type *ty, unsigned vty, Use *OpList, unsigned NumOps) | |
Use * | allocHungoffUses (unsigned) const |
void | dropHungoffUses () |
template<int Idx> | |
Use & | Op () |
template<int Idx> | |
const Use & | Op () const |
![]() | |
virtual void | printCustom (raw_ostream &O) const |
Value (Type *Ty, unsigned scid) | |
unsigned short | getSubclassDataFromValue () const |
void | setValueSubclassData (unsigned short D) |
![]() | |
ilist_node () | |
Definition at line 138 of file InstrTypes.h.
|
protected |
Definition at line 1732 of file Instructions.cpp.
References init(), and llvm::Value::setName().
Referenced by Create(), CreateFNeg(), CreateNeg(), and CreateNot().
|
protected |
Definition at line 1745 of file Instructions.cpp.
References init(), and llvm::Value::setName().
|
inlinestatic |
Definition at line 362 of file InstrTypes.h.
References llvm::Instruction::isBinaryOp().
Definition at line 365 of file InstrTypes.h.
|
protectedvirtual |
Implements llvm::Instruction.
Definition at line 3515 of file Instructions.cpp.
References Create(), and getOpcode().
|
static |
Create() - Construct a binary instruction, given the opcode and the two operands. Optionally (if InstBefore is specified) insert the instruction into a BasicBlock right before the specified instruction. The specified Instruction is allowed to be a dereferenced end iterator.
Definition at line 1834 of file Instructions.cpp.
References BinaryOperator(), and llvm::Value::getType().
Referenced by BuildNew(), clone_impl(), llvm::InstCombiner::commonIDivTransforms(), Create(), llvm::NoFolder::CreateBinOp(), llvm::IRBuilder< true, TargetFolder >::CreateBinOp(), llvm::InstCombiner::FoldSelectIntoOp(), llvm::InstCombiner::FoldSelectOpOp(), llvm::InstCombiner::FoldShiftByConstant(), llvm::ConstantExpr::getAsInstruction(), llvm::InstCombiner::visitAnd(), llvm::InstCombiner::visitExtractElementInst(), llvm::InstCombiner::visitFPTrunc(), llvm::InstCombiner::visitOr(), llvm::InstCombiner::visitXor(), and llvm::InstCombiner::visitZExt().
|
static |
Create() - Construct a binary instruction, given the opcode and the two operands. Also automatically insert this instruction to the end of the BasicBlock specified.
Definition at line 1842 of file Instructions.cpp.
References Create(), llvm::BasicBlock::getInstList(), and llvm::iplist< NodeTy, Traits >::push_back().
|
inlinestatic |
Definition at line 232 of file InstrTypes.h.
References setIsExact().
|
inlinestatic |
Definition at line 238 of file InstrTypes.h.
References setIsExact().
|
inlinestatic |
Definition at line 244 of file InstrTypes.h.
References setIsExact().
|
static |
Definition at line 1890 of file Instructions.cpp.
References BinaryOperator(), llvm::Value::getType(), and llvm::ConstantFP::getZeroValueForNegation().
Referenced by llvm::NoFolder::CreateFNeg(), llvm::IRBuilder< true, TargetFolder >::CreateFNeg(), and llvm::InstCombiner::visitFPTrunc().
|
static |
Definition at line 1897 of file Instructions.cpp.
References BinaryOperator(), llvm::Value::getType(), and llvm::ConstantFP::getZeroValueForNegation().
|
static |
Helper functions to construct and inspect unary operations (NEG and NOT) via binary operators SUB and XOR:
CreateNeg, CreateNot - Create the NEG and NOT instructions out of SUB and XOR instructions.
Definition at line 1850 of file Instructions.cpp.
References BinaryOperator(), llvm::Value::getType(), and llvm::ConstantFP::getZeroValueForNegation().
Referenced by llvm::NoFolder::CreateNeg(), llvm::IRBuilder< true, TargetFolder >::CreateNeg(), NegateValue(), llvm::InstCombiner::visitAdd(), llvm::InstCombiner::visitMul(), llvm::InstCombiner::visitSDiv(), and llvm::InstCombiner::visitSub().
|
static |
Definition at line 1858 of file Instructions.cpp.
References BinaryOperator(), llvm::Value::getType(), and llvm::ConstantFP::getZeroValueForNegation().
|
static |
Definition at line 1904 of file Instructions.cpp.
References BinaryOperator(), llvm::Constant::getAllOnesValue(), llvm::Value::getType(), and llvm::APIntOps::Xor().
Referenced by llvm::NoFolder::CreateNot(), llvm::IRBuilder< true, TargetFolder >::CreateNot(), OptimizeGlobalAddressOfMalloc(), llvm::InstCombiner::visitAnd(), llvm::InstCombiner::visitICmpInst(), llvm::InstCombiner::visitICmpInstWithCastAndCast(), llvm::InstCombiner::visitOr(), and llvm::InstCombiner::visitSub().
|
static |
Definition at line 1911 of file Instructions.cpp.
References BinaryOperator(), llvm::Constant::getAllOnesValue(), llvm::Value::getType(), and llvm::APIntOps::Xor().
|
inlinestatic |
Definition at line 194 of file InstrTypes.h.
References setHasNoSignedWrap().
|
inlinestatic |
Definition at line 200 of file InstrTypes.h.
References setHasNoSignedWrap().
|
inlinestatic |
Definition at line 206 of file InstrTypes.h.
References setHasNoSignedWrap().
|
static |
Definition at line 1866 of file Instructions.cpp.
References llvm::Value::getType(), and llvm::ConstantFP::getZeroValueForNegation().
Referenced by llvm::NoFolder::CreateNSWNeg().
|
static |
Definition at line 1872 of file Instructions.cpp.
References llvm::Value::getType(), and llvm::ConstantFP::getZeroValueForNegation().
|
inlinestatic |
Definition at line 213 of file InstrTypes.h.
References setHasNoUnsignedWrap().
|
inlinestatic |
Definition at line 219 of file InstrTypes.h.
References setHasNoUnsignedWrap().
|
inlinestatic |
Definition at line 225 of file InstrTypes.h.
References setHasNoUnsignedWrap().
|
static |
Definition at line 1878 of file Instructions.cpp.
References llvm::Value::getType(), and llvm::ConstantFP::getZeroValueForNegation().
Referenced by llvm::NoFolder::CreateNUWNeg().
|
static |
Definition at line 1884 of file Instructions.cpp.
References llvm::Value::getType(), and llvm::ConstantFP::getZeroValueForNegation().
llvm::BinaryOperator::DECLARE_TRANSPARENT_OPERAND_ACCESSORS | ( | Value | ) |
Transparently provide more efficient getOperand methods.
llvm::BinaryOperator::DEFINE_HELPERS | ( | Add | , |
NSW | |||
) |
NUW llvm::BinaryOperator::DEFINE_HELPERS | ( | Sub | , |
NSW | |||
) |
NUW NUW llvm::BinaryOperator::DEFINE_HELPERS | ( | Mul | , |
NSW | |||
) |
NUW NUW NUW llvm::BinaryOperator::DEFINE_HELPERS | ( | Shl | , |
NSW | |||
) |
NUW NUW NUW NUW llvm::BinaryOperator::DEFINE_HELPERS | ( | SDiv | , |
Exact | |||
) |
NUW NUW NUW NUW Exact llvm::BinaryOperator::DEFINE_HELPERS | ( | AShr | , |
Exact | |||
) |
Definition at line 1965 of file Instructions.cpp.
Definition at line 1961 of file Instructions.cpp.
References llvm::User::getOperand().
getNegArgument, getNotArgument - Helper functions to extract the unary argument of a NEG, FNEG or NOT operation implemented via Sub, FSub, or Xor.
Definition at line 1957 of file Instructions.cpp.
Definition at line 1953 of file Instructions.cpp.
References llvm::User::getOperand().
Definition at line 1980 of file Instructions.cpp.
Referenced by dyn_castNotVal(), OptimizeAndOrXor(), and llvm::InstCombiner::visitSelectInst().
Definition at line 1969 of file Instructions.cpp.
References llvm::User::getOperand(), isConstantAllOnes(), and isNot().
|
inline |
Definition at line 326 of file InstrTypes.h.
References llvm::Instruction::getOpcode().
Referenced by clone_impl(), llvm::InstCombiner::commonIDivTransforms(), llvm::expandDivision(), llvm::expandDivisionUpTo32Bits(), llvm::expandRemainder(), llvm::expandRemainderUpTo32Bits(), FactorizeBinOp(), llvm::InstCombiner::FoldICmpDivCst(), llvm::InstCombiner::FoldICmpShrCst(), llvm::InstCombiner::FoldOrOfICmps(), llvm::InstCombiner::FoldSelectIntoOp(), llvm::InstCombiner::FoldShiftByConstant(), LinearizeExprTree(), MaintainNoSignedWrap(), matchPairwiseReduction(), matchPairwiseReductionAtLevel(), matchVectorSplittingReduction(), SimplifyAssociativeBinOp(), SimplifyICmpInst(), swapMayExposeCSEOpportunities(), llvm::Interpreter::visitBinaryOperator(), llvm::InstCombiner::visitFPTrunc(), llvm::InstCombiner::visitICmpInst(), llvm::InstCombiner::visitICmpInstWithInstAndIntCst(), llvm::InstCombiner::visitMul(), llvm::InstCombiner::visitXor(), and llvm::InstCombiner::visitZExt().
bool BinaryOperator::hasNoSignedWrap | ( | ) | const |
hasNoSignedWrap - Determine whether the no signed wrap flag is set.
Definition at line 2013 of file Instructions.cpp.
Referenced by BuildNew(), llvm::InstCombiner::FoldSelectIntoOp(), llvm::InstCombiner::FoldShiftByConstant(), patchReplacementInstruction(), SimplifyICmpInst(), llvm::InstCombiner::visitAdd(), llvm::InstCombiner::visitICmpInst(), llvm::InstCombiner::visitMul(), llvm::InstCombiner::visitShl(), and llvm::InstCombiner::visitSub().
bool BinaryOperator::hasNoUnsignedWrap | ( | ) | const |
hasNoUnsignedWrap - Determine whether the no unsigned wrap flag is set.
Definition at line 2009 of file Instructions.cpp.
Referenced by BuildNew(), llvm::InstCombiner::FoldSelectIntoOp(), llvm::InstCombiner::FoldShiftByConstant(), patchReplacementInstruction(), SimplifyICmpInst(), llvm::InstCombiner::visitAdd(), llvm::InstCombiner::visitICmpInst(), llvm::InstCombiner::visitMul(), llvm::InstCombiner::visitShl(), and llvm::InstCombiner::visitSub().
|
protected |
Definition at line 1759 of file Instructions.cpp.
References llvm::APIntOps::And(), llvm::User::getOperand(), llvm::Value::getType(), llvm::APIntOps::Or(), and llvm::APIntOps::Xor().
Referenced by BinaryOperator().
bool BinaryOperator::isExact | ( | ) | const |
isExact - Determine whether the exact flag is set.
Definition at line 2017 of file Instructions.cpp.
Referenced by BuildNew(), llvm::InstCombiner::FoldICmpDivCst(), llvm::InstCombiner::FoldICmpShrCst(), llvm::InstCombiner::FoldSelectIntoOp(), llvm::InstCombiner::FoldShiftByConstant(), foldUDivPow2Cst(), foldUDivShl(), SimplifyICmpInst(), llvm::InstCombiner::visitAShr(), llvm::InstCombiner::visitICmpInst(), llvm::InstCombiner::visitICmpInstWithInstAndIntCst(), llvm::InstCombiner::visitLShr(), llvm::InstCombiner::visitSDiv(), and llvm::InstCombiner::visitUDiv().
Definition at line 1934 of file Instructions.cpp.
References llvm::Instruction::hasNoSignedZeros().
Referenced by llvm::getComplexity(), llvm::FastISel::SelectOperator(), llvm::InstCombiner::visitFMul(), and llvm::InstCombiner::visitFPTrunc().
isNeg, isFNeg, isNot - Check if the given Value is a NEG, FNeg, or NOT instruction.
Definition at line 1926 of file Instructions.cpp.
Referenced by llvm::getComplexity(), LinearizeExprTree(), NegateValue(), and ShouldBreakUpSubtract().
Definition at line 1945 of file Instructions.cpp.
References isConstantAllOnes(), and llvm::APIntOps::Xor().
Referenced by dyn_castNotVal(), llvm::getComplexity(), getNotArgument(), isFreeToInvert(), OptimizeAndOrXor(), and llvm::InstCombiner::visitSelectInst().
|
inline |
Definition at line 149 of file InstrTypes.h.
setHasNoSignedWrap - Set or clear the nsw flag on this instruction, which must be an operator which supports this flag. See LangRef.html for the meaning of this flag.
Definition at line 2001 of file Instructions.cpp.
Referenced by llvm::NoFolder::CreateAdd(), llvm::NoFolder::CreateMul(), llvm::NoFolder::CreateNeg(), CreateNSW(), llvm::NoFolder::CreateShl(), llvm::NoFolder::CreateSub(), llvm::InstCombiner::FoldShiftByConstant(), llvm::ConstantExpr::getAsInstruction(), GetShiftedValue(), patchReplacementInstruction(), llvm::InstCombiner::visitAdd(), llvm::InstCombiner::visitMul(), llvm::InstCombiner::visitShl(), and llvm::InstCombiner::visitSub().
setHasNoUnsignedWrap - Set or clear the nsw flag on this instruction, which must be an operator which supports this flag. See LangRef.html for the meaning of this flag.
Definition at line 1997 of file Instructions.cpp.
Referenced by llvm::NoFolder::CreateAdd(), llvm::NoFolder::CreateMul(), llvm::NoFolder::CreateNeg(), CreateNUW(), llvm::NoFolder::CreateShl(), llvm::NoFolder::CreateSub(), llvm::InstCombiner::FoldShiftByConstant(), llvm::ConstantExpr::getAsInstruction(), GetShiftedValue(), llvm::InstCombiner::visitAdd(), llvm::InstCombiner::visitMul(), llvm::InstCombiner::visitShl(), and llvm::InstCombiner::visitSub().
setIsExact - Set or clear the exact flag on this instruction, which must be an operator which supports this flag. See LangRef.html for the meaning of this flag.
Definition at line 2005 of file Instructions.cpp.
Referenced by CreateExact(), llvm::InstCombiner::FoldSelectIntoOp(), llvm::InstCombiner::FoldShiftByConstant(), foldUDivPow2Cst(), foldUDivShl(), llvm::ConstantExpr::getAsInstruction(), GetShiftedValue(), llvm::InstCombiner::visitAShr(), and llvm::InstCombiner::visitLShr().
bool BinaryOperator::swapOperands | ( | ) |
swapOperands - Exchange the two operands to this instruction. This instruction is safe to use on any binary instruction and does not modify the semantics of the instruction. If the instruction cannot be reversed (ie, it's a Div), then return true.
Definition at line 1990 of file Instructions.cpp.
References llvm::Instruction::isCommutative(), and llvm::swap().
Referenced by llvm::InstCombiner::visitXor().