LLVM 20.0.0git
Public Member Functions | List of all members
llvm::FixedPointBuilder< IRBuilderTy > Class Template Reference

#include "llvm/IR/FixedPointBuilder.h"

Public Member Functions

 FixedPointBuilder (IRBuilderTy &Builder)
 
ValueCreateFixedToFixed (Value *Src, const FixedPointSemantics &SrcSema, const FixedPointSemantics &DstSema)
 Convert an integer value representing a fixed-point number from one fixed-point semantic to another fixed-point semantic.
 
ValueCreateFixedToInteger (Value *Src, const FixedPointSemantics &SrcSema, unsigned DstWidth, bool DstIsSigned)
 Convert an integer value representing a fixed-point number to an integer with the given bit width and signedness.
 
ValueCreateIntegerToFixed (Value *Src, unsigned SrcIsSigned, const FixedPointSemantics &DstSema)
 Convert an integer value with the given signedness to an integer value representing the given fixed-point semantic.
 
ValueCreateFixedToFloating (Value *Src, const FixedPointSemantics &SrcSema, Type *DstTy)
 
ValueCreateFloatingToFixed (Value *Src, const FixedPointSemantics &DstSema)
 
ValueCreateAdd (Value *LHS, const FixedPointSemantics &LHSSema, Value *RHS, const FixedPointSemantics &RHSSema)
 Add two fixed-point values and return the result in their common semantic.
 
ValueCreateSub (Value *LHS, const FixedPointSemantics &LHSSema, Value *RHS, const FixedPointSemantics &RHSSema)
 Subtract two fixed-point values and return the result in their common semantic.
 
ValueCreateMul (Value *LHS, const FixedPointSemantics &LHSSema, Value *RHS, const FixedPointSemantics &RHSSema)
 Multiply two fixed-point values and return the result in their common semantic.
 
ValueCreateDiv (Value *LHS, const FixedPointSemantics &LHSSema, Value *RHS, const FixedPointSemantics &RHSSema)
 Divide two fixed-point values and return the result in their common semantic.
 
ValueCreateShl (Value *LHS, const FixedPointSemantics &LHSSema, Value *RHS)
 Left shift a fixed-point value by an unsigned integer value.
 
ValueCreateShr (Value *LHS, const FixedPointSemantics &LHSSema, Value *RHS)
 Right shift a fixed-point value by an unsigned integer value.
 
ValueCreateEQ (Value *LHS, const FixedPointSemantics &LHSSema, Value *RHS, const FixedPointSemantics &RHSSema)
 Compare two fixed-point values for equality.
 
ValueCreateNE (Value *LHS, const FixedPointSemantics &LHSSema, Value *RHS, const FixedPointSemantics &RHSSema)
 Compare two fixed-point values for inequality.
 
ValueCreateLT (Value *LHS, const FixedPointSemantics &LHSSema, Value *RHS, const FixedPointSemantics &RHSSema)
 Compare two fixed-point values as LHS < RHS.
 
ValueCreateLE (Value *LHS, const FixedPointSemantics &LHSSema, Value *RHS, const FixedPointSemantics &RHSSema)
 Compare two fixed-point values as LHS <= RHS.
 
ValueCreateGT (Value *LHS, const FixedPointSemantics &LHSSema, Value *RHS, const FixedPointSemantics &RHSSema)
 Compare two fixed-point values as LHS > RHS.
 
ValueCreateGE (Value *LHS, const FixedPointSemantics &LHSSema, Value *RHS, const FixedPointSemantics &RHSSema)
 Compare two fixed-point values as LHS >= RHS.
 

Detailed Description

template<class IRBuilderTy>
class llvm::FixedPointBuilder< IRBuilderTy >

Definition at line 32 of file FixedPointBuilder.h.

Constructor & Destructor Documentation

◆ FixedPointBuilder()

template<class IRBuilderTy >
llvm::FixedPointBuilder< IRBuilderTy >::FixedPointBuilder ( IRBuilderTy &  Builder)
inline

Definition at line 136 of file FixedPointBuilder.h.

Member Function Documentation

◆ CreateAdd()

template<class IRBuilderTy >
Value * llvm::FixedPointBuilder< IRBuilderTy >::CreateAdd ( Value LHS,
const FixedPointSemantics LHSSema,
Value RHS,
const FixedPointSemantics RHSSema 
)
inline

Add two fixed-point values and return the result in their common semantic.

LHS - The left hand side LHSSema - The semantic of the left hand side RHS - The right hand side RHSSema - The semantic of the right hand side

Definition at line 228 of file FixedPointBuilder.h.

References llvm::FixedPointBuilder< IRBuilderTy >::CreateFixedToFixed(), llvm::FixedPointSemantics::getCommonSemantics(), LHS, and RHS.

◆ CreateDiv()

template<class IRBuilderTy >
Value * llvm::FixedPointBuilder< IRBuilderTy >::CreateDiv ( Value LHS,
const FixedPointSemantics LHSSema,
Value RHS,
const FixedPointSemantics RHSSema 
)
inline

Divide two fixed-point values and return the result in their common semantic.

LHS - The left hand side LHSSema - The semantic of the left hand side RHS - The right hand side RHSSema - The semantic of the right hand side

Definition at line 316 of file FixedPointBuilder.h.

References llvm::FixedPointBuilder< IRBuilderTy >::CreateFixedToFixed(), llvm::FixedPointSemantics::getCommonSemantics(), llvm::Value::getType(), LHS, and RHS.

◆ CreateEQ()

template<class IRBuilderTy >
Value * llvm::FixedPointBuilder< IRBuilderTy >::CreateEQ ( Value LHS,
const FixedPointSemantics LHSSema,
Value RHS,
const FixedPointSemantics RHSSema 
)
inline

Compare two fixed-point values for equality.

LHS - The left hand side LHSSema - The semantic of the left hand side RHS - The right hand side RHSSema - The semantic of the right hand side

Definition at line 375 of file FixedPointBuilder.h.

References llvm::FixedPointBuilder< IRBuilderTy >::CreateFixedToFixed(), LHS, and RHS.

◆ CreateFixedToFixed()

template<class IRBuilderTy >
Value * llvm::FixedPointBuilder< IRBuilderTy >::CreateFixedToFixed ( Value Src,
const FixedPointSemantics SrcSema,
const FixedPointSemantics DstSema 
)
inline

◆ CreateFixedToFloating()

template<class IRBuilderTy >
Value * llvm::FixedPointBuilder< IRBuilderTy >::CreateFixedToFloating ( Value Src,
const FixedPointSemantics SrcSema,
Type DstTy 
)
inline

◆ CreateFixedToInteger()

template<class IRBuilderTy >
Value * llvm::FixedPointBuilder< IRBuilderTy >::CreateFixedToInteger ( Value Src,
const FixedPointSemantics SrcSema,
unsigned  DstWidth,
bool  DstIsSigned 
)
inline

Convert an integer value representing a fixed-point number to an integer with the given bit width and signedness.

Src - The source value SrcSema - The fixed-point semantic of the source value DstWidth - The bit width of the result value DstIsSigned - The signedness of the result value

Definition at line 154 of file FixedPointBuilder.h.

References llvm::FixedPointSemantics::GetIntegerSemantics().

◆ CreateFloatingToFixed()

template<class IRBuilderTy >
Value * llvm::FixedPointBuilder< IRBuilderTy >::CreateFloatingToFixed ( Value Src,
const FixedPointSemantics DstSema 
)
inline

◆ CreateGE()

template<class IRBuilderTy >
Value * llvm::FixedPointBuilder< IRBuilderTy >::CreateGE ( Value LHS,
const FixedPointSemantics LHSSema,
Value RHS,
const FixedPointSemantics RHSSema 
)
inline

Compare two fixed-point values as LHS >= RHS.

LHS - The left hand side LHSSema - The semantic of the left hand side RHS - The right hand side RHSSema - The semantic of the right hand side

Definition at line 453 of file FixedPointBuilder.h.

References llvm::FixedPointBuilder< IRBuilderTy >::CreateFixedToFixed(), LHS, and RHS.

◆ CreateGT()

template<class IRBuilderTy >
Value * llvm::FixedPointBuilder< IRBuilderTy >::CreateGT ( Value LHS,
const FixedPointSemantics LHSSema,
Value RHS,
const FixedPointSemantics RHSSema 
)
inline

Compare two fixed-point values as LHS > RHS.

LHS - The left hand side LHSSema - The semantic of the left hand side RHS - The right hand side RHSSema - The semantic of the right hand side

Definition at line 437 of file FixedPointBuilder.h.

References llvm::FixedPointBuilder< IRBuilderTy >::CreateFixedToFixed(), LHS, and RHS.

◆ CreateIntegerToFixed()

template<class IRBuilderTy >
Value * llvm::FixedPointBuilder< IRBuilderTy >::CreateIntegerToFixed ( Value Src,
unsigned  SrcIsSigned,
const FixedPointSemantics DstSema 
)
inline

Convert an integer value with the given signedness to an integer value representing the given fixed-point semantic.

Src - The source value SrcIsSigned - The signedness of the source value DstSema - The resulting fixed-point semantic

Definition at line 166 of file FixedPointBuilder.h.

References llvm::FixedPointSemantics::GetIntegerSemantics().

◆ CreateLE()

template<class IRBuilderTy >
Value * llvm::FixedPointBuilder< IRBuilderTy >::CreateLE ( Value LHS,
const FixedPointSemantics LHSSema,
Value RHS,
const FixedPointSemantics RHSSema 
)
inline

Compare two fixed-point values as LHS <= RHS.

LHS - The left hand side LHSSema - The semantic of the left hand side RHS - The right hand side RHSSema - The semantic of the right hand side

Definition at line 421 of file FixedPointBuilder.h.

References llvm::FixedPointBuilder< IRBuilderTy >::CreateFixedToFixed(), LHS, and RHS.

◆ CreateLT()

template<class IRBuilderTy >
Value * llvm::FixedPointBuilder< IRBuilderTy >::CreateLT ( Value LHS,
const FixedPointSemantics LHSSema,
Value RHS,
const FixedPointSemantics RHSSema 
)
inline

Compare two fixed-point values as LHS < RHS.

LHS - The left hand side LHSSema - The semantic of the left hand side RHS - The right hand side RHSSema - The semantic of the right hand side

Definition at line 405 of file FixedPointBuilder.h.

References llvm::FixedPointBuilder< IRBuilderTy >::CreateFixedToFixed(), LHS, and RHS.

◆ CreateMul()

template<class IRBuilderTy >
Value * llvm::FixedPointBuilder< IRBuilderTy >::CreateMul ( Value LHS,
const FixedPointSemantics LHSSema,
Value RHS,
const FixedPointSemantics RHSSema 
)
inline

Multiply two fixed-point values and return the result in their common semantic.

LHS - The left hand side LHSSema - The semantic of the left hand side RHS - The right hand side RHSSema - The semantic of the right hand side

Definition at line 288 of file FixedPointBuilder.h.

References llvm::FixedPointBuilder< IRBuilderTy >::CreateFixedToFixed(), llvm::FixedPointSemantics::getCommonSemantics(), llvm::Value::getType(), LHS, and RHS.

◆ CreateNE()

template<class IRBuilderTy >
Value * llvm::FixedPointBuilder< IRBuilderTy >::CreateNE ( Value LHS,
const FixedPointSemantics LHSSema,
Value RHS,
const FixedPointSemantics RHSSema 
)
inline

Compare two fixed-point values for inequality.

LHS - The left hand side LHSSema - The semantic of the left hand side RHS - The right hand side RHSSema - The semantic of the right hand side

Definition at line 390 of file FixedPointBuilder.h.

References llvm::FixedPointBuilder< IRBuilderTy >::CreateFixedToFixed(), LHS, and RHS.

◆ CreateShl()

template<class IRBuilderTy >
Value * llvm::FixedPointBuilder< IRBuilderTy >::CreateShl ( Value LHS,
const FixedPointSemantics LHSSema,
Value RHS 
)
inline

Left shift a fixed-point value by an unsigned integer value.

The integer value can be any bit width. LHS - The left hand side LHSSema - The semantic of the left hand side RHS - The right hand side

Definition at line 343 of file FixedPointBuilder.h.

References llvm::FixedPointSemantics::hasUnsignedPadding(), llvm::FixedPointSemantics::isSaturated(), llvm::FixedPointSemantics::isSigned(), LHS, and RHS.

◆ CreateShr()

template<class IRBuilderTy >
Value * llvm::FixedPointBuilder< IRBuilderTy >::CreateShr ( Value LHS,
const FixedPointSemantics LHSSema,
Value RHS 
)
inline

Right shift a fixed-point value by an unsigned integer value.

The integer value can be any bit width. LHS - The left hand side LHSSema - The semantic of the left hand side RHS - The right hand side

Definition at line 364 of file FixedPointBuilder.h.

References llvm::FixedPointSemantics::isSigned(), LHS, and RHS.

◆ CreateSub()

template<class IRBuilderTy >
Value * llvm::FixedPointBuilder< IRBuilderTy >::CreateSub ( Value LHS,
const FixedPointSemantics LHSSema,
Value RHS,
const FixedPointSemantics RHSSema 
)
inline

Subtract two fixed-point values and return the result in their common semantic.

LHS - The left hand side LHSSema - The semantic of the left hand side RHS - The right hand side RHSSema - The semantic of the right hand side

Definition at line 254 of file FixedPointBuilder.h.

References llvm::FixedPointBuilder< IRBuilderTy >::CreateFixedToFixed(), llvm::FixedPointSemantics::getCommonSemantics(), llvm::Constant::getNullValue(), LHS, and RHS.


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