LLVM API Documentation

Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions
llvm::BinaryOperator Class Reference

#include <InstrTypes.h>

Inheritance diagram for llvm::BinaryOperator:
Inheritance graph
[legend]
Collaboration diagram for llvm::BinaryOperator:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void * operator new (size_t s)
 DECLARE_TRANSPARENT_OPERAND_ACCESSORS (Value)
 Transparently provide more efficient getOperand methods.
 HANDLE_BINARY_INST (20, Shl, BinaryOperator) HANDLE_BINARY_INST(21
BinaryOperator HANDLE_BINARY_INST (22, AShr, BinaryOperator) HANDLE_MEMORY_INST(26
BinaryOperator AllocaInst HANDLE_MEMORY_INST (27, Load, LoadInst) HANDLE_CAST_INST(33
BinaryOperator AllocaInst TruncInst HANDLE_CAST_INST (34, ZExt, ZExtInst) HANDLE_CAST_INST(35
BinaryOperator AllocaInst
TruncInst SExtInst 
HANDLE_CAST_INST (36, FPToUI, FPToUIInst) HANDLE_CAST_INST(37
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst 
HANDLE_CAST_INST (38, UIToFP, UIToFPInst) HANDLE_CAST_INST(39
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst 
HANDLE_CAST_INST (40, FPTrunc, FPTruncInst) HANDLE_CAST_INST(41
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst 
HANDLE_CAST_INST (42, PtrToInt, PtrToIntInst) HANDLE_CAST_INST(43
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst 
HANDLE_CAST_INST (44, BitCast, BitCastInst) HANDLE_CAST_INST(45
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst AddrSpaceCastInst 
HANDLE_OTHER_INST (46, ICmp, ICmpInst) HANDLE_OTHER_INST(47
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst AddrSpaceCastInst
FCmpInst 
HANDLE_OTHER_INST (48, PHI, PHINode) HANDLE_OTHER_INST(49
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst AddrSpaceCastInst
FCmpInst CallInst 
HANDLE_OTHER_INST (50, Select, SelectInst) HANDLE_OTHER_INST(51
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst AddrSpaceCastInst
FCmpInst CallInst Instruction 
HANDLE_OTHER_INST (52, UserOp2, Instruction) HANDLE_OTHER_INST(53
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst AddrSpaceCastInst
FCmpInst CallInst Instruction
VAArgInst 
HANDLE_OTHER_INST (54, ExtractElement, ExtractElementInst) HANDLE_OTHER_INST(55
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst AddrSpaceCastInst
FCmpInst CallInst Instruction
VAArgInst InsertElementInst 
HANDLE_OTHER_INST (56, ShuffleVector, ShuffleVectorInst) HANDLE_OTHER_INST(57
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst AddrSpaceCastInst
FCmpInst CallInst Instruction
VAArgInst InsertElementInst
ExtractValueInst 
HANDLE_OTHER_INST (58, InsertValue, InsertValueInst) HANDLE_OTHER_INST(59
 HANDLE_BINARY_INST (20, Shl, BinaryOperator) HANDLE_BINARY_INST(21
BinaryOperator HANDLE_BINARY_INST (22, AShr, BinaryOperator) HANDLE_MEMORY_INST(26
BinaryOperator AllocaInst HANDLE_MEMORY_INST (27, Load, LoadInst) HANDLE_CAST_INST(33
BinaryOperator AllocaInst TruncInst HANDLE_CAST_INST (34, ZExt, ZExtInst) HANDLE_CAST_INST(35
BinaryOperator AllocaInst
TruncInst SExtInst 
HANDLE_CAST_INST (36, FPToUI, FPToUIInst) HANDLE_CAST_INST(37
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst 
HANDLE_CAST_INST (38, UIToFP, UIToFPInst) HANDLE_CAST_INST(39
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst 
HANDLE_CAST_INST (40, FPTrunc, FPTruncInst) HANDLE_CAST_INST(41
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst 
HANDLE_CAST_INST (42, PtrToInt, PtrToIntInst) HANDLE_CAST_INST(43
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst 
HANDLE_CAST_INST (44, BitCast, BitCastInst) HANDLE_CAST_INST(45
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst AddrSpaceCastInst 
HANDLE_OTHER_INST (46, ICmp, ICmpInst) HANDLE_OTHER_INST(47
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst AddrSpaceCastInst
FCmpInst 
HANDLE_OTHER_INST (48, PHI, PHINode) HANDLE_OTHER_INST(49
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst AddrSpaceCastInst
FCmpInst CallInst 
HANDLE_OTHER_INST (50, Select, SelectInst) HANDLE_OTHER_INST(51
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst AddrSpaceCastInst
FCmpInst CallInst Instruction 
HANDLE_OTHER_INST (52, UserOp2, Instruction) HANDLE_OTHER_INST(53
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst AddrSpaceCastInst
FCmpInst CallInst Instruction
VAArgInst 
HANDLE_OTHER_INST (54, ExtractElement, ExtractElementInst) HANDLE_OTHER_INST(55
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst AddrSpaceCastInst
FCmpInst CallInst Instruction
VAArgInst InsertElementInst 
HANDLE_OTHER_INST (56, ShuffleVector, ShuffleVectorInst) HANDLE_OTHER_INST(57
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst AddrSpaceCastInst
FCmpInst CallInst Instruction
VAArgInst InsertElementInst
ExtractValueInst 
HANDLE_OTHER_INST (58, InsertValue, InsertValueInst) HANDLE_OTHER_INST(59
 HANDLE_BINARY_INST (20, Shl, BinaryOperator) HANDLE_BINARY_INST(21
BinaryOperator HANDLE_BINARY_INST (22, AShr, BinaryOperator) HANDLE_MEMORY_INST(26
BinaryOperator AllocaInst HANDLE_MEMORY_INST (27, Load, LoadInst) HANDLE_CAST_INST(33
BinaryOperator AllocaInst TruncInst HANDLE_CAST_INST (34, ZExt, ZExtInst) HANDLE_CAST_INST(35
BinaryOperator AllocaInst
TruncInst SExtInst 
HANDLE_CAST_INST (36, FPToUI, FPToUIInst) HANDLE_CAST_INST(37
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst 
HANDLE_CAST_INST (38, UIToFP, UIToFPInst) HANDLE_CAST_INST(39
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst 
HANDLE_CAST_INST (40, FPTrunc, FPTruncInst) HANDLE_CAST_INST(41
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst 
HANDLE_CAST_INST (42, PtrToInt, PtrToIntInst) HANDLE_CAST_INST(43
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst 
HANDLE_CAST_INST (44, BitCast, BitCastInst) HANDLE_CAST_INST(45
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst AddrSpaceCastInst 
HANDLE_OTHER_INST (46, ICmp, ICmpInst) HANDLE_OTHER_INST(47
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst AddrSpaceCastInst
FCmpInst 
HANDLE_OTHER_INST (48, PHI, PHINode) HANDLE_OTHER_INST(49
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst AddrSpaceCastInst
FCmpInst CallInst 
HANDLE_OTHER_INST (50, Select, SelectInst) HANDLE_OTHER_INST(51
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst AddrSpaceCastInst
FCmpInst CallInst Instruction 
HANDLE_OTHER_INST (52, UserOp2, Instruction) HANDLE_OTHER_INST(53
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst AddrSpaceCastInst
FCmpInst CallInst Instruction
VAArgInst 
HANDLE_OTHER_INST (54, ExtractElement, ExtractElementInst) HANDLE_OTHER_INST(55
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst AddrSpaceCastInst
FCmpInst CallInst Instruction
VAArgInst InsertElementInst 
HANDLE_OTHER_INST (56, ShuffleVector, ShuffleVectorInst) HANDLE_OTHER_INST(57
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst AddrSpaceCastInst
FCmpInst CallInst Instruction
VAArgInst InsertElementInst
ExtractValueInst 
HANDLE_OTHER_INST (58, InsertValue, InsertValueInst) HANDLE_OTHER_INST(59
 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
 getOpcode() returns a member of one of the enums like Instruction::Add.
bool swapOperands ()
void setHasNoUnsignedWrap (bool b=true)
void setHasNoSignedWrap (bool b=true)
void setIsExact (bool b=true)
bool hasNoUnsignedWrap () const
 Determine whether the no unsigned wrap flag is set.
bool hasNoSignedWrap () const
 Determine whether the no signed wrap flag is set.
bool isExact () const
 Determine whether the exact flag is set.
void copyIRFlags (const Value *V)
void andIRFlags (const Value *V)

Static Public Member Functions

static BinaryOperatorCreate (BinaryOps Op, Value *S1, Value *S2, const Twine &Name=Twine(), Instruction *InsertBefore=nullptr)
static BinaryOperatorCreate (BinaryOps Op, Value *S1, Value *S2, const Twine &Name, BasicBlock *InsertAtEnd)
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst AddrSpaceCastInst
FCmpInst CallInst Instruction
VAArgInst InsertElementInst
ExtractValueInst static
LandingPadInst BinaryOperator
CreateNSW (BinaryOps Opc, Value *V1, Value *V2, const Twine &Name="")
static BinaryOperatorCreateNSW (BinaryOps Opc, Value *V1, Value *V2, const Twine &Name, BasicBlock *BB)
static BinaryOperatorCreateNSW (BinaryOps Opc, Value *V1, Value *V2, const Twine &Name, Instruction *I)
static BinaryOperatorCreateNUW (BinaryOps Opc, Value *V1, Value *V2, const Twine &Name="")
static BinaryOperatorCreateNUW (BinaryOps Opc, Value *V1, Value *V2, const Twine &Name, BasicBlock *BB)
static BinaryOperatorCreateNUW (BinaryOps Opc, Value *V1, Value *V2, const Twine &Name, Instruction *I)
static BinaryOperatorCreateExact (BinaryOps Opc, Value *V1, Value *V2, const Twine &Name="")
static BinaryOperatorCreateExact (BinaryOps Opc, Value *V1, Value *V2, const Twine &Name, BasicBlock *BB)
static BinaryOperatorCreateExact (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=nullptr)
static BinaryOperatorCreateNeg (Value *Op, const Twine &Name, BasicBlock *InsertAtEnd)
static BinaryOperatorCreateNSWNeg (Value *Op, const Twine &Name="", Instruction *InsertBefore=nullptr)
static BinaryOperatorCreateNSWNeg (Value *Op, const Twine &Name, BasicBlock *InsertAtEnd)
static BinaryOperatorCreateNUWNeg (Value *Op, const Twine &Name="", Instruction *InsertBefore=nullptr)
static BinaryOperatorCreateNUWNeg (Value *Op, const Twine &Name, BasicBlock *InsertAtEnd)
static BinaryOperatorCreateFNeg (Value *Op, const Twine &Name="", Instruction *InsertBefore=nullptr)
static BinaryOperatorCreateFNeg (Value *Op, const Twine &Name, BasicBlock *InsertAtEnd)
static BinaryOperatorCreateNot (Value *Op, const Twine &Name="", Instruction *InsertBefore=nullptr)
static BinaryOperatorCreateNot (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 ValuegetNegArgument (const Value *BinOp)
static ValuegetNegArgument (Value *BinOp)
static const ValuegetFNegArgument (const Value *BinOp)
static ValuegetFNegArgument (Value *BinOp)
static const ValuegetNotArgument (const Value *BinOp)
static ValuegetNotArgument (Value *BinOp)
static bool classof (const Instruction *I)
static bool classof (const Value *V)
 Methods for support type inquiry through isa, cast, and dyn_cast:

Public Attributes

 LShr
BinaryOperator Alloca
BinaryOperator AllocaInst Trunc
BinaryOperator AllocaInst TruncInst SExt
BinaryOperator AllocaInst
TruncInst SExtInst 
FPToSI
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst 
SIToFP
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst 
FPExt
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst 
IntToPtr
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst 
AddrSpaceCast
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst AddrSpaceCastInst 
FCmp
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst AddrSpaceCastInst
FCmpInst 
Call
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst AddrSpaceCastInst
FCmpInst CallInst 
UserOp1
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst AddrSpaceCastInst
FCmpInst CallInst Instruction 
VAArg
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst AddrSpaceCastInst
FCmpInst CallInst Instruction
VAArgInst 
InsertElement
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst AddrSpaceCastInst
FCmpInst CallInst Instruction
VAArgInst InsertElementInst 
ExtractValue
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst AddrSpaceCastInst
FCmpInst CallInst Instruction
VAArgInst InsertElementInst
ExtractValueInst 
LandingPad

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)
BinaryOperatorclone_impl () const override

Detailed Description

Definition at line 135 of file InstrTypes.h.


Constructor & Destructor Documentation

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().


Member Function Documentation

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().

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]
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]
BinaryOperator * BinaryOperator::CreateFNeg ( Value Op,
const Twine Name,
BasicBlock InsertAtEnd 
) [static]
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]
BinaryOperator * BinaryOperator::CreateNot ( Value Op,
const Twine Name = "",
Instruction InsertBefore = nullptr 
) [static]
BinaryOperator * BinaryOperator::CreateNot ( Value Op,
const Twine Name,
BasicBlock InsertAtEnd 
) [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]
BinaryOperator * BinaryOperator::CreateNSWNeg ( Value Op,
const Twine Name,
BasicBlock InsertAtEnd 
) [static]
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]
BinaryOperator * BinaryOperator::CreateNUWNeg ( Value Op,
const Twine Name,
BasicBlock InsertAtEnd 
) [static]

Transparently provide more efficient getOperand methods.

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 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().

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().

Value * BinaryOperator::getNotArgument ( Value BinOp) [static]

Definition at line 1982 of file Instructions.cpp.

References llvm::User::getOperand(), isConstantAllOnes(), and isNot().

void BinaryOperator::init ( BinaryOps  iType) [protected]
bool BinaryOperator::isFNeg ( const Value V,
bool  IgnoreZeroSign = false 
) [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().

void* llvm::BinaryOperator::operator new ( size_t  s) [inline]

Reimplemented from llvm::User.

Definition at line 146 of file InstrTypes.h.

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().


Member Data Documentation

Definition at line 158 of file InstrTypes.h.

Definition at line 133 of file InstrTypes.h.

Definition at line 166 of file InstrTypes.h.

Definition at line 174 of file InstrTypes.h.

Definition at line 164 of file InstrTypes.h.

Definition at line 154 of file InstrTypes.h.

Definition at line 150 of file InstrTypes.h.

Definition at line 172 of file InstrTypes.h.

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.

Definition at line 168 of file InstrTypes.h.

Definition at line 170 of file InstrTypes.h.


The documentation for this class was generated from the following files: