LLVM 24.0.0git
RuntimeLibcalls.cpp File Reference
#include "llvm/IR/RuntimeLibcalls.h"
#include "llvm/ADT/FloatingPointMode.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/SystemLibraries.h"
#include "llvm/IR/Type.h"
#include "llvm/TargetParser/ARMTargetParser.h"
#include "llvm/IR/RuntimeLibcalls.inc"

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "runtime-libcalls-info"
#define GET_RUNTIME_LIBCALLS_INFO
#define GET_INIT_RUNTIME_LIBCALL_NAMES
#define GET_INIT_RUNTIME_LIBCALL_SIGNATURES
#define GET_RUNTIME_LIBCALL_MASKED_VECTOR_LIBCALL_MAPPING
#define GET_SET_TARGET_RUNTIME_LIBCALL_SETS
#define DEFINE_GET_LOOKUP_LIBCALL_IMPL_NAME
#define GET_RUNTIME_LIBCALL_INTRINSIC_TO_LIBCALL

Functions

static RuntimeLibrary getVectorRuntimeLibrary (VectorLibrary VecLib)
static bool shouldExtI32 (const Triple &T)
static bool shouldSignExtI32Param (const Triple &T)
static bool shouldSignExtI32Return (const Triple &T)
static bool shouldZExtBool (const Triple &T)
static IntegerType * getSizeTType (LLVMContext &Ctx, const DataLayout &DL)
 TODO: There is really no guarantee that sizeof(size_t) is equal to the index size of the default address space.
static unsigned getLongSize (const Triple &TT, const DataLayout &DL)
static Type * getLongDoubleType (LLVMContext &Ctx, LongDoubleFormat Format)
static Type * convertToIRType (FuncArgTypeID ID, LLVMContext &Ctx, const Triple &TT, const DataLayout &DL, unsigned IntBits, LongDoubleFormat LdblFormat)
static std::optional< bool > isSignedIntArgType (FuncArgTypeID ID)
static Attribute::AttrKind getIntExtAttr (FuncArgTypeID ID, Type *Ty, const Triple &TT, unsigned IntBits, bool IsReturn)

Variables

static constexpr Attribute::AttrKind CommonFnAttrs []

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "runtime-libcalls-info"

Definition at line 17 of file RuntimeLibcalls.cpp.

◆ DEFINE_GET_LOOKUP_LIBCALL_IMPL_NAME

#define DEFINE_GET_LOOKUP_LIBCALL_IMPL_NAME

Definition at line 27 of file RuntimeLibcalls.cpp.

◆ GET_INIT_RUNTIME_LIBCALL_NAMES

#define GET_INIT_RUNTIME_LIBCALL_NAMES

Definition at line 23 of file RuntimeLibcalls.cpp.

◆ GET_INIT_RUNTIME_LIBCALL_SIGNATURES

#define GET_INIT_RUNTIME_LIBCALL_SIGNATURES

Definition at line 24 of file RuntimeLibcalls.cpp.

◆ GET_RUNTIME_LIBCALL_INTRINSIC_TO_LIBCALL

#define GET_RUNTIME_LIBCALL_INTRINSIC_TO_LIBCALL

Definition at line 28 of file RuntimeLibcalls.cpp.

◆ GET_RUNTIME_LIBCALL_MASKED_VECTOR_LIBCALL_MAPPING

#define GET_RUNTIME_LIBCALL_MASKED_VECTOR_LIBCALL_MAPPING

Definition at line 25 of file RuntimeLibcalls.cpp.

◆ GET_RUNTIME_LIBCALLS_INFO

#define GET_RUNTIME_LIBCALLS_INFO

Definition at line 22 of file RuntimeLibcalls.cpp.

◆ GET_SET_TARGET_RUNTIME_LIBCALL_SETS

#define GET_SET_TARGET_RUNTIME_LIBCALL_SETS

Definition at line 26 of file RuntimeLibcalls.cpp.

Function Documentation

◆ convertToIRType()

◆ getIntExtAttr()

◆ getLongDoubleType()

◆ getLongSize()

unsigned getLongSize ( const Triple & TT,
const DataLayout & DL )
static

Definition at line 204 of file RuntimeLibcalls.cpp.

References DL.

Referenced by convertToIRType().

◆ getSizeTType()

IntegerType * getSizeTType ( LLVMContext & Ctx,
const DataLayout & DL )
static

TODO: There is really no guarantee that sizeof(size_t) is equal to the index size of the default address space.

This matches TargetLibraryInfo and should be kept in sync.

Definition at line 200 of file RuntimeLibcalls.cpp.

References DL.

Referenced by convertToIRType(), and llvm::RTLIB::RuntimeLibcallsInfo::getFunctionTy().

◆ getVectorRuntimeLibrary()

◆ isSignedIntArgType()

std::optional< bool > isSignedIntArgType ( FuncArgTypeID ID)
static

Definition at line 325 of file RuntimeLibcalls.cpp.

References Int.

Referenced by getIntExtAttr().

◆ shouldExtI32()

bool shouldExtI32 ( const Triple & T)
static

◆ shouldSignExtI32Param()

bool shouldSignExtI32Param ( const Triple & T)
static

Definition at line 168 of file RuntimeLibcalls.cpp.

References T.

Referenced by getIntExtAttr(), and llvm::RTLIB::RuntimeLibcallsInfo::initExtensionsForTriple().

◆ shouldSignExtI32Return()

bool shouldSignExtI32Return ( const Triple & T)
static

Definition at line 174 of file RuntimeLibcalls.cpp.

References T.

Referenced by getIntExtAttr(), and llvm::RTLIB::RuntimeLibcallsInfo::initExtensionsForTriple().

◆ shouldZExtBool()

bool shouldZExtBool ( const Triple & T)
static

Variable Documentation

◆ CommonFnAttrs

Attribute::AttrKind CommonFnAttrs[]
staticconstexpr
Initial value:
= {
Attribute::NoCallback, Attribute::NoFree, Attribute::NoSync,
Attribute::NoUnwind, Attribute::WillReturn}

Definition at line 211 of file RuntimeLibcalls.cpp.

Referenced by llvm::RTLIB::RuntimeLibcallsInfo::getDefaultFunctionTy(), and llvm::RTLIB::RuntimeLibcallsInfo::getFunctionTy().