class TargetLibraryInfoImpl

Declaration

class TargetLibraryInfoImpl { /* full declaration omitted */ };

Description

Implementation of the target library information. This class constructs tables that hold the target library information and make it available. However, it is somewhat expensive to compute and only depends on the triple. So users typically interact with the \c TargetLibraryInfo wrapper below.

Declared at: llvm/include/llvm/Analysis/TargetLibraryInfo.h:48

Method Overview

Methods

TargetLibraryInfoImpl(const llvm::Triple& T)

Declared at: llvm/include/llvm/Analysis/TargetLibraryInfo.h:96

Parameters

const llvm::Triple& T

TargetLibraryInfoImpl(
    const llvm::TargetLibraryInfoImpl& TLI)

Declared at: llvm/include/llvm/Analysis/TargetLibraryInfo.h:99

Parameters

const llvm::TargetLibraryInfoImpl& TLI

TargetLibraryInfoImpl(
    llvm::TargetLibraryInfoImpl&& TLI)

Declared at: llvm/include/llvm/Analysis/TargetLibraryInfo.h:100

Parameters

llvm::TargetLibraryInfoImpl&& TLI

TargetLibraryInfoImpl()

Declared at: llvm/include/llvm/Analysis/TargetLibraryInfo.h:95

void addVectorizableFunctions(
    ArrayRef<llvm::VecDesc> Fns)

Description

Add a set of scalar -> vector mappings, queryable via getVectorizedFunction and getScalarizedFunction.

Declared at: llvm/include/llvm/Analysis/TargetLibraryInfo.h:146

Parameters

ArrayRef<llvm::VecDesc> Fns

void addVectorizableFunctionsFromVecLib(
    enum VectorLibrary VecLib)

Description

Calls addVectorizableFunctions with a known preset of functions for the given vector library.

Declared at: llvm/include/llvm/Analysis/TargetLibraryInfo.h:150

Parameters

enum VectorLibrary VecLib

void disableAllFunctions()

Description

Disables all builtins. This can be used for options like -fno-builtin.

Declared at: llvm/include/llvm/Analysis/TargetLibraryInfo.h:142

bool getLibFunc(const llvm::Function& FDecl,
                llvm::LibFunc& F) const

Description

Searches for a particular function name, also checking that its type is valid for the library function matching that name. If it is one of the known library functions, return true and set F to the corresponding value.

Declared at: llvm/include/llvm/Analysis/TargetLibraryInfo.h:115

Parameters

const llvm::Function& FDecl
llvm::LibFunc& F

bool getLibFunc(llvm::StringRef funcName,
                llvm::LibFunc& F) const

Description

Searches for a particular function name. If it is one of the known library functions, return true and set F to the corresponding value.

Declared at: llvm/include/llvm/Analysis/TargetLibraryInfo.h:108

Parameters

llvm::StringRef funcName
llvm::LibFunc& F

llvm::StringRef getScalarizedFunction(
    llvm::StringRef F,
    unsigned int& VF) const

Description

Return the name of the equivalent of F, scalarized. If no such mapping exists, return the empty string. Set VF to the vectorization factor.

Declared at: llvm/include/llvm/Analysis/TargetLibraryInfo.h:176

Parameters

llvm::StringRef F
unsigned int& VF

llvm::StringRef getVectorizedFunction(
    llvm::StringRef F,
    unsigned int VF) const

Description

Return the name of the equivalent of F, vectorized with factor VF. If no such mapping exists, return the empty string.

Declared at: llvm/include/llvm/Analysis/TargetLibraryInfo.h:164

Parameters

llvm::StringRef F
unsigned int VF

unsigned int getWCharSize(
    const llvm::Module& M) const

Description

Returns the size of the wchar_t type in bytes or 0 if the size is unknown. This queries the 'wchar_size' metadata.

Declared at: llvm/include/llvm/Analysis/TargetLibraryInfo.h:200

Parameters

const llvm::Module& M

unsigned int getWidestVF(
    llvm::StringRef ScalarF) const

Description

Returns the largest vectorization factor used in the list of vector functions.

Declared at: llvm/include/llvm/Analysis/TargetLibraryInfo.h:204

Parameters

llvm::StringRef ScalarF

bool isFunctionScalarizable(
    llvm::StringRef F,
    unsigned int& VF) const

Description

Return true if the function F has a scalar equivalent, and set VF to be the vectorization factor.

Declared at: llvm/include/llvm/Analysis/TargetLibraryInfo.h:168

Parameters

llvm::StringRef F
unsigned int& VF

bool isFunctionVectorizable(llvm::StringRef F,
                            unsigned int VF) const

Description

Return true if the function F has a vector equivalent with vectorization factor VF.

Declared at: llvm/include/llvm/Analysis/TargetLibraryInfo.h:154

Parameters

llvm::StringRef F
unsigned int VF

bool isFunctionVectorizable(
    llvm::StringRef F) const

Description

Return true if the function F has a vector equivalent with any vectorization factor.

Declared at: llvm/include/llvm/Analysis/TargetLibraryInfo.h:160

Parameters

llvm::StringRef F

void setAvailable(llvm::LibFunc F)

Description

Forces a function to be marked as available.

Declared at: llvm/include/llvm/Analysis/TargetLibraryInfo.h:123

Parameters

llvm::LibFunc F

void setAvailableWithName(llvm::LibFunc F,
                          llvm::StringRef Name)

Description

Forces a function to be marked as available and provide an alternate name that must be used.

Declared at: llvm/include/llvm/Analysis/TargetLibraryInfo.h:129

Parameters

llvm::LibFunc F
llvm::StringRef Name

void setShouldExtI32Param(bool Val)

Description

Set to true iff i32 parameters to library functions should have signext or zeroext attributes if they correspond to C-level int or unsigned int, respectively.

Declared at: llvm/include/llvm/Analysis/TargetLibraryInfo.h:181

Parameters

bool Val

void setShouldExtI32Return(bool Val)

Description

Set to true iff i32 results from library functions should have signext or zeroext attributes if they correspond to C-level int or unsigned int, respectively.

Declared at: llvm/include/llvm/Analysis/TargetLibraryInfo.h:188

Parameters

bool Val

void setShouldSignExtI32Param(bool Val)

Description

Set to true iff i32 parameters to library functions should have signext attribute if they correspond to C-level int or unsigned int.

Declared at: llvm/include/llvm/Analysis/TargetLibraryInfo.h:194

Parameters

bool Val

void setUnavailable(llvm::LibFunc F)

Description

Forces a function to be marked as unavailable.

Declared at: llvm/include/llvm/Analysis/TargetLibraryInfo.h:118

Parameters

llvm::LibFunc F