LLVM API Documentation

llvm::FCmpInst Class Reference

Represents a floating point comparison operator. More...

#include <Instructions.h>

Inheritance diagram for llvm::FCmpInst:
[legend]
Collaboration diagram for llvm::FCmpInst:
[legend]

List of all members.

Public Member Functions

 FCmpInst (Instruction *InsertBefore, Predicate pred, Value *LHS, Value *RHS, const Twine &NameStr="")
 Constructor with insert-before-instruction semantics.
 FCmpInst (BasicBlock &InsertAtEnd, Predicate pred, Value *LHS, Value *RHS, const Twine &NameStr="")
 Constructor with insert-at-end semantics.
 FCmpInst (LLVMContext &Context, Predicate pred, Value *LHS, Value *RHS, const Twine &NameStr="")
 Constructor with no-insertion semantics.
bool isEquality () const
 Determine if this is an equality predicate.
bool isCommutative () const
 Determine if this is a commutative predicate.
bool isRelational () const
 Determine if this a relational predicate.
void swapOperands ()
 Swap operands and adjust predicate.
virtual FCmpInst * clone (LLVMContext &Context) const

Static Public Member Functions

static bool classof (const FCmpInst *)
 Methods for support type inquiry through isa, cast, and dyn_cast:.
static bool classof (const Instruction *I)
 Methods for support type inquiry through isa, cast, and dyn_cast:.
static bool classof (const Value *V)


Detailed Description

Represents a floating point comparison operator.

This instruction compares its operands according to the predicate given to the constructor. It only operates on floating point values or packed vectors of floating point values. The operands must be identical types.

Definition at line 828 of file Instructions.h.


Constructor & Destructor Documentation

llvm::FCmpInst::FCmpInst ( Instruction *  InsertBefore,
Predicate  pred,
Value *  LHS,
Value *  RHS,
const Twine &  NameStr = "" 
) [inline]

Constructor with insert-before-instruction semantics.

Parameters:
InsertBefore  Where to insert
pred  The predicate to use for the comparison
LHS  The left-hand-side of the expression
RHS  The right-hand-side of the expression
NameStr  Name of the instruction

Definition at line 831 of file Instructions.h.

References llvm::Intrinsic::getType(), and llvm::CmpInst::LAST_FCMP_PREDICATE.

Referenced by clone().

llvm::FCmpInst::FCmpInst ( BasicBlock &  InsertAtEnd,
Predicate  pred,
Value *  LHS,
Value *  RHS,
const Twine &  NameStr = "" 
) [inline]

Constructor with insert-at-end semantics.

Parameters:
InsertAtEnd  Block to insert into.
pred  The predicate to use for the comparison
LHS  The left-hand-side of the expression
RHS  The right-hand-side of the expression
NameStr  Name of the instruction

Definition at line 850 of file Instructions.h.

References llvm::Intrinsic::getType(), and llvm::CmpInst::LAST_FCMP_PREDICATE.

llvm::FCmpInst::FCmpInst ( LLVMContext &  Context,
Predicate  pred,
Value *  LHS,
Value *  RHS,
const Twine &  NameStr = "" 
) [inline]

Constructor with no-insertion semantics.

Parameters:
Context  Context to build in
pred  The predicate to use for the comparison
LHS  The left-hand-side of the expression
RHS  The right-hand-side of the expression
NameStr  Name of the instruction

Definition at line 869 of file Instructions.h.

References llvm::Intrinsic::getType(), and llvm::CmpInst::LAST_FCMP_PREDICATE.


Member Function Documentation

bool llvm::FCmpInst::isEquality (  )  const [inline]

Determine if this is an equality predicate.

Returns:
true if the predicate of this instruction is EQ or NE.

Definition at line 888 of file Instructions.h.

bool llvm::FCmpInst::isCommutative (  )  const [inline]

Determine if this is a commutative predicate.

Returns:
true if the predicate of this instruction is commutative.

Reimplemented from llvm::Instruction.

Definition at line 895 of file Instructions.h.

bool llvm::FCmpInst::isRelational (  )  const [inline]

Determine if this a relational predicate.

Returns:
true if the predicate is relational (not EQ or NE).

Definition at line 905 of file Instructions.h.

void llvm::FCmpInst::swapOperands (  )  [inline]

Swap operands and adjust predicate.

Exchange the two operands to this instruction in such a way that it does not modify the semantics of the instruction. The predicate value may be changed to retain the same result if the predicate is order dependent (e.g. ult).

Reimplemented from llvm::CmpInst.

Definition at line 912 of file Instructions.h.

References llvm::swap().

FCmpInst * FCmpInst::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 2877 of file Instructions.cpp.

References FCmpInst(), llvm::CmpInst::getPredicate(), and llvm::Value::SubclassOptionalData.

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

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

Definition at line 920 of file Instructions.h.

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

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

Reimplemented from llvm::CmpInst.

Definition at line 921 of file Instructions.h.

References FCmp, and llvm::Instruction::getOpcode().

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

Reimplemented from llvm::CmpInst.

Definition at line 924 of file Instructions.h.


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