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_OTHER_INST(45
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst ICmpInst 
HANDLE_OTHER_INST (46, FCmp, FCmpInst) HANDLE_OTHER_INST(47
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst ICmpInst PHINode 
HANDLE_OTHER_INST (48, Call, CallInst) HANDLE_OTHER_INST(49
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst ICmpInst PHINode
SelectInst 
HANDLE_OTHER_INST (50, UserOp1, Instruction) HANDLE_OTHER_INST(51
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst ICmpInst PHINode
SelectInst Instruction 
HANDLE_OTHER_INST (52, VAArg, VAArgInst) HANDLE_OTHER_INST(53
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst ICmpInst PHINode
SelectInst Instruction
ExtractElementInst 
HANDLE_OTHER_INST (54, InsertElement, InsertElementInst) HANDLE_OTHER_INST(55
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst ICmpInst PHINode
SelectInst Instruction
ExtractElementInst
ShuffleVectorInst 
HANDLE_OTHER_INST (56, ExtractValue, ExtractValueInst) HANDLE_OTHER_INST(57
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst ICmpInst PHINode
SelectInst Instruction
ExtractElementInst
ShuffleVectorInst
InsertValueInst 
HANDLE_OTHER_INST (58, LandingPad, LandingPadInst) HANDLE_BINARY_INST(20
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst ICmpInst PHINode
SelectInst Instruction
ExtractElementInst
ShuffleVectorInst
InsertValueInst BinaryOperator 
HANDLE_BINARY_INST (21, LShr, BinaryOperator) HANDLE_BINARY_INST(22
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst ICmpInst PHINode
SelectInst Instruction
ExtractElementInst
ShuffleVectorInst
InsertValueInst BinaryOperator
BinaryOperator 
HANDLE_MEMORY_INST (26, Alloca, AllocaInst) HANDLE_MEMORY_INST(27
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst ICmpInst PHINode
SelectInst Instruction
ExtractElementInst
ShuffleVectorInst
InsertValueInst BinaryOperator
BinaryOperator LoadInst 
HANDLE_CAST_INST (33, Trunc, TruncInst) HANDLE_CAST_INST(34
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst ICmpInst PHINode
SelectInst Instruction
ExtractElementInst
ShuffleVectorInst
InsertValueInst BinaryOperator
BinaryOperator LoadInst
ZExtInst 
HANDLE_CAST_INST (35, SExt, SExtInst) HANDLE_CAST_INST(36
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst ICmpInst PHINode
SelectInst Instruction
ExtractElementInst
ShuffleVectorInst
InsertValueInst BinaryOperator
BinaryOperator LoadInst
ZExtInst FPToUIInst 
HANDLE_CAST_INST (37, FPToSI, FPToSIInst) HANDLE_CAST_INST(38
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst ICmpInst PHINode
SelectInst Instruction
ExtractElementInst
ShuffleVectorInst
InsertValueInst BinaryOperator
BinaryOperator LoadInst
ZExtInst FPToUIInst UIToFPInst 
HANDLE_CAST_INST (39, SIToFP, SIToFPInst) HANDLE_CAST_INST(40
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst ICmpInst PHINode
SelectInst Instruction
ExtractElementInst
ShuffleVectorInst
InsertValueInst BinaryOperator
BinaryOperator LoadInst
ZExtInst FPToUIInst UIToFPInst
FPTruncInst 
HANDLE_CAST_INST (41, FPExt, FPExtInst) HANDLE_CAST_INST(42
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst ICmpInst PHINode
SelectInst Instruction
ExtractElementInst
ShuffleVectorInst
InsertValueInst BinaryOperator
BinaryOperator LoadInst
ZExtInst FPToUIInst UIToFPInst
FPTruncInst PtrToIntInst 
HANDLE_CAST_INST (43, IntToPtr, IntToPtrInst) HANDLE_CAST_INST(44
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst ICmpInst PHINode
SelectInst Instruction
ExtractElementInst
ShuffleVectorInst
InsertValueInst BinaryOperator
BinaryOperator LoadInst
ZExtInst FPToUIInst UIToFPInst
FPTruncInst PtrToIntInst
BitCastInst 
HANDLE_OTHER_INST (45, ICmp, ICmpInst) HANDLE_OTHER_INST(46
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst ICmpInst PHINode
SelectInst Instruction
ExtractElementInst
ShuffleVectorInst
InsertValueInst BinaryOperator
BinaryOperator LoadInst
ZExtInst FPToUIInst UIToFPInst
FPTruncInst PtrToIntInst
BitCastInst FCmpInst 
HANDLE_OTHER_INST (47, PHI, PHINode) HANDLE_OTHER_INST(48
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst ICmpInst PHINode
SelectInst Instruction
ExtractElementInst
ShuffleVectorInst
InsertValueInst BinaryOperator
BinaryOperator LoadInst
ZExtInst FPToUIInst UIToFPInst
FPTruncInst PtrToIntInst
BitCastInst FCmpInst CallInst 
HANDLE_OTHER_INST (49, Select, SelectInst) HANDLE_OTHER_INST(50
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst ICmpInst PHINode
SelectInst Instruction
ExtractElementInst
ShuffleVectorInst
InsertValueInst BinaryOperator
BinaryOperator LoadInst
ZExtInst FPToUIInst UIToFPInst
FPTruncInst PtrToIntInst
BitCastInst FCmpInst CallInst
Instruction 
HANDLE_OTHER_INST (51, UserOp2, Instruction) HANDLE_OTHER_INST(52
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst ICmpInst PHINode
SelectInst Instruction
ExtractElementInst
ShuffleVectorInst
InsertValueInst BinaryOperator
BinaryOperator LoadInst
ZExtInst FPToUIInst UIToFPInst
FPTruncInst PtrToIntInst
BitCastInst FCmpInst CallInst
Instruction VAArgInst 
HANDLE_OTHER_INST (53, ExtractElement, ExtractElementInst) HANDLE_OTHER_INST(54
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst ICmpInst PHINode
SelectInst Instruction
ExtractElementInst
ShuffleVectorInst
InsertValueInst BinaryOperator
BinaryOperator LoadInst
ZExtInst FPToUIInst UIToFPInst
FPTruncInst PtrToIntInst
BitCastInst FCmpInst CallInst
Instruction VAArgInst
InsertElementInst 
HANDLE_OTHER_INST (55, ShuffleVector, ShuffleVectorInst) HANDLE_OTHER_INST(56
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst ICmpInst PHINode
SelectInst Instruction
ExtractElementInst
ShuffleVectorInst
InsertValueInst BinaryOperator
BinaryOperator LoadInst
ZExtInst FPToUIInst UIToFPInst
FPTruncInst PtrToIntInst
BitCastInst FCmpInst CallInst
Instruction VAArgInst
InsertElementInst
ExtractValueInst 
HANDLE_OTHER_INST (57, InsertValue, InsertValueInst) HANDLE_OTHER_INST(58
 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_OTHER_INST(45
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst ICmpInst 
HANDLE_OTHER_INST (46, FCmp, FCmpInst) HANDLE_OTHER_INST(47
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst ICmpInst PHINode 
HANDLE_OTHER_INST (48, Call, CallInst) HANDLE_OTHER_INST(49
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst ICmpInst PHINode
SelectInst 
HANDLE_OTHER_INST (50, UserOp1, Instruction) HANDLE_OTHER_INST(51
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst ICmpInst PHINode
SelectInst Instruction 
HANDLE_OTHER_INST (52, VAArg, VAArgInst) HANDLE_OTHER_INST(53
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst ICmpInst PHINode
SelectInst Instruction
ExtractElementInst 
HANDLE_OTHER_INST (54, InsertElement, InsertElementInst) HANDLE_OTHER_INST(55
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst ICmpInst PHINode
SelectInst Instruction
ExtractElementInst
ShuffleVectorInst 
HANDLE_OTHER_INST (56, ExtractValue, ExtractValueInst) HANDLE_OTHER_INST(57
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst ICmpInst PHINode
SelectInst Instruction
ExtractElementInst
ShuffleVectorInst
InsertValueInst 
HANDLE_OTHER_INST (58, LandingPad, LandingPadInst) static BinaryOperator *CreateNSW(BinaryOps Opc
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
 hasNoUnsignedWrap - Determine whether the no unsigned wrap flag is set.
bool hasNoSignedWrap () const
 hasNoSignedWrap - Determine whether the no signed wrap flag is set.
bool isExact () const
 isExact - Determine whether the exact flag is set.

Static Public Member Functions

static BinaryOperatorCreate (BinaryOps Op, Value *S1, Value *S2, const Twine &Name=Twine(), Instruction *InsertBefore=0)
static BinaryOperatorCreate (BinaryOps Op, Value *S1, Value *S2, const Twine &Name, BasicBlock *InsertAtEnd)
static BinaryOperatorCreateNeg (Value *Op, const Twine &Name, BasicBlock *InsertAtEnd)
static BinaryOperatorCreateNSWNeg (Value *Op, const Twine &Name="", Instruction *InsertBefore=0)
static BinaryOperatorCreateNSWNeg (Value *Op, const Twine &Name, BasicBlock *InsertAtEnd)
static BinaryOperatorCreateNUWNeg (Value *Op, const Twine &Name="", Instruction *InsertBefore=0)
static BinaryOperatorCreateNUWNeg (Value *Op, const Twine &Name, BasicBlock *InsertAtEnd)
static BinaryOperatorCreateFNeg (Value *Op, const Twine &Name="", Instruction *InsertBefore=0)
static BinaryOperatorCreateFNeg (Value *Op, const Twine &Name, BasicBlock *InsertAtEnd)
static BinaryOperatorCreateNot (Value *Op, const Twine &Name="", Instruction *InsertBefore=0)
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 
ICmp
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst ICmpInst 
PHI
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst ICmpInst PHINode 
Select
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst ICmpInst PHINode
SelectInst 
UserOp2
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst ICmpInst PHINode
SelectInst Instruction 
ExtractElement
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst ICmpInst PHINode
SelectInst Instruction
ExtractElementInst 
ShuffleVector
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst ICmpInst PHINode
SelectInst Instruction
ExtractElementInst
ShuffleVectorInst 
InsertValue
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst ICmpInst PHINode
SelectInst Instruction
ExtractElementInst
ShuffleVectorInst
InsertValueInst 
Shl
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst ICmpInst PHINode
SelectInst Instruction
ExtractElementInst
ShuffleVectorInst
InsertValueInst BinaryOperator 
AShr
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst ICmpInst PHINode
SelectInst Instruction
ExtractElementInst
ShuffleVectorInst
InsertValueInst BinaryOperator
BinaryOperator 
Load
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst ICmpInst PHINode
SelectInst Instruction
ExtractElementInst
ShuffleVectorInst
InsertValueInst BinaryOperator
BinaryOperator LoadInst 
ZExt
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst ICmpInst PHINode
SelectInst Instruction
ExtractElementInst
ShuffleVectorInst
InsertValueInst BinaryOperator
BinaryOperator LoadInst
ZExtInst 
FPToUI
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst ICmpInst PHINode
SelectInst Instruction
ExtractElementInst
ShuffleVectorInst
InsertValueInst BinaryOperator
BinaryOperator LoadInst
ZExtInst FPToUIInst 
UIToFP
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst ICmpInst PHINode
SelectInst Instruction
ExtractElementInst
ShuffleVectorInst
InsertValueInst BinaryOperator
BinaryOperator LoadInst
ZExtInst FPToUIInst UIToFPInst 
FPTrunc
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst ICmpInst PHINode
SelectInst Instruction
ExtractElementInst
ShuffleVectorInst
InsertValueInst BinaryOperator
BinaryOperator LoadInst
ZExtInst FPToUIInst UIToFPInst
FPTruncInst 
PtrToInt
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst ICmpInst PHINode
SelectInst Instruction
ExtractElementInst
ShuffleVectorInst
InsertValueInst BinaryOperator
BinaryOperator LoadInst
ZExtInst FPToUIInst UIToFPInst
FPTruncInst PtrToIntInst 
BitCast
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst ICmpInst PHINode
SelectInst Instruction
ExtractElementInst
ShuffleVectorInst
InsertValueInst BinaryOperator
BinaryOperator LoadInst
ZExtInst FPToUIInst UIToFPInst
FPTruncInst PtrToIntInst
BitCastInst 
FCmp
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst ICmpInst PHINode
SelectInst Instruction
ExtractElementInst
ShuffleVectorInst
InsertValueInst BinaryOperator
BinaryOperator LoadInst
ZExtInst FPToUIInst UIToFPInst
FPTruncInst PtrToIntInst
BitCastInst FCmpInst 
Call
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst ICmpInst PHINode
SelectInst Instruction
ExtractElementInst
ShuffleVectorInst
InsertValueInst BinaryOperator
BinaryOperator LoadInst
ZExtInst FPToUIInst UIToFPInst
FPTruncInst PtrToIntInst
BitCastInst FCmpInst CallInst 
UserOp1
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst ICmpInst PHINode
SelectInst Instruction
ExtractElementInst
ShuffleVectorInst
InsertValueInst BinaryOperator
BinaryOperator LoadInst
ZExtInst FPToUIInst UIToFPInst
FPTruncInst PtrToIntInst
BitCastInst FCmpInst CallInst
Instruction 
VAArg
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst ICmpInst PHINode
SelectInst Instruction
ExtractElementInst
ShuffleVectorInst
InsertValueInst BinaryOperator
BinaryOperator LoadInst
ZExtInst FPToUIInst UIToFPInst
FPTruncInst PtrToIntInst
BitCastInst FCmpInst CallInst
Instruction VAArgInst 
InsertElement
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst ICmpInst PHINode
SelectInst Instruction
ExtractElementInst
ShuffleVectorInst
InsertValueInst BinaryOperator
BinaryOperator LoadInst
ZExtInst FPToUIInst UIToFPInst
FPTruncInst PtrToIntInst
BitCastInst FCmpInst CallInst
Instruction VAArgInst
InsertElementInst 
ExtractValue
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst ICmpInst PHINode
SelectInst Instruction
ExtractElementInst
ShuffleVectorInst
InsertValueInst BinaryOperator
BinaryOperator LoadInst
ZExtInst FPToUIInst UIToFPInst
FPTruncInst PtrToIntInst
BitCastInst FCmpInst CallInst
Instruction VAArgInst
InsertElementInst
ExtractValueInst 
LandingPad
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst ICmpInst PHINode
SelectInst Instruction
ExtractElementInst
ShuffleVectorInst
InsertValueInst Value
V1
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst ICmpInst PHINode
SelectInst Instruction
ExtractElementInst
ShuffleVectorInst
InsertValueInst Value Value
V2
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst ICmpInst PHINode
SelectInst Instruction
ExtractElementInst
ShuffleVectorInst
InsertValueInst Value Value
const Twine
Name

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

Detailed Description

Definition at line 138 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 1732 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 1745 of file Instructions.cpp.

References init(), and llvm::Value::setName().


Member Function Documentation

static bool llvm::BinaryOperator::classof ( const Instruction I) [inline, static]

Definition at line 372 of file InstrTypes.h.

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 375 of file InstrTypes.h.

BinaryOperator * BinaryOperator::clone_impl ( ) const [protected, virtual]

Implements llvm::Instruction.

Definition at line 3388 of file Instructions.cpp.

References Create(), and getOpcode().

BinaryOperator * BinaryOperator::Create ( BinaryOps  Op,
Value S1,
Value S2,
const Twine Name = Twine(),
Instruction InsertBefore = 0 
) [static]
BinaryOperator * BinaryOperator::Create ( BinaryOps  Op,
Value S1,
Value S2,
const Twine Name,
BasicBlock InsertAtEnd 
) [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(), and llvm::BasicBlock::getInstList().

BinaryOperator * BinaryOperator::CreateFNeg ( Value Op,
const Twine Name = "",
Instruction InsertBefore = 0 
) [static]
BinaryOperator * BinaryOperator::CreateFNeg ( Value Op,
const Twine Name,
BasicBlock InsertAtEnd 
) [static]
BinaryOperator * BinaryOperator::CreateNeg ( Value Op,
const Twine Name,
BasicBlock InsertAtEnd 
) [static]
BinaryOperator * BinaryOperator::CreateNot ( Value Op,
const Twine Name = "",
Instruction InsertBefore = 0 
) [static]
BinaryOperator * BinaryOperator::CreateNot ( Value Op,
const Twine Name,
BasicBlock InsertAtEnd 
) [static]
BinaryOperator * BinaryOperator::CreateNSWNeg ( Value Op,
const Twine Name = "",
Instruction InsertBefore = 0 
) [static]
BinaryOperator * BinaryOperator::CreateNSWNeg ( Value Op,
const Twine Name,
BasicBlock InsertAtEnd 
) [static]
BinaryOperator * BinaryOperator::CreateNUWNeg ( Value Op,
const Twine Name = "",
Instruction InsertBefore = 0 
) [static]
BinaryOperator * BinaryOperator::CreateNUWNeg ( Value Op,
const Twine Name,
BasicBlock InsertAtEnd 
) [static]
llvm::BinaryOperator::DECLARE_TRANSPARENT_OPERAND_ACCESSORS ( Value  )

Transparently provide more efficient getOperand methods.

const Value * BinaryOperator::getFNegArgument ( const Value BinOp) [static]

Definition at line 1965 of file Instructions.cpp.

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

Definition at line 1961 of file Instructions.cpp.

References llvm::User::getOperand().

const Value * BinaryOperator::getNegArgument ( const Value BinOp) [static]

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.

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

Definition at line 1953 of file Instructions.cpp.

References llvm::User::getOperand().

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

Definition at line 1969 of file Instructions.cpp.

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

BinaryOps llvm::BinaryOperator::getOpcode ( ) const [inline]
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 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 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 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 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 ICmpInst llvm::BinaryOperator::HANDLE_OTHER_INST ( 46  ,
FCmp  ,
FCmpInst   
)
BinaryOperator AllocaInst TruncInst SExtInst FPToSIInst SIToFPInst FPExtInst IntToPtrInst ICmpInst llvm::BinaryOperator::HANDLE_OTHER_INST ( 46  ,
FCmp  ,
FCmpInst   
)
BinaryOperator AllocaInst TruncInst SExtInst FPToSIInst SIToFPInst FPExtInst IntToPtrInst ICmpInst PHINode llvm::BinaryOperator::HANDLE_OTHER_INST ( 48  ,
Call  ,
CallInst   
)
BinaryOperator AllocaInst TruncInst SExtInst FPToSIInst SIToFPInst FPExtInst IntToPtrInst ICmpInst PHINode llvm::BinaryOperator::HANDLE_OTHER_INST ( 48  ,
Call  ,
CallInst   
)
bool BinaryOperator::hasNoSignedWrap ( ) const
bool BinaryOperator::hasNoUnsignedWrap ( ) const
void BinaryOperator::init ( BinaryOps  iType) [protected]
bool BinaryOperator::isExact ( ) const
bool BinaryOperator::isFNeg ( const Value V,
bool  IgnoreZeroSign = false 
) [static]
bool BinaryOperator::isNeg ( const Value V) [static]

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

bool BinaryOperator::isNot ( const Value V) [static]
void* llvm::BinaryOperator::operator new ( size_t  s) [inline]

Reimplemented from llvm::User.

Definition at line 149 of file InstrTypes.h.

void BinaryOperator::setHasNoSignedWrap ( bool  b = true)
void BinaryOperator::setHasNoUnsignedWrap ( bool  b = true)

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(), llvm::NoFolder::CreateShl(), llvm::NoFolder::CreateSub(), llvm::InstCombiner::FoldShiftByConstant(), llvm::ConstantExpr::getAsInstruction(), GetShiftedValue(), llvm::InstCombiner::visitAdd(), llvm::InstCombiner::visitShl(), and llvm::InstCombiner::visitSub().

void BinaryOperator::setIsExact ( bool  b = true)

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 llvm::InstCombiner::FoldSelectIntoOp(), llvm::InstCombiner::FoldShiftByConstant(), llvm::ConstantExpr::getAsInstruction(), GetShiftedValue(), llvm::InstCombiner::visitAShr(), llvm::InstCombiner::visitLShr(), and llvm::InstCombiner::visitUDiv().

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


Member Data Documentation

Definition at line 133 of file InstrTypes.h.

Definition at line 332 of file InstrTypes.h.

Referenced by init().

Definition at line 364 of file InstrTypes.h.

Definition at line 372 of file InstrTypes.h.

Definition at line 170 of file InstrTypes.h.

Definition at line 380 of file InstrTypes.h.

Definition at line 370 of file InstrTypes.h.

Definition at line 154 of file InstrTypes.h.

Definition at line 150 of file InstrTypes.h.

Definition at line 356 of file InstrTypes.h.

Definition at line 360 of file InstrTypes.h.

Definition at line 162 of file InstrTypes.h.

Definition at line 378 of file InstrTypes.h.

Definition at line 174 of file InstrTypes.h.

Definition at line 156 of file InstrTypes.h.

Definition at line 382 of file InstrTypes.h.

Definition at line 341 of file InstrTypes.h.

Definition at line 124 of file InstrTypes.h.

Referenced by init().

Reimplemented from llvm::Value.

Definition at line 205 of file InstrTypes.h.

Referenced by Create(), CreateFNeg(), CreateNeg(), and CreateNot().

Definition at line 164 of file InstrTypes.h.

Definition at line 362 of file InstrTypes.h.

Definition at line 166 of file InstrTypes.h.

Definition at line 148 of file InstrTypes.h.

Definition at line 330 of file InstrTypes.h.

Referenced by init().

Definition at line 172 of file InstrTypes.h.

Definition at line 152 of file InstrTypes.h.

Definition at line 146 of file InstrTypes.h.

Definition at line 358 of file InstrTypes.h.

Definition at line 374 of file InstrTypes.h.

Definition at line 168 of file InstrTypes.h.

Definition at line 204 of file InstrTypes.h.

Definition at line 204 of file InstrTypes.h.

Definition at line 376 of file InstrTypes.h.

Definition at line 354 of file InstrTypes.h.


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