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 (Predicate pred, Value *LHS, Value *RHS, const std::string &NameStr="", Instruction *InsertBefore=0)
 Constructor with insert-before-instruction semantics.
 FCmpInst (Predicate pred, Value *LHS, Value *RHS, const std::string &NameStr, BasicBlock *InsertAtEnd)
 Constructor with insert-at-block-end 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 () 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 779 of file Instructions.h.


Constructor & Destructor Documentation

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

Constructor with insert-before-instruction semantics.

Parameters:
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
InsertBefore  Where to insert

Definition at line 782 of file Instructions.h.

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

Referenced by clone().

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

Constructor with insert-at-block-end semantics.

Parameters:
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
InsertAtEnd  Block to insert into.

Definition at line 801 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 821 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 828 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 838 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 845 of file Instructions.h.

References llvm::swap().

FCmpInst * FCmpInst::clone (  )  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 2863 of file Instructions.cpp.

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

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

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

Definition at line 853 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 854 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 857 of file Instructions.h.


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