LLVM  mainline
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Friends
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)
 Allocate a User with an operand pointer co-allocated.
 DECLARE_TRANSPARENT_OPERAND_ACCESSORS (Value)
 Transparently provide more efficient getOperand methods.
 HANDLE_BINARY_INST (23, Shl, BinaryOperator) HANDLE_BINARY_INST(24
BinaryOperator HANDLE_BINARY_INST (25, AShr, BinaryOperator) HANDLE_MEMORY_INST(29
BinaryOperator AllocaInst HANDLE_MEMORY_INST (30, Load, LoadInst) HANDLE_CAST_INST(36
BinaryOperator AllocaInst TruncInst HANDLE_CAST_INST (37, ZExt, ZExtInst) HANDLE_CAST_INST(38
BinaryOperator AllocaInst
TruncInst SExtInst 
HANDLE_CAST_INST (39, FPToUI, FPToUIInst) HANDLE_CAST_INST(40
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst 
HANDLE_CAST_INST (41, UIToFP, UIToFPInst) HANDLE_CAST_INST(42
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst 
HANDLE_CAST_INST (43, FPTrunc, FPTruncInst) HANDLE_CAST_INST(44
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst 
HANDLE_CAST_INST (45, PtrToInt, PtrToIntInst) HANDLE_CAST_INST(46
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst 
HANDLE_CAST_INST (47, BitCast, BitCastInst) HANDLE_CAST_INST(48
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst AddrSpaceCastInst 
HANDLE_OTHER_INST (51, ICmp, ICmpInst) HANDLE_OTHER_INST(52
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst AddrSpaceCastInst
FCmpInst 
HANDLE_OTHER_INST (53, PHI, PHINode) HANDLE_OTHER_INST(54
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst AddrSpaceCastInst
FCmpInst CallInst 
HANDLE_OTHER_INST (55, Select, SelectInst) HANDLE_OTHER_INST(56
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst AddrSpaceCastInst
FCmpInst CallInst Instruction 
HANDLE_OTHER_INST (57, UserOp2, Instruction) HANDLE_OTHER_INST(58
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst AddrSpaceCastInst
FCmpInst CallInst Instruction
VAArgInst 
HANDLE_OTHER_INST (59, ExtractElement, ExtractElementInst) HANDLE_OTHER_INST(60
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst AddrSpaceCastInst
FCmpInst CallInst Instruction
VAArgInst InsertElementInst 
HANDLE_OTHER_INST (61, ShuffleVector, ShuffleVectorInst) HANDLE_OTHER_INST(62
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst AddrSpaceCastInst
FCmpInst CallInst Instruction
VAArgInst InsertElementInst
ExtractValueInst 
HANDLE_OTHER_INST (63, InsertValue, InsertValueInst) HANDLE_OTHER_INST(64
 HANDLE_BINARY_INST (23, Shl, BinaryOperator) HANDLE_BINARY_INST(24
BinaryOperator HANDLE_BINARY_INST (25, AShr, BinaryOperator) HANDLE_MEMORY_INST(29
BinaryOperator AllocaInst HANDLE_MEMORY_INST (30, Load, LoadInst) HANDLE_CAST_INST(36
BinaryOperator AllocaInst TruncInst HANDLE_CAST_INST (37, ZExt, ZExtInst) HANDLE_CAST_INST(38
BinaryOperator AllocaInst
TruncInst SExtInst 
HANDLE_CAST_INST (39, FPToUI, FPToUIInst) HANDLE_CAST_INST(40
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst 
HANDLE_CAST_INST (41, UIToFP, UIToFPInst) HANDLE_CAST_INST(42
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst 
HANDLE_CAST_INST (43, FPTrunc, FPTruncInst) HANDLE_CAST_INST(44
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst 
HANDLE_CAST_INST (45, PtrToInt, PtrToIntInst) HANDLE_CAST_INST(46
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst 
HANDLE_CAST_INST (47, BitCast, BitCastInst) HANDLE_CAST_INST(48
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst AddrSpaceCastInst 
HANDLE_OTHER_INST (51, ICmp, ICmpInst) HANDLE_OTHER_INST(52
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst AddrSpaceCastInst
FCmpInst 
HANDLE_OTHER_INST (53, PHI, PHINode) HANDLE_OTHER_INST(54
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst AddrSpaceCastInst
FCmpInst CallInst 
HANDLE_OTHER_INST (55, Select, SelectInst) HANDLE_OTHER_INST(56
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst AddrSpaceCastInst
FCmpInst CallInst Instruction 
HANDLE_OTHER_INST (57, UserOp2, Instruction) HANDLE_OTHER_INST(58
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst AddrSpaceCastInst
FCmpInst CallInst Instruction
VAArgInst 
HANDLE_OTHER_INST (59, ExtractElement, ExtractElementInst) HANDLE_OTHER_INST(60
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst AddrSpaceCastInst
FCmpInst CallInst Instruction
VAArgInst InsertElementInst 
HANDLE_OTHER_INST (61, ShuffleVector, ShuffleVectorInst) HANDLE_OTHER_INST(62
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst AddrSpaceCastInst
FCmpInst CallInst Instruction
VAArgInst InsertElementInst
ExtractValueInst 
HANDLE_OTHER_INST (63, InsertValue, InsertValueInst) HANDLE_OTHER_INST(64
 HANDLE_BINARY_INST (23, Shl, BinaryOperator) HANDLE_BINARY_INST(24
BinaryOperator HANDLE_BINARY_INST (25, AShr, BinaryOperator) HANDLE_MEMORY_INST(29
BinaryOperator AllocaInst HANDLE_MEMORY_INST (30, Load, LoadInst) HANDLE_CAST_INST(36
BinaryOperator AllocaInst TruncInst HANDLE_CAST_INST (37, ZExt, ZExtInst) HANDLE_CAST_INST(38
BinaryOperator AllocaInst
TruncInst SExtInst 
HANDLE_CAST_INST (39, FPToUI, FPToUIInst) HANDLE_CAST_INST(40
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst 
HANDLE_CAST_INST (41, UIToFP, UIToFPInst) HANDLE_CAST_INST(42
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst 
HANDLE_CAST_INST (43, FPTrunc, FPTruncInst) HANDLE_CAST_INST(44
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst 
HANDLE_CAST_INST (45, PtrToInt, PtrToIntInst) HANDLE_CAST_INST(46
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst 
HANDLE_CAST_INST (47, BitCast, BitCastInst) HANDLE_CAST_INST(48
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst AddrSpaceCastInst 
HANDLE_OTHER_INST (51, ICmp, ICmpInst) HANDLE_OTHER_INST(52
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst AddrSpaceCastInst
FCmpInst 
HANDLE_OTHER_INST (53, PHI, PHINode) HANDLE_OTHER_INST(54
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst AddrSpaceCastInst
FCmpInst CallInst 
HANDLE_OTHER_INST (55, Select, SelectInst) HANDLE_OTHER_INST(56
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst AddrSpaceCastInst
FCmpInst CallInst Instruction 
HANDLE_OTHER_INST (57, UserOp2, Instruction) HANDLE_OTHER_INST(58
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst AddrSpaceCastInst
FCmpInst CallInst Instruction
VAArgInst 
HANDLE_OTHER_INST (59, ExtractElement, ExtractElementInst) HANDLE_OTHER_INST(60
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst AddrSpaceCastInst
FCmpInst CallInst Instruction
VAArgInst InsertElementInst 
HANDLE_OTHER_INST (61, ShuffleVector, ShuffleVectorInst) HANDLE_OTHER_INST(62
BinaryOperator AllocaInst
TruncInst SExtInst FPToSIInst
SIToFPInst FPExtInst
IntToPtrInst AddrSpaceCastInst
FCmpInst CallInst Instruction
VAArgInst InsertElementInst
ExtractValueInst 
HANDLE_OTHER_INST (63, InsertValue, InsertValueInst) HANDLE_OTHER_INST(64
 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 ()
 Exchange the two operands to this instruction.
void setHasNoUnsignedWrap (bool b=true)
 Set or clear the nsw flag on this instruction, which must be an operator which supports this flag.
void setHasNoSignedWrap (bool b=true)
 Set or clear the nsw flag on this instruction, which must be an operator which supports this flag.
void setIsExact (bool b=true)
 Set or clear the exact flag on this instruction, which must be an operator which supports this flag.
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)
 Convenience method to copy supported wrapping, exact, and fast-math flags from V to this instruction.
void andIRFlags (const Value *V)
 Logical 'and' of any supported wrapping, exact, and fast-math flags of V and this instruction.

Static Public Member Functions

static BinaryOperatorCreate (BinaryOps Op, Value *S1, Value *S2, const Twine &Name=Twine(), Instruction *InsertBefore=nullptr)
 Construct a binary instruction, given the opcode and the two operands.
static BinaryOperatorCreate (BinaryOps Op, Value *S1, Value *S2, const Twine &Name, BasicBlock *InsertAtEnd)
 Construct a binary instruction, given the opcode and the two operands.
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)
 Helper functions to construct and inspect unary operations (NEG and NOT) via binary operators SUB and XOR:
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)
 Check if the given Value is a NEG, FNeg, or NOT instruction.
static bool isFNeg (const Value *V, bool IgnoreZeroSign=false)
static bool isNot (const Value *V)
static const ValuegetNegArgument (const Value *BinOp)
 Helper functions to extract the unary argument of a NEG, FNEG or NOT operation implemented via Sub, FSub, or Xor.
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)
BinaryOperatorcloneImpl () const
 Create a copy of this instruction.

Friends

class Instruction

Detailed Description

Definition at line 328 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 1907 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 1920 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 2212 of file Instructions.cpp.

References llvm::Instruction::copyFastMathFlags(), llvm::Instruction::getFastMathFlags(), hasNoSignedWrap(), hasNoUnsignedWrap(), isExact(), llvm::X86II::OB, setHasNoSignedWrap(), setHasNoUnsignedWrap(), and setIsExact().

Referenced by NegateValue(), and patchReplacementInstruction().

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

Definition at line 559 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 562 of file InstrTypes.h.

BinaryOperator * BinaryOperator::cloneImpl ( ) const [protected]

Create a copy of this instruction.

Reimplemented from llvm::Instruction.

Definition at line 3790 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 2196 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 2017 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 427 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 433 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 439 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 2025 of file Instructions.cpp.

References BinaryOperator(), llvm::Value::getType(), llvm::ConstantFP::getZeroValueForNegation(), Name, and fuzzer::zero.

Referenced by CreateNeg(), and llvm::IRBuilder< true, TargetFolder >::CreateNeg().

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 389 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 395 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 401 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 408 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 414 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 420 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 2140 of file Instructions.cpp.

Referenced by llvm::FastISel::selectFNeg(), and SimplifyFDivInst().

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

Definition at line 2136 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 2132 of file Instructions.cpp.

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

Definition at line 2128 of file Instructions.cpp.

References llvm::User::getOperand().

Definition at line 2155 of file Instructions.cpp.

Referenced by dyn_castNotVal(), and OptimizeAndOrXor().

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

Definition at line 2144 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 2101 of file Instructions.cpp.

Referenced by llvm::getComplexity(), LinearizeExprTree(), NegateValue(), and ShouldBreakUpSubtract().

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

Allocate a User with an operand pointer co-allocated.

This is used for subclasses which need to allocate a variable number of operands, ie, 'hung off uses'.

Reimplemented from llvm::User.

Definition at line 344 of file InstrTypes.h.

References llvm::User::operator new().

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

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

Referenced by llvm::InstCombiner::visitXor().


Friends And Related Function Documentation

friend class Instruction [friend]

Definition at line 339 of file InstrTypes.h.


Member Data Documentation

Definition at line 174 of file InstrTypes.h.

Definition at line 149 of file InstrTypes.h.

Definition at line 187 of file InstrTypes.h.

Definition at line 195 of file InstrTypes.h.

Definition at line 185 of file InstrTypes.h.

Definition at line 170 of file InstrTypes.h.

Definition at line 166 of file InstrTypes.h.

Definition at line 193 of file InstrTypes.h.

Definition at line 172 of file InstrTypes.h.

Definition at line 197 of file InstrTypes.h.

Definition at line 140 of file InstrTypes.h.

Referenced by init().

Definition at line 164 of file InstrTypes.h.

Definition at line 168 of file InstrTypes.h.

Definition at line 162 of file InstrTypes.h.

Definition at line 189 of file InstrTypes.h.

Definition at line 191 of file InstrTypes.h.


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