LLVM 22.0.0git
llvm::RTLIB::RuntimeLibcallsInfo Struct Reference

A simple container for information about the supported runtime calls. More...

#include "llvm/IR/RuntimeLibcalls.h"

Public Member Functions

 RuntimeLibcallsInfo ()=default
 RuntimeLibcallsInfo (const Triple &TT, ExceptionHandling ExceptionModel=ExceptionHandling::None, FloatABI::ABIType FloatABI=FloatABI::Default, EABI EABIVersion=EABI::Default, StringRef ABIName="", VectorLibrary VecLib=VectorLibrary::NoLibrary)
 RuntimeLibcallsInfo (const Module &M)
bool invalidate (Module &M, const PreservedAnalyses &PA, ModuleAnalysisManager::Invalidator &)
void setLibcallImplCallingConv (RTLIB::LibcallImpl Call, CallingConv::ID CC)
 Set the CallingConv that should be used for the specified libcall implementation.
CallingConv::ID getLibcallImplCallingConv (RTLIB::LibcallImpl Call) const
 Get the CallingConv that should be used for the specified libcall.
unsigned getNumAvailableLibcallImpls () const
bool isAvailable (RTLIB::LibcallImpl Impl) const
void setAvailable (RTLIB::LibcallImpl Impl)
LLVM_ABI RTLIB::LibcallImpl getSupportedLibcallImpl (StringRef FuncName) const
 Check if this is valid libcall for the current module, otherwise RTLIB::Unsupported.
std::pair< FunctionType *, AttributeList > getFunctionTy (LLVMContext &Ctx, const Triple &TT, const DataLayout &DL, RTLIB::LibcallImpl LibcallImpl) const

Static Public Member Functions

static StringRef getLibcallImplName (RTLIB::LibcallImpl CallImpl)
 Get the libcall routine name for the specified libcall implementation.
static RTLIB::Libcall getLibcallFromImpl (RTLIB::LibcallImpl Impl)
 Return the libcall provided by Impl.
static LLVM_ABI iota_range< RTLIB::LibcallImpl > lookupLibcallImplName (StringRef Name)
 Check if a function name is a recognized runtime call of any kind.
static bool hasVectorMaskArgument (RTLIB::LibcallImpl Impl)
 Returns true if the function has a vector mask argument, which is assumed to be the last argument.

Friends

class llvm::LibcallLoweringInfo

Detailed Description

A simple container for information about the supported runtime calls.

Definition at line 73 of file RuntimeLibcalls.h.

Constructor & Destructor Documentation

◆ RuntimeLibcallsInfo() [1/3]

llvm::RTLIB::RuntimeLibcallsInfo::RuntimeLibcallsInfo ( )
default

◆ RuntimeLibcallsInfo() [2/3]

RuntimeLibcallsInfo::RuntimeLibcallsInfo ( const Triple & TT,
ExceptionHandling ExceptionModel = ExceptionHandling::None,
FloatABI::ABIType FloatABI = FloatABI::Default,
EABI EABIVersion = EABI::Default,
StringRef ABIName = "",
VectorLibrary VecLib = VectorLibrary::NoLibrary )
explicit

◆ RuntimeLibcallsInfo() [3/3]

RuntimeLibcallsInfo::RuntimeLibcallsInfo ( const Module & M)
explicit

Definition at line 77 of file RuntimeLibcalls.cpp.

References RuntimeLibcallsInfo().

Member Function Documentation

◆ getFunctionTy()

◆ getLibcallFromImpl()

RTLIB::Libcall llvm::RTLIB::RuntimeLibcallsInfo::getLibcallFromImpl ( RTLIB::LibcallImpl Impl)
inlinestatic

Return the libcall provided by Impl.

Definition at line 116 of file RuntimeLibcalls.h.

Referenced by llvm::TargetLoweringBase::getSoftFloatCmpLibcallPredicate(), and llvm::LibcallLoweringInfo::LibcallLoweringInfo().

◆ getLibcallImplCallingConv()

CallingConv::ID llvm::RTLIB::RuntimeLibcallsInfo::getLibcallImplCallingConv ( RTLIB::LibcallImpl Call) const
inline

Get the CallingConv that should be used for the specified libcall.

Definition at line 111 of file RuntimeLibcalls.h.

References Call.

Referenced by llvm::DeclareRuntimeLibcallsPass::run().

◆ getLibcallImplName()

StringRef llvm::RTLIB::RuntimeLibcallsInfo::getLibcallImplName ( RTLIB::LibcallImpl CallImpl)
inlinestatic

◆ getNumAvailableLibcallImpls()

unsigned llvm::RTLIB::RuntimeLibcallsInfo::getNumAvailableLibcallImpls ( ) const
inline

Definition at line 120 of file RuntimeLibcalls.h.

Referenced by llvm::lto::LTO::getRuntimeLibcallSymbols().

◆ getSupportedLibcallImpl()

LLVM_ABI RTLIB::LibcallImpl llvm::RTLIB::RuntimeLibcallsInfo::getSupportedLibcallImpl ( StringRef FuncName) const
inline

Check if this is valid libcall for the current module, otherwise RTLIB::Unsupported.

Definition at line 150 of file RuntimeLibcalls.h.

References isAvailable(), and lookupLibcallImplName().

◆ hasVectorMaskArgument()

bool RuntimeLibcallsInfo::hasVectorMaskArgument ( RTLIB::LibcallImpl Impl)
static

Returns true if the function has a vector mask argument, which is assumed to be the last argument.

FIXME: This should be generated by tablegen and support the argument at an arbitrary position

Definition at line 321 of file RuntimeLibcalls.cpp.

Referenced by llvm::TargetLowering::expandMultipleResultFPLibCall(), and getFunctionTy().

◆ invalidate()

bool RTLIB::RuntimeLibcallsInfo::invalidate ( Module & M,
const PreservedAnalyses & PA,
ModuleAnalysisManager::Invalidator &  )

Definition at line 40 of file RuntimeLibcallInfo.cpp.

References llvm::PreservedAnalyses::getChecker().

◆ isAvailable()

bool llvm::RTLIB::RuntimeLibcallsInfo::isAvailable ( RTLIB::LibcallImpl Impl) const
inline

◆ lookupLibcallImplName()

LLVM_ABI iota_range< RTLIB::LibcallImpl > llvm::RTLIB::RuntimeLibcallsInfo::lookupLibcallImplName ( StringRef Name)
inlinestatic

Check if a function name is a recognized runtime call of any kind.

This does not consider if this call is available for any current compilation, just that it is a known call somewhere. This returns the set of all LibcallImpls which match the name; multiple implementations with the same name may exist but differ in interpretation based on the target context.

Generated by tablegen.

Definition at line 140 of file RuntimeLibcalls.h.

Referenced by getSupportedLibcallImpl(), and isMips16HardFloatLibcall().

◆ setAvailable()

void llvm::RTLIB::RuntimeLibcallsInfo::setAvailable ( RTLIB::LibcallImpl Impl)
inline

Definition at line 128 of file RuntimeLibcalls.h.

Referenced by RuntimeLibcallsInfo().

◆ setLibcallImplCallingConv()

void llvm::RTLIB::RuntimeLibcallsInfo::setLibcallImplCallingConv ( RTLIB::LibcallImpl Call,
CallingConv::ID CC )
inline

Set the CallingConv that should be used for the specified libcall implementation.

Definition at line 106 of file RuntimeLibcalls.h.

References Call.

Referenced by RuntimeLibcallsInfo().

◆ llvm::LibcallLoweringInfo

friend class llvm::LibcallLoweringInfo
friend

Definition at line 79 of file RuntimeLibcalls.h.


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