class FixedPointBuilder

Declaration

template <class IRBuilderTy>
class FixedPointBuilder { /* full declaration omitted */ };

Declared at: llvm/include/llvm/IR/FixedPointBuilder.h:30

Templates

IRBuilderTy

Member Variables

private IRBuilderTy& B

Method Overview

  • private llvm::Value * Convert(llvm::Value * Src, const llvm::FixedPointSemantics & SrcSema, const llvm::FixedPointSemantics & DstSema, bool DstIsInteger)
  • public llvm::Value * CreateAdd(llvm::Value * LHS, const llvm::FixedPointSemantics & LHSSema, llvm::Value * RHS, const llvm::FixedPointSemantics & RHSSema)
  • public llvm::Value * CreateDiv(llvm::Value * LHS, const llvm::FixedPointSemantics & LHSSema, llvm::Value * RHS, const llvm::FixedPointSemantics & RHSSema)
  • public llvm::Value * CreateEQ(llvm::Value * LHS, const llvm::FixedPointSemantics & LHSSema, llvm::Value * RHS, const llvm::FixedPointSemantics & RHSSema)
  • public llvm::Value * CreateFixedToFixed(llvm::Value * Src, const llvm::FixedPointSemantics & SrcSema, const llvm::FixedPointSemantics & DstSema)
  • public llvm::Value * CreateFixedToFloating(llvm::Value * Src, const llvm::FixedPointSemantics & SrcSema, llvm::Type * DstTy)
  • public llvm::Value * CreateFixedToInteger(llvm::Value * Src, const llvm::FixedPointSemantics & SrcSema, unsigned int DstWidth, bool DstIsSigned)
  • public llvm::Value * CreateFloatingToFixed(llvm::Value * Src, const llvm::FixedPointSemantics & DstSema)
  • public llvm::Value * CreateGE(llvm::Value * LHS, const llvm::FixedPointSemantics & LHSSema, llvm::Value * RHS, const llvm::FixedPointSemantics & RHSSema)
  • public llvm::Value * CreateGT(llvm::Value * LHS, const llvm::FixedPointSemantics & LHSSema, llvm::Value * RHS, const llvm::FixedPointSemantics & RHSSema)
  • public llvm::Value * CreateIntegerToFixed(llvm::Value * Src, unsigned int SrcIsSigned, const llvm::FixedPointSemantics & DstSema)
  • public llvm::Value * CreateLE(llvm::Value * LHS, const llvm::FixedPointSemantics & LHSSema, llvm::Value * RHS, const llvm::FixedPointSemantics & RHSSema)
  • public llvm::Value * CreateLT(llvm::Value * LHS, const llvm::FixedPointSemantics & LHSSema, llvm::Value * RHS, const llvm::FixedPointSemantics & RHSSema)
  • public llvm::Value * CreateMul(llvm::Value * LHS, const llvm::FixedPointSemantics & LHSSema, llvm::Value * RHS, const llvm::FixedPointSemantics & RHSSema)
  • public llvm::Value * CreateNE(llvm::Value * LHS, const llvm::FixedPointSemantics & LHSSema, llvm::Value * RHS, const llvm::FixedPointSemantics & RHSSema)
  • public llvm::Value * CreateShl(llvm::Value * LHS, const llvm::FixedPointSemantics & LHSSema, llvm::Value * RHS)
  • public llvm::Value * CreateShr(llvm::Value * LHS, const llvm::FixedPointSemantics & LHSSema, llvm::Value * RHS)
  • public llvm::Value * CreateSub(llvm::Value * LHS, const llvm::FixedPointSemantics & LHSSema, llvm::Value * RHS, const llvm::FixedPointSemantics & RHSSema)
  • public FixedPointBuilder<IRBuilderTy>(IRBuilderTy & Builder)
  • private llvm::Type * getAccommodatingFloatType(llvm::Type * Ty, const llvm::FixedPointSemantics & Sema)
  • private llvm::FixedPointSemantics getCommonBinopSemantic(const llvm::FixedPointSemantics & LHSSema, const llvm::FixedPointSemantics & RHSSema)

Methods

llvm::Value* Convert(
    llvm::Value* Src,
    const llvm::FixedPointSemantics& SrcSema,
    const llvm::FixedPointSemantics& DstSema,
    bool DstIsInteger)

Declared at: llvm/include/llvm/IR/FixedPointBuilder.h:33

Parameters

llvm::Value* Src
const llvm::FixedPointSemantics& SrcSema
const llvm::FixedPointSemantics& DstSema
bool DstIsInteger

llvm::Value* CreateAdd(
    llvm::Value* LHS,
    const llvm::FixedPointSemantics& LHSSema,
    llvm::Value* RHS,
    const llvm::FixedPointSemantics& RHSSema)

Description

Add two fixed-point values and return the result in their common semantic.\p LHS - The left hand side\p LHSSema - The semantic of the left hand side\p RHS - The right hand side\p RHSSema - The semantic of the right hand side

Declared at: llvm/include/llvm/IR/FixedPointBuilder.h:226

Parameters

llvm::Value* LHS
const llvm::FixedPointSemantics& LHSSema
llvm::Value* RHS
const llvm::FixedPointSemantics& RHSSema

llvm::Value* CreateDiv(
    llvm::Value* LHS,
    const llvm::FixedPointSemantics& LHSSema,
    llvm::Value* RHS,
    const llvm::FixedPointSemantics& RHSSema)

Description

Divide two fixed-point values and return the result in their common semantic.\p LHS - The left hand side\p LHSSema - The semantic of the left hand side\p RHS - The right hand side\p RHSSema - The semantic of the right hand side

Declared at: llvm/include/llvm/IR/FixedPointBuilder.h:314

Parameters

llvm::Value* LHS
const llvm::FixedPointSemantics& LHSSema
llvm::Value* RHS
const llvm::FixedPointSemantics& RHSSema

llvm::Value* CreateEQ(
    llvm::Value* LHS,
    const llvm::FixedPointSemantics& LHSSema,
    llvm::Value* RHS,
    const llvm::FixedPointSemantics& RHSSema)

Description

Compare two fixed-point values for equality.\p LHS - The left hand side\p LHSSema - The semantic of the left hand side\p RHS - The right hand side\p RHSSema - The semantic of the right hand side

Declared at: llvm/include/llvm/IR/FixedPointBuilder.h:373

Parameters

llvm::Value* LHS
const llvm::FixedPointSemantics& LHSSema
llvm::Value* RHS
const llvm::FixedPointSemantics& RHSSema

llvm::Value* CreateFixedToFixed(
    llvm::Value* Src,
    const llvm::FixedPointSemantics& SrcSema,
    const llvm::FixedPointSemantics& DstSema)

Description

Convert an integer value representing a fixed-point number from one fixed-point semantic to another fixed-point semantic.\p Src - The source value\p SrcSema - The fixed-point semantic of the source value\p DstSema - The resulting fixed-point semantic

Declared at: llvm/include/llvm/IR/FixedPointBuilder.h:141

Parameters

llvm::Value* Src
const llvm::FixedPointSemantics& SrcSema
const llvm::FixedPointSemantics& DstSema

llvm::Value* CreateFixedToFloating(
    llvm::Value* Src,
    const llvm::FixedPointSemantics& SrcSema,
    llvm::Type* DstTy)

Declared at: llvm/include/llvm/IR/FixedPointBuilder.h:172

Parameters

llvm::Value* Src
const llvm::FixedPointSemantics& SrcSema
llvm::Type* DstTy

llvm::Value* CreateFixedToInteger(
    llvm::Value* Src,
    const llvm::FixedPointSemantics& SrcSema,
    unsigned int DstWidth,
    bool DstIsSigned)

Description

Convert an integer value representing a fixed-point number to an integer with the given bit width and signedness.\p Src - The source value\p SrcSema - The fixed-point semantic of the source value\p DstWidth - The bit width of the result value\p DstIsSigned - The signedness of the result value

Declared at: llvm/include/llvm/IR/FixedPointBuilder.h:152

Parameters

llvm::Value* Src
const llvm::FixedPointSemantics& SrcSema
unsigned int DstWidth
bool DstIsSigned

llvm::Value* CreateFloatingToFixed(
    llvm::Value* Src,
    const llvm::FixedPointSemantics& DstSema)

Declared at: llvm/include/llvm/IR/FixedPointBuilder.h:189

Parameters

llvm::Value* Src
const llvm::FixedPointSemantics& DstSema

llvm::Value* CreateGE(
    llvm::Value* LHS,
    const llvm::FixedPointSemantics& LHSSema,
    llvm::Value* RHS,
    const llvm::FixedPointSemantics& RHSSema)

Description

Compare two fixed-point values as LHS >= RHS.\p LHS - The left hand side\p LHSSema - The semantic of the left hand side\p RHS - The right hand side\p RHSSema - The semantic of the right hand side

Declared at: llvm/include/llvm/IR/FixedPointBuilder.h:451

Parameters

llvm::Value* LHS
const llvm::FixedPointSemantics& LHSSema
llvm::Value* RHS
const llvm::FixedPointSemantics& RHSSema

llvm::Value* CreateGT(
    llvm::Value* LHS,
    const llvm::FixedPointSemantics& LHSSema,
    llvm::Value* RHS,
    const llvm::FixedPointSemantics& RHSSema)

Description

Compare two fixed-point values as LHS > RHS.\p LHS - The left hand side\p LHSSema - The semantic of the left hand side\p RHS - The right hand side\p RHSSema - The semantic of the right hand side

Declared at: llvm/include/llvm/IR/FixedPointBuilder.h:435

Parameters

llvm::Value* LHS
const llvm::FixedPointSemantics& LHSSema
llvm::Value* RHS
const llvm::FixedPointSemantics& RHSSema

llvm::Value* CreateIntegerToFixed(
    llvm::Value* Src,
    unsigned int SrcIsSigned,
    const llvm::FixedPointSemantics& DstSema)

Description

Convert an integer value with the given signedness to an integer value representing the given fixed-point semantic.\p Src - The source value\p SrcIsSigned - The signedness of the source value\p DstSema - The resulting fixed-point semantic

Declared at: llvm/include/llvm/IR/FixedPointBuilder.h:164

Parameters

llvm::Value* Src
unsigned int SrcIsSigned
const llvm::FixedPointSemantics& DstSema

llvm::Value* CreateLE(
    llvm::Value* LHS,
    const llvm::FixedPointSemantics& LHSSema,
    llvm::Value* RHS,
    const llvm::FixedPointSemantics& RHSSema)

Description

Compare two fixed-point values as LHS < = RHS.\p LHS - The left hand side\p LHSSema - The semantic of the left hand side\p RHS - The right hand side\p RHSSema - The semantic of the right hand side

Declared at: llvm/include/llvm/IR/FixedPointBuilder.h:419

Parameters

llvm::Value* LHS
const llvm::FixedPointSemantics& LHSSema
llvm::Value* RHS
const llvm::FixedPointSemantics& RHSSema

llvm::Value* CreateLT(
    llvm::Value* LHS,
    const llvm::FixedPointSemantics& LHSSema,
    llvm::Value* RHS,
    const llvm::FixedPointSemantics& RHSSema)

Description

Compare two fixed-point values as LHS < RHS.\p LHS - The left hand side\p LHSSema - The semantic of the left hand side\p RHS - The right hand side\p RHSSema - The semantic of the right hand side

Declared at: llvm/include/llvm/IR/FixedPointBuilder.h:403

Parameters

llvm::Value* LHS
const llvm::FixedPointSemantics& LHSSema
llvm::Value* RHS
const llvm::FixedPointSemantics& RHSSema

llvm::Value* CreateMul(
    llvm::Value* LHS,
    const llvm::FixedPointSemantics& LHSSema,
    llvm::Value* RHS,
    const llvm::FixedPointSemantics& RHSSema)

Description

Multiply two fixed-point values and return the result in their common semantic.\p LHS - The left hand side\p LHSSema - The semantic of the left hand side\p RHS - The right hand side\p RHSSema - The semantic of the right hand side

Declared at: llvm/include/llvm/IR/FixedPointBuilder.h:286

Parameters

llvm::Value* LHS
const llvm::FixedPointSemantics& LHSSema
llvm::Value* RHS
const llvm::FixedPointSemantics& RHSSema

llvm::Value* CreateNE(
    llvm::Value* LHS,
    const llvm::FixedPointSemantics& LHSSema,
    llvm::Value* RHS,
    const llvm::FixedPointSemantics& RHSSema)

Description

Compare two fixed-point values for inequality.\p LHS - The left hand side\p LHSSema - The semantic of the left hand side\p RHS - The right hand side\p RHSSema - The semantic of the right hand side

Declared at: llvm/include/llvm/IR/FixedPointBuilder.h:388

Parameters

llvm::Value* LHS
const llvm::FixedPointSemantics& LHSSema
llvm::Value* RHS
const llvm::FixedPointSemantics& RHSSema

llvm::Value* CreateShl(
    llvm::Value* LHS,
    const llvm::FixedPointSemantics& LHSSema,
    llvm::Value* RHS)

Description

Left shift a fixed-point value by an unsigned integer value. The integer value can be any bit width.\p LHS - The left hand side\p LHSSema - The semantic of the left hand side\p RHS - The right hand side

Declared at: llvm/include/llvm/IR/FixedPointBuilder.h:341

Parameters

llvm::Value* LHS
const llvm::FixedPointSemantics& LHSSema
llvm::Value* RHS

llvm::Value* CreateShr(
    llvm::Value* LHS,
    const llvm::FixedPointSemantics& LHSSema,
    llvm::Value* RHS)

Description

Right shift a fixed-point value by an unsigned integer value. The integer value can be any bit width.\p LHS - The left hand side\p LHSSema - The semantic of the left hand side\p RHS - The right hand side

Declared at: llvm/include/llvm/IR/FixedPointBuilder.h:362

Parameters

llvm::Value* LHS
const llvm::FixedPointSemantics& LHSSema
llvm::Value* RHS

llvm::Value* CreateSub(
    llvm::Value* LHS,
    const llvm::FixedPointSemantics& LHSSema,
    llvm::Value* RHS,
    const llvm::FixedPointSemantics& RHSSema)

Description

Subtract two fixed-point values and return the result in their common semantic.\p LHS - The left hand side\p LHSSema - The semantic of the left hand side\p RHS - The right hand side\p RHSSema - The semantic of the right hand side

Declared at: llvm/include/llvm/IR/FixedPointBuilder.h:252

Parameters

llvm::Value* LHS
const llvm::FixedPointSemantics& LHSSema
llvm::Value* RHS
const llvm::FixedPointSemantics& RHSSema

FixedPointBuilder<IRBuilderTy>(
    IRBuilderTy& Builder)

Declared at: llvm/include/llvm/IR/FixedPointBuilder.h:134

Parameters

IRBuilderTy& Builder

llvm::Type* getAccommodatingFloatType(
    llvm::Type* Ty,
    const llvm::FixedPointSemantics& Sema)

Description

Given a floating point type and a fixed-point semantic, return a floating point type which can accommodate the fixed-point semantic. This is either\p Ty, or a floating point type with a larger exponent than Ty.

Declared at: llvm/include/llvm/IR/FixedPointBuilder.h:126

Parameters

llvm::Type* Ty
const llvm::FixedPointSemantics& Sema

llvm::FixedPointSemantics getCommonBinopSemantic(
    const llvm::FixedPointSemantics& LHSSema,
    const llvm::FixedPointSemantics& RHSSema)

Description

Get the common semantic for two semantics, with the added imposition that saturated padded types retain the padding bit.

Declared at: llvm/include/llvm/IR/FixedPointBuilder.h:113

Parameters

const llvm::FixedPointSemantics& LHSSema
const llvm::FixedPointSemantics& RHSSema