LLVM API Documentation
#include <InstrTypes.h>
Definition at line 135 of file InstrTypes.h.
BinaryOperator::BinaryOperator | ( | BinaryOps | iType, |
Value * | S1, | ||
Value * | S2, | ||
Type * | Ty, | ||
const Twine & | Name, | ||
Instruction * | InsertBefore | ||
) | [protected] |
Definition at line 1745 of file Instructions.cpp.
References init(), and llvm::Value::setName().
Referenced by Create(), CreateFNeg(), CreateNeg(), and CreateNot().
BinaryOperator::BinaryOperator | ( | BinaryOps | iType, |
Value * | S1, | ||
Value * | S2, | ||
Type * | Ty, | ||
const Twine & | Name, | ||
BasicBlock * | InsertAtEnd | ||
) | [protected] |
Definition at line 1758 of file Instructions.cpp.
References init(), and llvm::Value::setName().
void BinaryOperator::andIRFlags | ( | const Value * | V | ) |
Logical 'and' of any supported wrapping, exact, and fast-math flags of V and this instruction.
Definition at line 2050 of file Instructions.cpp.
References llvm::Instruction::copyFastMathFlags(), llvm::Instruction::getFastMathFlags(), hasNoSignedWrap(), hasNoUnsignedWrap(), isExact(), llvm::X86II::OB, setHasNoSignedWrap(), setHasNoUnsignedWrap(), and setIsExact().
static bool llvm::BinaryOperator::classof | ( | const Instruction * | I | ) | [inline, static] |
Definition at line 361 of file InstrTypes.h.
References llvm::Instruction::isBinaryOp().
static bool llvm::BinaryOperator::classof | ( | const Value * | V | ) | [inline, static] |
Methods for support type inquiry through isa, cast, and dyn_cast:
Reimplemented from llvm::Instruction.
Definition at line 364 of file InstrTypes.h.
BinaryOperator * BinaryOperator::clone_impl | ( | ) | const [override, protected, virtual] |
Implements llvm::Instruction.
Definition at line 3617 of file Instructions.cpp.
References Create(), and getOpcode().
void BinaryOperator::copyIRFlags | ( | const Value * | V | ) |
Convenience method to copy supported wrapping, exact, and fast-math flags from V to this instruction.
Definition at line 2034 of file Instructions.cpp.
References llvm::Instruction::copyFastMathFlags(), llvm::X86II::OB, setHasNoSignedWrap(), setHasNoUnsignedWrap(), and setIsExact().
BinaryOperator * BinaryOperator::Create | ( | BinaryOps | Op, |
Value * | S1, | ||
Value * | S2, | ||
const Twine & | Name = Twine() , |
||
Instruction * | InsertBefore = nullptr |
||
) | [static] |
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 1847 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(), and llvm::InstCombiner::visitZExt().
BinaryOperator * BinaryOperator::Create | ( | BinaryOps | Op, |
Value * | S1, | ||
Value * | S2, | ||
const Twine & | Name, | ||
BasicBlock * | InsertAtEnd | ||
) | [static] |
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 1855 of file Instructions.cpp.
References Create(), llvm::BasicBlock::getInstList(), and llvm::iplist< NodeTy, Traits >::push_back().
static BinaryOperator* llvm::BinaryOperator::CreateExact | ( | BinaryOps | Opc, |
Value * | V1, | ||
Value * | V2, | ||
const Twine & | Name = "" |
||
) | [inline, static] |
Definition at line 229 of file InstrTypes.h.
References setIsExact().
static BinaryOperator* llvm::BinaryOperator::CreateExact | ( | BinaryOps | Opc, |
Value * | V1, | ||
Value * | V2, | ||
const Twine & | Name, | ||
BasicBlock * | BB | ||
) | [inline, static] |
Definition at line 235 of file InstrTypes.h.
References setIsExact().
static BinaryOperator* llvm::BinaryOperator::CreateExact | ( | BinaryOps | Opc, |
Value * | V1, | ||
Value * | V2, | ||
const Twine & | Name, | ||
Instruction * | I | ||
) | [inline, static] |
Definition at line 241 of file InstrTypes.h.
References setIsExact().
BinaryOperator * BinaryOperator::CreateFNeg | ( | Value * | Op, |
const Twine & | Name = "" , |
||
Instruction * | InsertBefore = nullptr |
||
) | [static] |
Definition at line 1903 of file Instructions.cpp.
References BinaryOperator(), llvm::Value::getType(), and llvm::ConstantFP::getZeroValueForNegation().
Referenced by llvm::IRBuilder< true, TargetFolder >::CreateFNeg(), CreateNeg(), and llvm::InstCombiner::visitFPTrunc().
BinaryOperator * BinaryOperator::CreateFNeg | ( | Value * | Op, |
const Twine & | Name, | ||
BasicBlock * | InsertAtEnd | ||
) | [static] |
Definition at line 1910 of file Instructions.cpp.
References BinaryOperator(), llvm::Value::getType(), and llvm::ConstantFP::getZeroValueForNegation().
BinaryOperator * BinaryOperator::CreateNeg | ( | Value * | Op, |
const Twine & | Name = "" , |
||
Instruction * | InsertBefore = nullptr |
||
) | [static] |
Helper functions to construct and inspect unary operations (NEG and NOT) via binary operators SUB and XOR:
Create the NEG and NOT instructions out of SUB and XOR instructions.
Definition at line 1863 of file Instructions.cpp.
References BinaryOperator(), llvm::Value::getType(), and llvm::ConstantFP::getZeroValueForNegation().
Referenced by CreateNeg(), llvm::IRBuilder< true, TargetFolder >::CreateNeg(), and llvm::InstCombiner::visitSub().
BinaryOperator * BinaryOperator::CreateNeg | ( | Value * | Op, |
const Twine & | Name, | ||
BasicBlock * | InsertAtEnd | ||
) | [static] |
Definition at line 1871 of file Instructions.cpp.
References BinaryOperator(), llvm::Value::getType(), and llvm::ConstantFP::getZeroValueForNegation().
BinaryOperator * BinaryOperator::CreateNot | ( | Value * | Op, |
const Twine & | Name = "" , |
||
Instruction * | InsertBefore = nullptr |
||
) | [static] |
Definition at line 1917 of file Instructions.cpp.
References BinaryOperator(), llvm::Constant::getAllOnesValue(), llvm::Value::getType(), and llvm::APIntOps::Xor().
Referenced by llvm::IRBuilder< true, TargetFolder >::CreateNot(), OptimizeGlobalAddressOfMalloc(), ProcessUMulZExtIdiom(), llvm::InstCombiner::visitAnd(), llvm::InstCombiner::visitICmpInst(), llvm::InstCombiner::visitICmpInstWithCastAndCast(), llvm::InstCombiner::visitOr(), llvm::InstCombiner::visitSub(), and llvm::InstCombiner::visitXor().
BinaryOperator * BinaryOperator::CreateNot | ( | Value * | Op, |
const Twine & | Name, | ||
BasicBlock * | InsertAtEnd | ||
) | [static] |
Definition at line 1924 of file Instructions.cpp.
References BinaryOperator(), llvm::Constant::getAllOnesValue(), llvm::Value::getType(), and llvm::APIntOps::Xor().
BinaryOperator AllocaInst TruncInst SExtInst FPToSIInst SIToFPInst FPExtInst IntToPtrInst AddrSpaceCastInst FCmpInst CallInst Instruction VAArgInst InsertElementInst ExtractValueInst static LandingPadInst BinaryOperator* llvm::BinaryOperator::CreateNSW | ( | BinaryOps | Opc, |
Value * | V1, | ||
Value * | V2, | ||
const Twine & | Name = "" |
||
) | [inline, static] |
Definition at line 191 of file InstrTypes.h.
References setHasNoSignedWrap().
static BinaryOperator* llvm::BinaryOperator::CreateNSW | ( | BinaryOps | Opc, |
Value * | V1, | ||
Value * | V2, | ||
const Twine & | Name, | ||
BasicBlock * | BB | ||
) | [inline, static] |
Definition at line 197 of file InstrTypes.h.
References setHasNoSignedWrap().
static BinaryOperator* llvm::BinaryOperator::CreateNSW | ( | BinaryOps | Opc, |
Value * | V1, | ||
Value * | V2, | ||
const Twine & | Name, | ||
Instruction * | I | ||
) | [inline, static] |
Definition at line 203 of file InstrTypes.h.
References setHasNoSignedWrap().
BinaryOperator * BinaryOperator::CreateNSWNeg | ( | Value * | Op, |
const Twine & | Name = "" , |
||
Instruction * | InsertBefore = nullptr |
||
) | [static] |
Definition at line 1879 of file Instructions.cpp.
References llvm::Value::getType(), and llvm::ConstantFP::getZeroValueForNegation().
BinaryOperator * BinaryOperator::CreateNSWNeg | ( | Value * | Op, |
const Twine & | Name, | ||
BasicBlock * | InsertAtEnd | ||
) | [static] |
Definition at line 1885 of file Instructions.cpp.
References llvm::Value::getType(), and llvm::ConstantFP::getZeroValueForNegation().
static BinaryOperator* llvm::BinaryOperator::CreateNUW | ( | BinaryOps | Opc, |
Value * | V1, | ||
Value * | V2, | ||
const Twine & | Name = "" |
||
) | [inline, static] |
Definition at line 210 of file InstrTypes.h.
References setHasNoUnsignedWrap().
static BinaryOperator* llvm::BinaryOperator::CreateNUW | ( | BinaryOps | Opc, |
Value * | V1, | ||
Value * | V2, | ||
const Twine & | Name, | ||
BasicBlock * | BB | ||
) | [inline, static] |
Definition at line 216 of file InstrTypes.h.
References setHasNoUnsignedWrap().
static BinaryOperator* llvm::BinaryOperator::CreateNUW | ( | BinaryOps | Opc, |
Value * | V1, | ||
Value * | V2, | ||
const Twine & | Name, | ||
Instruction * | I | ||
) | [inline, static] |
Definition at line 222 of file InstrTypes.h.
References setHasNoUnsignedWrap().
BinaryOperator * BinaryOperator::CreateNUWNeg | ( | Value * | Op, |
const Twine & | Name = "" , |
||
Instruction * | InsertBefore = nullptr |
||
) | [static] |
Definition at line 1891 of file Instructions.cpp.
References llvm::Value::getType(), and llvm::ConstantFP::getZeroValueForNegation().
BinaryOperator * BinaryOperator::CreateNUWNeg | ( | Value * | Op, |
const Twine & | Name, | ||
BasicBlock * | InsertAtEnd | ||
) | [static] |
Definition at line 1897 of file Instructions.cpp.
References llvm::Value::getType(), and llvm::ConstantFP::getZeroValueForNegation().
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 | |||
) |
const Value * BinaryOperator::getFNegArgument | ( | const Value * | BinOp | ) | [static] |
Definition at line 1978 of file Instructions.cpp.
Referenced by llvm::FastISel::selectFNeg().
Value * BinaryOperator::getFNegArgument | ( | Value * | BinOp | ) | [static] |
Definition at line 1974 of file Instructions.cpp.
References llvm::User::getOperand().
const Value * BinaryOperator::getNegArgument | ( | const Value * | BinOp | ) | [static] |
Helper functions to extract the unary argument of a NEG, FNEG or NOT operation implemented via Sub, FSub, or Xor.
Definition at line 1970 of file Instructions.cpp.
Value * BinaryOperator::getNegArgument | ( | Value * | BinOp | ) | [static] |
Definition at line 1966 of file Instructions.cpp.
References llvm::User::getOperand().
const Value * BinaryOperator::getNotArgument | ( | const Value * | BinOp | ) | [static] |
Definition at line 1993 of file Instructions.cpp.
Referenced by dyn_castNotVal(), OptimizeAndOrXor(), and llvm::InstCombiner::visitSelectInst().
Value * BinaryOperator::getNotArgument | ( | Value * | BinOp | ) | [static] |
Definition at line 1982 of file Instructions.cpp.
References llvm::User::getOperand(), isConstantAllOnes(), and isNot().
BinaryOps llvm::BinaryOperator::getOpcode | ( | ) | const [inline] |
getOpcode() returns a member of one of the enums like Instruction::Add.
Reimplemented from llvm::Instruction.
Definition at line 320 of file InstrTypes.h.
References llvm::Instruction::getOpcode().
Referenced by clone_impl(), llvm::InstCombiner::commonIDivTransforms(), CreateBinOpAsGiven(), llvm::expandDivision(), llvm::expandDivisionUpTo32Bits(), llvm::expandDivisionUpTo64Bits(), llvm::expandRemainder(), llvm::expandRemainderUpTo32Bits(), llvm::expandRemainderUpTo64Bits(), llvm::InstCombiner::FoldICmpDivCst(), llvm::InstCombiner::FoldICmpShrCst(), llvm::InstCombiner::FoldOrOfICmps(), llvm::InstCombiner::FoldSelectIntoOp(), llvm::InstCombiner::FoldShiftByConstant(), getBinOpsForFactorization(), LinearizeExprTree(), MaintainNoSignedWrap(), matchPairwiseReduction(), matchPairwiseReductionAtLevel(), matchVectorSplittingReduction(), OptimizeExtractBits(), SimplifyAssociativeBinOp(), SimplifyICmpInst(), SinkShiftAndTruncate(), swapMayExposeCSEOpportunities(), tryFactorization(), llvm::Interpreter::visitBinaryOperator(), llvm::InstCombiner::visitFPTrunc(), llvm::InstCombiner::visitICmpInst(), llvm::InstCombiner::visitICmpInstWithInstAndIntCst(), llvm::InstCombiner::visitMul(), llvm::InstCombiner::visitXor(), and llvm::InstCombiner::visitZExt().
llvm::BinaryOperator::HANDLE_BINARY_INST | ( | 20 | , |
Shl | , | ||
BinaryOperator | |||
) |
llvm::BinaryOperator::HANDLE_BINARY_INST | ( | 20 | , |
Shl | , | ||
BinaryOperator | |||
) |
llvm::BinaryOperator::HANDLE_BINARY_INST | ( | 20 | , |
Shl | , | ||
BinaryOperator | |||
) |
BinaryOperator llvm::BinaryOperator::HANDLE_BINARY_INST | ( | 22 | , |
AShr | , | ||
BinaryOperator | |||
) |
BinaryOperator llvm::BinaryOperator::HANDLE_BINARY_INST | ( | 22 | , |
AShr | , | ||
BinaryOperator | |||
) |
BinaryOperator llvm::BinaryOperator::HANDLE_BINARY_INST | ( | 22 | , |
AShr | , | ||
BinaryOperator | |||
) |
BinaryOperator AllocaInst TruncInst llvm::BinaryOperator::HANDLE_CAST_INST | ( | 34 | , |
ZExt | , | ||
ZExtInst | |||
) |
BinaryOperator AllocaInst TruncInst llvm::BinaryOperator::HANDLE_CAST_INST | ( | 34 | , |
ZExt | , | ||
ZExtInst | |||
) |
BinaryOperator AllocaInst TruncInst llvm::BinaryOperator::HANDLE_CAST_INST | ( | 34 | , |
ZExt | , | ||
ZExtInst | |||
) |
BinaryOperator AllocaInst TruncInst SExtInst llvm::BinaryOperator::HANDLE_CAST_INST | ( | 36 | , |
FPToUI | , | ||
FPToUIInst | |||
) |
BinaryOperator AllocaInst TruncInst SExtInst llvm::BinaryOperator::HANDLE_CAST_INST | ( | 36 | , |
FPToUI | , | ||
FPToUIInst | |||
) |
BinaryOperator AllocaInst TruncInst SExtInst llvm::BinaryOperator::HANDLE_CAST_INST | ( | 36 | , |
FPToUI | , | ||
FPToUIInst | |||
) |
BinaryOperator AllocaInst TruncInst SExtInst FPToSIInst llvm::BinaryOperator::HANDLE_CAST_INST | ( | 38 | , |
UIToFP | , | ||
UIToFPInst | |||
) |
BinaryOperator AllocaInst TruncInst SExtInst FPToSIInst llvm::BinaryOperator::HANDLE_CAST_INST | ( | 38 | , |
UIToFP | , | ||
UIToFPInst | |||
) |
BinaryOperator AllocaInst TruncInst SExtInst FPToSIInst llvm::BinaryOperator::HANDLE_CAST_INST | ( | 38 | , |
UIToFP | , | ||
UIToFPInst | |||
) |
BinaryOperator AllocaInst TruncInst SExtInst FPToSIInst SIToFPInst llvm::BinaryOperator::HANDLE_CAST_INST | ( | 40 | , |
FPTrunc | , | ||
FPTruncInst | |||
) |
BinaryOperator AllocaInst TruncInst SExtInst FPToSIInst SIToFPInst llvm::BinaryOperator::HANDLE_CAST_INST | ( | 40 | , |
FPTrunc | , | ||
FPTruncInst | |||
) |
BinaryOperator AllocaInst TruncInst SExtInst FPToSIInst SIToFPInst llvm::BinaryOperator::HANDLE_CAST_INST | ( | 40 | , |
FPTrunc | , | ||
FPTruncInst | |||
) |
BinaryOperator AllocaInst TruncInst SExtInst FPToSIInst SIToFPInst FPExtInst llvm::BinaryOperator::HANDLE_CAST_INST | ( | 42 | , |
PtrToInt | , | ||
PtrToIntInst | |||
) |
BinaryOperator AllocaInst TruncInst SExtInst FPToSIInst SIToFPInst FPExtInst llvm::BinaryOperator::HANDLE_CAST_INST | ( | 42 | , |
PtrToInt | , | ||
PtrToIntInst | |||
) |
BinaryOperator AllocaInst TruncInst SExtInst FPToSIInst SIToFPInst FPExtInst llvm::BinaryOperator::HANDLE_CAST_INST | ( | 42 | , |
PtrToInt | , | ||
PtrToIntInst | |||
) |
BinaryOperator AllocaInst TruncInst SExtInst FPToSIInst SIToFPInst FPExtInst IntToPtrInst llvm::BinaryOperator::HANDLE_CAST_INST | ( | 44 | , |
BitCast | , | ||
BitCastInst | |||
) |
BinaryOperator AllocaInst TruncInst SExtInst FPToSIInst SIToFPInst FPExtInst IntToPtrInst llvm::BinaryOperator::HANDLE_CAST_INST | ( | 44 | , |
BitCast | , | ||
BitCastInst | |||
) |
BinaryOperator AllocaInst TruncInst SExtInst FPToSIInst SIToFPInst FPExtInst IntToPtrInst llvm::BinaryOperator::HANDLE_CAST_INST | ( | 44 | , |
BitCast | , | ||
BitCastInst | |||
) |
BinaryOperator AllocaInst llvm::BinaryOperator::HANDLE_MEMORY_INST | ( | 27 | , |
Load | , | ||
LoadInst | |||
) |
BinaryOperator AllocaInst llvm::BinaryOperator::HANDLE_MEMORY_INST | ( | 27 | , |
Load | , | ||
LoadInst | |||
) |
BinaryOperator AllocaInst llvm::BinaryOperator::HANDLE_MEMORY_INST | ( | 27 | , |
Load | , | ||
LoadInst | |||
) |
BinaryOperator AllocaInst TruncInst SExtInst FPToSIInst SIToFPInst FPExtInst IntToPtrInst AddrSpaceCastInst llvm::BinaryOperator::HANDLE_OTHER_INST | ( | 46 | , |
ICmp | , | ||
ICmpInst | |||
) |
BinaryOperator AllocaInst TruncInst SExtInst FPToSIInst SIToFPInst FPExtInst IntToPtrInst AddrSpaceCastInst llvm::BinaryOperator::HANDLE_OTHER_INST | ( | 46 | , |
ICmp | , | ||
ICmpInst | |||
) |
BinaryOperator AllocaInst TruncInst SExtInst FPToSIInst SIToFPInst FPExtInst IntToPtrInst AddrSpaceCastInst llvm::BinaryOperator::HANDLE_OTHER_INST | ( | 46 | , |
ICmp | , | ||
ICmpInst | |||
) |
BinaryOperator AllocaInst TruncInst SExtInst FPToSIInst SIToFPInst FPExtInst IntToPtrInst AddrSpaceCastInst FCmpInst llvm::BinaryOperator::HANDLE_OTHER_INST | ( | 48 | , |
PHI | , | ||
PHINode | |||
) |
BinaryOperator AllocaInst TruncInst SExtInst FPToSIInst SIToFPInst FPExtInst IntToPtrInst AddrSpaceCastInst FCmpInst llvm::BinaryOperator::HANDLE_OTHER_INST | ( | 48 | , |
PHI | , | ||
PHINode | |||
) |
BinaryOperator AllocaInst TruncInst SExtInst FPToSIInst SIToFPInst FPExtInst IntToPtrInst AddrSpaceCastInst FCmpInst llvm::BinaryOperator::HANDLE_OTHER_INST | ( | 48 | , |
PHI | , | ||
PHINode | |||
) |
BinaryOperator AllocaInst TruncInst SExtInst FPToSIInst SIToFPInst FPExtInst IntToPtrInst AddrSpaceCastInst FCmpInst CallInst llvm::BinaryOperator::HANDLE_OTHER_INST | ( | 50 | , |
Select | , | ||
SelectInst | |||
) |
BinaryOperator AllocaInst TruncInst SExtInst FPToSIInst SIToFPInst FPExtInst IntToPtrInst AddrSpaceCastInst FCmpInst CallInst llvm::BinaryOperator::HANDLE_OTHER_INST | ( | 50 | , |
Select | , | ||
SelectInst | |||
) |
BinaryOperator AllocaInst TruncInst SExtInst FPToSIInst SIToFPInst FPExtInst IntToPtrInst AddrSpaceCastInst FCmpInst CallInst llvm::BinaryOperator::HANDLE_OTHER_INST | ( | 50 | , |
Select | , | ||
SelectInst | |||
) |
bool BinaryOperator::hasNoSignedWrap | ( | ) | const |
Determine whether the no signed wrap flag is set.
Definition at line 2026 of file Instructions.cpp.
Referenced by andIRFlags(), BuildNew(), CreateBinOpAsGiven(), llvm::InstCombiner::FoldSelectIntoOp(), llvm::InstCombiner::FoldShiftByConstant(), patchReplacementInstruction(), SimplifyICmpInst(), tryFactorization(), llvm::InstCombiner::visitAdd(), llvm::InstCombiner::visitICmpInst(), llvm::InstCombiner::visitMul(), llvm::InstCombiner::visitShl(), and llvm::InstCombiner::visitSub().
bool BinaryOperator::hasNoUnsignedWrap | ( | ) | const |
Determine whether the no unsigned wrap flag is set.
Definition at line 2022 of file Instructions.cpp.
Referenced by andIRFlags(), BuildNew(), CreateBinOpAsGiven(), llvm::InstCombiner::FoldSelectIntoOp(), llvm::InstCombiner::FoldShiftByConstant(), patchReplacementInstruction(), SimplifyICmpInst(), llvm::InstCombiner::visitAdd(), llvm::InstCombiner::visitICmpInst(), llvm::InstCombiner::visitMul(), llvm::InstCombiner::visitShl(), and llvm::InstCombiner::visitSub().
void BinaryOperator::init | ( | BinaryOps | iType | ) | [protected] |
Definition at line 1772 of file Instructions.cpp.
References llvm::APIntOps::And(), llvm::User::getOperand(), llvm::Value::getType(), LShr, llvm::APIntOps::Or(), and llvm::APIntOps::Xor().
Referenced by BinaryOperator().
bool BinaryOperator::isExact | ( | ) | const |
Determine whether the exact flag is set.
Definition at line 2030 of file Instructions.cpp.
Referenced by andIRFlags(), BuildNew(), llvm::InstCombiner::commonIDivTransforms(), CreateBinOpAsGiven(), 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 1947 of file Instructions.cpp.
References llvm::Instruction::hasNoSignedZeros().
Referenced by llvm::getComplexity(), LinearizeExprTree(), NegateValue(), llvm::FastISel::selectOperator(), ShouldBreakUpSubtract(), llvm::InstCombiner::visitFMul(), and llvm::InstCombiner::visitFPTrunc().
bool BinaryOperator::isNeg | ( | const Value * | V | ) | [static] |
Check if the given Value is a NEG, FNeg, or NOT instruction.
Definition at line 1939 of file Instructions.cpp.
Referenced by llvm::getComplexity(), LinearizeExprTree(), NegateValue(), ShouldBreakUpSubtract(), and SimplifySubInst().
bool BinaryOperator::isNot | ( | const Value * | V | ) | [static] |
Definition at line 1958 of file Instructions.cpp.
References isConstantAllOnes(), and llvm::APIntOps::Xor().
Referenced by dyn_castNotVal(), llvm::getComplexity(), getNotArgument(), isFreeToInvert(), OptimizeAndOrXor(), and llvm::InstCombiner::visitSelectInst().
void* llvm::BinaryOperator::operator new | ( | size_t | s | ) | [inline] |
Reimplemented from llvm::User.
Definition at line 146 of file InstrTypes.h.
void BinaryOperator::setHasNoSignedWrap | ( | bool | b = true | ) |
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 2014 of file Instructions.cpp.
Referenced by andIRFlags(), llvm::InstCombiner::commonIDivTransforms(), copyIRFlags(), 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().
void BinaryOperator::setHasNoUnsignedWrap | ( | bool | b = true | ) |
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 2010 of file Instructions.cpp.
Referenced by andIRFlags(), llvm::InstCombiner::commonIDivTransforms(), copyIRFlags(), 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().
void BinaryOperator::setIsExact | ( | bool | b = true | ) |
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 2018 of file Instructions.cpp.
Referenced by andIRFlags(), llvm::InstCombiner::commonIDivTransforms(), copyIRFlags(), CreateExact(), llvm::InstCombiner::FoldSelectIntoOp(), llvm::InstCombiner::FoldShiftByConstant(), foldUDivPow2Cst(), foldUDivShl(), llvm::ConstantExpr::getAsInstruction(), GetShiftedValue(), llvm::InstCombiner::visitAShr(), and llvm::InstCombiner::visitLShr().
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 2003 of file Instructions.cpp.
References llvm::Instruction::isCommutative(), and std::swap().
Referenced by llvm::InstCombiner::visitXor().
BinaryOperator AllocaInst TruncInst SExtInst FPToSIInst SIToFPInst FPExtInst IntToPtrInst llvm::BinaryOperator::AddrSpaceCast |
Definition at line 158 of file InstrTypes.h.
Definition at line 133 of file InstrTypes.h.
BinaryOperator AllocaInst TruncInst SExtInst FPToSIInst SIToFPInst FPExtInst IntToPtrInst AddrSpaceCastInst FCmpInst llvm::BinaryOperator::Call |
Definition at line 166 of file InstrTypes.h.
Definition at line 174 of file InstrTypes.h.
BinaryOperator AllocaInst TruncInst SExtInst FPToSIInst SIToFPInst FPExtInst IntToPtrInst AddrSpaceCastInst llvm::BinaryOperator::FCmp |
Definition at line 164 of file InstrTypes.h.
Definition at line 154 of file InstrTypes.h.
Definition at line 150 of file InstrTypes.h.
BinaryOperator AllocaInst TruncInst SExtInst FPToSIInst SIToFPInst FPExtInst IntToPtrInst AddrSpaceCastInst FCmpInst CallInst Instruction VAArgInst llvm::BinaryOperator::InsertElement |
Definition at line 172 of file InstrTypes.h.
BinaryOperator AllocaInst TruncInst SExtInst FPToSIInst SIToFPInst FPExtInst llvm::BinaryOperator::IntToPtr |
Definition at line 156 of file InstrTypes.h.
Definition at line 176 of file InstrTypes.h.
Definition at line 124 of file InstrTypes.h.
Referenced by init().
Definition at line 148 of file InstrTypes.h.
Definition at line 152 of file InstrTypes.h.
Definition at line 146 of file InstrTypes.h.
BinaryOperator AllocaInst TruncInst SExtInst FPToSIInst SIToFPInst FPExtInst IntToPtrInst AddrSpaceCastInst FCmpInst CallInst llvm::BinaryOperator::UserOp1 |
Definition at line 168 of file InstrTypes.h.
BinaryOperator AllocaInst TruncInst SExtInst FPToSIInst SIToFPInst FPExtInst IntToPtrInst AddrSpaceCastInst FCmpInst CallInst Instruction llvm::BinaryOperator::VAArg |
Definition at line 170 of file InstrTypes.h.