LLVM API Documentation

llvm::BinaryOperator Class Reference

#include <InstrTypes.h>

Inheritance diagram for llvm::BinaryOperator:
[legend]
Collaboration diagram for llvm::BinaryOperator:
[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 (19, Shl, BinaryOperator) HANDLE_BINARY_INST(20
BinaryOperator HANDLE_BINARY_INST (21, AShr, BinaryOperator) HANDLE_MEMORY_INST(25
BinaryOperator MallocInst HANDLE_MEMORY_INST (27, Alloca, AllocaInst) HANDLE_MEMORY_INST(28
BinaryOperator MallocInst LoadInst HANDLE_CAST_INST (31, Trunc, TruncInst) HANDLE_CAST_INST(32
BinaryOperator MallocInst
LoadInst ZExtInst 
HANDLE_CAST_INST (33, SExt, SExtInst) HANDLE_CAST_INST(34
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst 
HANDLE_CAST_INST (35, FPToSI, FPToSIInst) HANDLE_CAST_INST(36
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst 
HANDLE_CAST_INST (37, SIToFP, SIToFPInst) HANDLE_CAST_INST(38
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst 
HANDLE_CAST_INST (39, FPExt, FPExtInst) HANDLE_CAST_INST(40
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst
PtrToIntInst 
HANDLE_CAST_INST (41, IntToPtr, IntToPtrInst) HANDLE_CAST_INST(42
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst
PtrToIntInst BitCastInst 
HANDLE_OTHER_INST (43, ICmp, ICmpInst) HANDLE_OTHER_INST(44
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst
PtrToIntInst BitCastInst
FCmpInst 
HANDLE_OTHER_INST (45, PHI, PHINode) HANDLE_OTHER_INST(46
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst
PtrToIntInst BitCastInst
FCmpInst CallInst 
HANDLE_OTHER_INST (47, Select, SelectInst) HANDLE_OTHER_INST(48
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst
PtrToIntInst BitCastInst
FCmpInst CallInst Instruction 
HANDLE_OTHER_INST (49, UserOp2, Instruction) HANDLE_OTHER_INST(50
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst
PtrToIntInst BitCastInst
FCmpInst CallInst Instruction
VAArgInst 
HANDLE_OTHER_INST (51, ExtractElement, ExtractElementInst) HANDLE_OTHER_INST(52
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst
PtrToIntInst BitCastInst
FCmpInst CallInst Instruction
VAArgInst InsertElementInst 
HANDLE_OTHER_INST (53, ShuffleVector, ShuffleVectorInst) HANDLE_OTHER_INST(54
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst
PtrToIntInst BitCastInst
FCmpInst CallInst Instruction
VAArgInst InsertElementInst
ExtractValueInst 
HANDLE_OTHER_INST (55, InsertValue, InsertValueInst) HANDLE_BINARY_INST(19
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst
PtrToIntInst BitCastInst
FCmpInst CallInst Instruction
VAArgInst InsertElementInst
ExtractValueInst
BinaryOperator 
HANDLE_BINARY_INST (20, LShr, BinaryOperator) HANDLE_BINARY_INST(21
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst
PtrToIntInst BitCastInst
FCmpInst CallInst Instruction
VAArgInst InsertElementInst
ExtractValueInst
BinaryOperator BinaryOperator 
HANDLE_MEMORY_INST (25, Malloc, MallocInst) HANDLE_MEMORY_INST(27
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst
PtrToIntInst BitCastInst
FCmpInst CallInst Instruction
VAArgInst InsertElementInst
ExtractValueInst
BinaryOperator BinaryOperator
AllocaInst 
HANDLE_MEMORY_INST (28, Load, LoadInst) HANDLE_CAST_INST(31
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst
PtrToIntInst BitCastInst
FCmpInst CallInst Instruction
VAArgInst InsertElementInst
ExtractValueInst
BinaryOperator BinaryOperator
AllocaInst TruncInst 
HANDLE_CAST_INST (32, ZExt, ZExtInst) HANDLE_CAST_INST(33
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst
PtrToIntInst BitCastInst
FCmpInst CallInst Instruction
VAArgInst InsertElementInst
ExtractValueInst
BinaryOperator BinaryOperator
AllocaInst TruncInst SExtInst 
HANDLE_CAST_INST (34, FPToUI, FPToUIInst) HANDLE_CAST_INST(35
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst
PtrToIntInst BitCastInst
FCmpInst CallInst Instruction
VAArgInst InsertElementInst
ExtractValueInst
BinaryOperator BinaryOperator
AllocaInst TruncInst SExtInst
FPToSIInst 
HANDLE_CAST_INST (36, UIToFP, UIToFPInst) HANDLE_CAST_INST(37
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst
PtrToIntInst BitCastInst
FCmpInst CallInst Instruction
VAArgInst InsertElementInst
ExtractValueInst
BinaryOperator BinaryOperator
AllocaInst TruncInst SExtInst
FPToSIInst SIToFPInst 
HANDLE_CAST_INST (38, FPTrunc, FPTruncInst) HANDLE_CAST_INST(39
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst
PtrToIntInst BitCastInst
FCmpInst CallInst Instruction
VAArgInst InsertElementInst
ExtractValueInst
BinaryOperator BinaryOperator
AllocaInst TruncInst SExtInst
FPToSIInst SIToFPInst
FPExtInst 
HANDLE_CAST_INST (40, PtrToInt, PtrToIntInst) HANDLE_CAST_INST(41
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst
PtrToIntInst BitCastInst
FCmpInst CallInst Instruction
VAArgInst InsertElementInst
ExtractValueInst
BinaryOperator BinaryOperator
AllocaInst TruncInst SExtInst
FPToSIInst SIToFPInst
FPExtInst IntToPtrInst 
HANDLE_CAST_INST (42, BitCast, BitCastInst) HANDLE_OTHER_INST(43
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst
PtrToIntInst BitCastInst
FCmpInst CallInst Instruction
VAArgInst InsertElementInst
ExtractValueInst
BinaryOperator BinaryOperator
AllocaInst TruncInst SExtInst
FPToSIInst SIToFPInst
FPExtInst IntToPtrInst
ICmpInst 
HANDLE_OTHER_INST (44, FCmp, FCmpInst) HANDLE_OTHER_INST(45
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst
PtrToIntInst BitCastInst
FCmpInst CallInst Instruction
VAArgInst InsertElementInst
ExtractValueInst
BinaryOperator BinaryOperator
AllocaInst TruncInst SExtInst
FPToSIInst SIToFPInst
FPExtInst IntToPtrInst
ICmpInst PHINode 
HANDLE_OTHER_INST (46, Call, CallInst) HANDLE_OTHER_INST(47
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst
PtrToIntInst BitCastInst
FCmpInst CallInst Instruction
VAArgInst InsertElementInst
ExtractValueInst
BinaryOperator BinaryOperator
AllocaInst TruncInst SExtInst
FPToSIInst SIToFPInst
FPExtInst IntToPtrInst
ICmpInst PHINode SelectInst 
HANDLE_OTHER_INST (48, UserOp1, Instruction) HANDLE_OTHER_INST(49
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst
PtrToIntInst BitCastInst
FCmpInst CallInst Instruction
VAArgInst InsertElementInst
ExtractValueInst
BinaryOperator BinaryOperator
AllocaInst TruncInst SExtInst
FPToSIInst SIToFPInst
FPExtInst IntToPtrInst
ICmpInst PHINode SelectInst
Instruction 
HANDLE_OTHER_INST (50, VAArg, VAArgInst) HANDLE_OTHER_INST(51
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst
PtrToIntInst BitCastInst
FCmpInst CallInst Instruction
VAArgInst InsertElementInst
ExtractValueInst
BinaryOperator BinaryOperator
AllocaInst TruncInst SExtInst
FPToSIInst SIToFPInst
FPExtInst IntToPtrInst
ICmpInst PHINode SelectInst
Instruction ExtractElementInst 
HANDLE_OTHER_INST (52, InsertElement, InsertElementInst) HANDLE_OTHER_INST(53
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst
PtrToIntInst BitCastInst
FCmpInst CallInst Instruction
VAArgInst InsertElementInst
ExtractValueInst
BinaryOperator BinaryOperator
AllocaInst TruncInst SExtInst
FPToSIInst SIToFPInst
FPExtInst IntToPtrInst
ICmpInst PHINode SelectInst
Instruction ExtractElementInst
ShuffleVectorInst 
HANDLE_OTHER_INST (54, ExtractValue, ExtractValueInst) HANDLE_OTHER_INST(55
 HANDLE_BINARY_INST (19, Shl, BinaryOperator) HANDLE_BINARY_INST(20
BinaryOperator HANDLE_BINARY_INST (21, AShr, BinaryOperator) HANDLE_MEMORY_INST(25
BinaryOperator MallocInst HANDLE_MEMORY_INST (27, Alloca, AllocaInst) HANDLE_MEMORY_INST(28
BinaryOperator MallocInst LoadInst HANDLE_CAST_INST (31, Trunc, TruncInst) HANDLE_CAST_INST(32
BinaryOperator MallocInst
LoadInst ZExtInst 
HANDLE_CAST_INST (33, SExt, SExtInst) HANDLE_CAST_INST(34
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst 
HANDLE_CAST_INST (35, FPToSI, FPToSIInst) HANDLE_CAST_INST(36
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst 
HANDLE_CAST_INST (37, SIToFP, SIToFPInst) HANDLE_CAST_INST(38
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst 
HANDLE_CAST_INST (39, FPExt, FPExtInst) HANDLE_CAST_INST(40
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst
PtrToIntInst 
HANDLE_CAST_INST (41, IntToPtr, IntToPtrInst) HANDLE_CAST_INST(42
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst
PtrToIntInst BitCastInst 
HANDLE_OTHER_INST (43, ICmp, ICmpInst) HANDLE_OTHER_INST(44
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst
PtrToIntInst BitCastInst
FCmpInst 
HANDLE_OTHER_INST (45, PHI, PHINode) HANDLE_OTHER_INST(46
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst
PtrToIntInst BitCastInst
FCmpInst CallInst 
HANDLE_OTHER_INST (47, Select, SelectInst) HANDLE_OTHER_INST(48
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst
PtrToIntInst BitCastInst
FCmpInst CallInst Instruction 
HANDLE_OTHER_INST (49, UserOp2, Instruction) HANDLE_OTHER_INST(50
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst
PtrToIntInst BitCastInst
FCmpInst CallInst Instruction
VAArgInst 
HANDLE_OTHER_INST (51, ExtractElement, ExtractElementInst) HANDLE_OTHER_INST(52
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst
PtrToIntInst BitCastInst
FCmpInst CallInst Instruction
VAArgInst InsertElementInst 
HANDLE_OTHER_INST (53, ShuffleVector, ShuffleVectorInst) HANDLE_OTHER_INST(54
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst
PtrToIntInst BitCastInst
FCmpInst CallInst Instruction
VAArgInst InsertElementInst
ExtractValueInst 
HANDLE_OTHER_INST (55, InsertValue, InsertValueInst) static BinaryOperator *CreateNSWAdd(Value *V1
BinaryOps getOpcode () const
virtual BinaryOperator * clone (LLVMContext &Context) const
bool swapOperands ()

Static Public Member Functions

static BinaryOperator * Create (BinaryOps Op, Value *S1, Value *S2, const Twine &Name="", Instruction *InsertBefore=0)
static BinaryOperator * Create (BinaryOps Op, Value *S1, Value *S2, const Twine &Name, BasicBlock *InsertAtEnd)
static BinaryOperator * CreateNeg (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)
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 BinaryOperator *)
static bool classof (const Instruction *I)
 Methods for support type inquiry through isa, cast, and dyn_cast:.
static bool classof (const Value *V)

Public Attributes

 LShr
BinaryOperator Malloc
BinaryOperator MallocInst Load
BinaryOperator MallocInst LoadInst ZExt
BinaryOperator MallocInst
LoadInst ZExtInst 
FPToUI
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst 
UIToFP
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst 
FPTrunc
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst 
PtrToInt
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst
PtrToIntInst 
BitCast
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst
PtrToIntInst BitCastInst 
FCmp
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst
PtrToIntInst BitCastInst
FCmpInst 
Call
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst
PtrToIntInst BitCastInst
FCmpInst CallInst 
UserOp1
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst
PtrToIntInst BitCastInst
FCmpInst CallInst Instruction 
VAArg
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst
PtrToIntInst BitCastInst
FCmpInst CallInst Instruction
VAArgInst 
InsertElement
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst
PtrToIntInst BitCastInst
FCmpInst CallInst Instruction
VAArgInst InsertElementInst 
ExtractValue
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst
PtrToIntInst BitCastInst
FCmpInst CallInst Instruction
VAArgInst InsertElementInst
ExtractValueInst 
Shl
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst
PtrToIntInst BitCastInst
FCmpInst CallInst Instruction
VAArgInst InsertElementInst
ExtractValueInst
BinaryOperator 
AShr
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst
PtrToIntInst BitCastInst
FCmpInst CallInst Instruction
VAArgInst InsertElementInst
ExtractValueInst
BinaryOperator BinaryOperator 
Alloca
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst
PtrToIntInst BitCastInst
FCmpInst CallInst Instruction
VAArgInst InsertElementInst
ExtractValueInst
BinaryOperator BinaryOperator
AllocaInst 
Trunc
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst
PtrToIntInst BitCastInst
FCmpInst CallInst Instruction
VAArgInst InsertElementInst
ExtractValueInst
BinaryOperator BinaryOperator
AllocaInst TruncInst 
SExt
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst
PtrToIntInst BitCastInst
FCmpInst CallInst Instruction
VAArgInst InsertElementInst
ExtractValueInst
BinaryOperator BinaryOperator
AllocaInst TruncInst SExtInst 
FPToSI
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst
PtrToIntInst BitCastInst
FCmpInst CallInst Instruction
VAArgInst InsertElementInst
ExtractValueInst
BinaryOperator BinaryOperator
AllocaInst TruncInst SExtInst
FPToSIInst 
SIToFP
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst
PtrToIntInst BitCastInst
FCmpInst CallInst Instruction
VAArgInst InsertElementInst
ExtractValueInst
BinaryOperator BinaryOperator
AllocaInst TruncInst SExtInst
FPToSIInst SIToFPInst 
FPExt
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst
PtrToIntInst BitCastInst
FCmpInst CallInst Instruction
VAArgInst InsertElementInst
ExtractValueInst
BinaryOperator BinaryOperator
AllocaInst TruncInst SExtInst
FPToSIInst SIToFPInst
FPExtInst 
IntToPtr
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst
PtrToIntInst BitCastInst
FCmpInst CallInst Instruction
VAArgInst InsertElementInst
ExtractValueInst
BinaryOperator BinaryOperator
AllocaInst TruncInst SExtInst
FPToSIInst SIToFPInst
FPExtInst IntToPtrInst 
ICmp
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst
PtrToIntInst BitCastInst
FCmpInst CallInst Instruction
VAArgInst InsertElementInst
ExtractValueInst
BinaryOperator BinaryOperator
AllocaInst TruncInst SExtInst
FPToSIInst SIToFPInst
FPExtInst IntToPtrInst
ICmpInst 
PHI
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst
PtrToIntInst BitCastInst
FCmpInst CallInst Instruction
VAArgInst InsertElementInst
ExtractValueInst
BinaryOperator BinaryOperator
AllocaInst TruncInst SExtInst
FPToSIInst SIToFPInst
FPExtInst IntToPtrInst
ICmpInst PHINode 
Select
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst
PtrToIntInst BitCastInst
FCmpInst CallInst Instruction
VAArgInst InsertElementInst
ExtractValueInst
BinaryOperator BinaryOperator
AllocaInst TruncInst SExtInst
FPToSIInst SIToFPInst
FPExtInst IntToPtrInst
ICmpInst PHINode SelectInst 
UserOp2
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst
PtrToIntInst BitCastInst
FCmpInst CallInst Instruction
VAArgInst InsertElementInst
ExtractValueInst
BinaryOperator BinaryOperator
AllocaInst TruncInst SExtInst
FPToSIInst SIToFPInst
FPExtInst IntToPtrInst
ICmpInst PHINode SelectInst
Instruction 
ExtractElement
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst
PtrToIntInst BitCastInst
FCmpInst CallInst Instruction
VAArgInst InsertElementInst
ExtractValueInst
BinaryOperator BinaryOperator
AllocaInst TruncInst SExtInst
FPToSIInst SIToFPInst
FPExtInst IntToPtrInst
ICmpInst PHINode SelectInst
Instruction ExtractElementInst 
ShuffleVector
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst
PtrToIntInst BitCastInst
FCmpInst CallInst Instruction
VAArgInst InsertElementInst
ExtractValueInst
BinaryOperator BinaryOperator
AllocaInst TruncInst SExtInst
FPToSIInst SIToFPInst
FPExtInst IntToPtrInst
ICmpInst PHINode SelectInst
Instruction ExtractElementInst
ShuffleVectorInst 
InsertValue
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst
PtrToIntInst BitCastInst
FCmpInst CallInst Instruction
VAArgInst InsertElementInst
ExtractValueInst Value * 
V2
BinaryOperator MallocInst
LoadInst ZExtInst FPToUIInst
UIToFPInst FPTruncInst
PtrToIntInst BitCastInst
FCmpInst CallInst Instruction
VAArgInst InsertElementInst
ExtractValueInst Value const
Twine & 
Name

Protected Member Functions

void init (BinaryOps iType)
 BinaryOperator (BinaryOps iType, Value *S1, Value *S2, const Type *Ty, const Twine &Name, Instruction *InsertBefore)
 BinaryOperator (BinaryOps iType, Value *S1, Value *S2, const Type *Ty, const Twine &Name, BasicBlock *InsertAtEnd)


Detailed Description

Definition at line 142 of file InstrTypes.h.


Constructor & Destructor Documentation

BinaryOperator::BinaryOperator ( BinaryOps  iType,
Value *  S1,
Value *  S2,
const Type *  Ty,
const Twine &  Name,
Instruction *  InsertBefore 
) [protected]

Definition at line 1445 of file Instructions.cpp.

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

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

BinaryOperator::BinaryOperator ( BinaryOps  iType,
Value *  S1,
Value *  S2,
const Type *  Ty,
const Twine &  Name,
BasicBlock *  InsertAtEnd 
) [protected]

Definition at line 1458 of file Instructions.cpp.

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


Member Function Documentation

void BinaryOperator::init ( BinaryOps  iType  )  [protected]

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

Reimplemented from llvm::User.

Definition at line 152 of file InstrTypes.h.

References operator new().

llvm::BinaryOperator::DECLARE_TRANSPARENT_OPERAND_ACCESSORS ( Value   ) 

Transparently provide more efficient getOperand methods.

BinaryOperator * BinaryOperator::Create ( BinaryOps  Op,
Value *  S1,
Value *  S2,
const Twine &  Name = "",
Instruction *  InsertBefore = 0 
) [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 1547 of file Instructions.cpp.

References BinaryOperator(), and llvm::Value::getType().

Referenced by clone(), Create(), llvm::NoFolder::CreateBinOp(), llvm::IRBuilder< true, llvm::TargetFolder >::CreateBinOp(), llvm::FoldBranchToCommonDest(), and llvm::IncrementCounterInBlock().

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 1555 of file Instructions.cpp.

References Create(), and llvm::BasicBlock::getInstList().

llvm::BinaryOperator::HANDLE_BINARY_INST ( 19  ,
Shl  ,
BinaryOperator   
)

BinaryOperator llvm::BinaryOperator::HANDLE_BINARY_INST ( 21  ,
AShr  ,
BinaryOperator   
)

Type Constraints

BinaryOperator MallocInst llvm::BinaryOperator::HANDLE_MEMORY_INST ( 27  ,
Alloca  ,
AllocaInst   
)

Type Constraints

BinaryOperator MallocInst LoadInst llvm::BinaryOperator::HANDLE_CAST_INST ( 31  ,
Trunc  ,
TruncInst   
)

Type Constraints

BinaryOperator MallocInst LoadInst ZExtInst llvm::BinaryOperator::HANDLE_CAST_INST ( 33  ,
SExt  ,
SExtInst   
)

Type Constraints

BinaryOperator MallocInst LoadInst ZExtInst FPToUIInst llvm::BinaryOperator::HANDLE_CAST_INST ( 35  ,
FPToSI  ,
FPToSIInst   
)

Type Constraints

BinaryOperator MallocInst LoadInst ZExtInst FPToUIInst UIToFPInst llvm::BinaryOperator::HANDLE_CAST_INST ( 37  ,
SIToFP  ,
SIToFPInst   
)

Type Constraints

BinaryOperator MallocInst LoadInst ZExtInst FPToUIInst UIToFPInst FPTruncInst llvm::BinaryOperator::HANDLE_CAST_INST ( 39  ,
FPExt  ,
FPExtInst   
)

Type Constraints

BinaryOperator MallocInst LoadInst ZExtInst FPToUIInst UIToFPInst FPTruncInst PtrToIntInst llvm::BinaryOperator::HANDLE_CAST_INST ( 41  ,
IntToPtr  ,
IntToPtrInst   
)

Type Constraints

BinaryOperator MallocInst LoadInst ZExtInst FPToUIInst UIToFPInst FPTruncInst PtrToIntInst BitCastInst llvm::BinaryOperator::HANDLE_OTHER_INST ( 43  ,
ICmp  ,
ICmpInst   
)

Type Constraints

Type Constraints

Type Constraints

Type Constraints

Type Constraints

Type Constraints

Type Constraints

Type Constraints

Type Constraints

Type Constraints

Type Constraints

Type Constraints

Type Constraints

Type Constraints

Type Constraints

Type Constraints

Type Constraints

Type Constraints

Type Constraints

Type Constraints

Type Constraints

Type Constraints

llvm::BinaryOperator::HANDLE_BINARY_INST ( 19  ,
Shl  ,
BinaryOperator   
)

BinaryOperator llvm::BinaryOperator::HANDLE_BINARY_INST ( 21  ,
AShr  ,
BinaryOperator   
)

Type Constraints

BinaryOperator MallocInst llvm::BinaryOperator::HANDLE_MEMORY_INST ( 27  ,
Alloca  ,
AllocaInst   
)

Type Constraints

BinaryOperator MallocInst LoadInst llvm::BinaryOperator::HANDLE_CAST_INST ( 31  ,
Trunc  ,
TruncInst   
)

Type Constraints

BinaryOperator MallocInst LoadInst ZExtInst llvm::BinaryOperator::HANDLE_CAST_INST ( 33  ,
SExt  ,
SExtInst   
)

Type Constraints

BinaryOperator MallocInst LoadInst ZExtInst FPToUIInst llvm::BinaryOperator::HANDLE_CAST_INST ( 35  ,
FPToSI  ,
FPToSIInst   
)

Type Constraints

BinaryOperator MallocInst LoadInst ZExtInst FPToUIInst UIToFPInst llvm::BinaryOperator::HANDLE_CAST_INST ( 37  ,
SIToFP  ,
SIToFPInst   
)

Type Constraints

BinaryOperator MallocInst LoadInst ZExtInst FPToUIInst UIToFPInst FPTruncInst llvm::BinaryOperator::HANDLE_CAST_INST ( 39  ,
FPExt  ,
FPExtInst   
)

Type Constraints

BinaryOperator MallocInst LoadInst ZExtInst FPToUIInst UIToFPInst FPTruncInst PtrToIntInst llvm::BinaryOperator::HANDLE_CAST_INST ( 41  ,
IntToPtr  ,
IntToPtrInst   
)

Type Constraints

BinaryOperator MallocInst LoadInst ZExtInst FPToUIInst UIToFPInst FPTruncInst PtrToIntInst BitCastInst llvm::BinaryOperator::HANDLE_OTHER_INST ( 43  ,
ICmp  ,
ICmpInst   
)

Type Constraints

Type Constraints

Type Constraints

Type Constraints

Type Constraints

Type Constraints

CreateNSWAdd - Create an Add operator with the NSW flag set.

Type Constraints

BinaryOperator * BinaryOperator::CreateNeg ( Value *  Op,
const Twine &  Name,
BasicBlock *  InsertAtEnd 
) [static]

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::CreateNot ( Value *  Op,
const Twine &  Name = "",
Instruction *  InsertBefore = 0 
) [static]

BinaryOperator * BinaryOperator::CreateNot ( Value *  Op,
const Twine &  Name,
BasicBlock *  InsertAtEnd 
) [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 1636 of file Instructions.cpp.

bool BinaryOperator::isFNeg ( const Value *  V  )  [static]

Definition at line 1644 of file Instructions.cpp.

bool BinaryOperator::isNot ( const Value *  V  )  [static]

Definition at line 1652 of file Instructions.cpp.

References isConstantAllOnes(), and llvm::APIntOps::Xor().

Referenced by getNotArgument().

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 1664 of file Instructions.cpp.

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

Definition at line 1660 of file Instructions.cpp.

References llvm::User::getOperand().

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

Definition at line 1672 of file Instructions.cpp.

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

Definition at line 1668 of file Instructions.cpp.

References llvm::User::getOperand().

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

Definition at line 1687 of file Instructions.cpp.

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

Definition at line 1676 of file Instructions.cpp.

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

BinaryOps llvm::BinaryOperator::getOpcode (  )  const [inline]

Subclass classification... getOpcode() returns a member of one of the enums that is coming soon (down below)...

Reimplemented from llvm::Instruction.

Definition at line 865 of file InstrTypes.h.

Referenced by AssociativeOpt(), clone(), CollectBSwapParts(), DecomposeSimpleLinearExpr(), FindSingleUseMultiplyFactors(), PointsToConstantGlobal(), llvm::MSILWriter::printLocalVariables(), and llvm::Interpreter::visitBinaryOperator().

BinaryOperator * BinaryOperator::clone ( LLVMContext &  Context  )  const [virtual]

clone() - Create a copy of 'this' instruction that is identical in all ways except the following: The instruction has no parent The instruction has no name

Implements llvm::Instruction.

Definition at line 2871 of file Instructions.cpp.

References Create(), getOpcode(), and llvm::Value::SubclassOptionalData.

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 1697 of file Instructions.cpp.

References llvm::Instruction::isCommutative(), and llvm::swap().

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

Definition at line 879 of file InstrTypes.h.

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

Methods for support type inquiry through isa, cast, and dyn_cast:.

Reimplemented from llvm::Instruction.

Definition at line 880 of file InstrTypes.h.

static bool llvm::BinaryOperator::classof ( const Value *  V  )  [inline, static]

Reimplemented from llvm::Instruction.

Definition at line 883 of file InstrTypes.h.


Member Data Documentation

Definition at line 304 of file InstrTypes.h.

Referenced by init().

Definition at line 313 of file InstrTypes.h.

Definition at line 316 of file InstrTypes.h.

Definition at line 326 of file InstrTypes.h.

Definition at line 328 of file InstrTypes.h.

Definition at line 330 of file InstrTypes.h.

Definition at line 332 of file InstrTypes.h.

Definition at line 334 of file InstrTypes.h.

Definition at line 336 of file InstrTypes.h.

Definition at line 342 of file InstrTypes.h.

Definition at line 344 of file InstrTypes.h.

Definition at line 346 of file InstrTypes.h.

Definition at line 348 of file InstrTypes.h.

Definition at line 350 of file InstrTypes.h.

Definition at line 352 of file InstrTypes.h.

Definition at line 505 of file InstrTypes.h.

Referenced by init().

Definition at line 507 of file InstrTypes.h.

Referenced by init().

Definition at line 517 of file InstrTypes.h.

Definition at line 527 of file InstrTypes.h.

Definition at line 529 of file InstrTypes.h.

Definition at line 531 of file InstrTypes.h.

Definition at line 533 of file InstrTypes.h.

Definition at line 535 of file InstrTypes.h.

Definition at line 537 of file InstrTypes.h.

Definition at line 543 of file InstrTypes.h.

Definition at line 545 of file InstrTypes.h.

Definition at line 547 of file InstrTypes.h.

Definition at line 549 of file InstrTypes.h.

Definition at line 551 of file InstrTypes.h.

Definition at line 553 of file InstrTypes.h.

Definition at line 555 of file InstrTypes.h.

Definition at line 788 of file InstrTypes.h.

Reimplemented from llvm::Value.

Definition at line 789 of file InstrTypes.h.


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