16void RuntimeLibcallsInfo::initLibcalls(
const Triple &TT) {
17 std::fill(std::begin(LibcallRoutineNames), std::end(LibcallRoutineNames),
20#define HANDLE_LIBCALL(code, name) setLibcallName(RTLIB::code, name);
21#include "llvm/IR/RuntimeLibcalls.def"
25 for (
int LC = 0; LC < RTLIB::UNKNOWN_LIBCALL; ++LC)
108 if (
TT.isOSDarwin()) {
116 switch (
TT.getArch()) {
119 if (
TT.isMacOSX() && !
TT.isMacOSXVersionLT(10, 6))
130 if (darwinHasSinCos(TT)) {
133 if (
TT.isWatchABI()) {
141 switch (
TT.getOS()) {
143 if (
TT.isMacOSXVersionLT(10, 9)) {
152 if (
TT.isOSVersionLT(7, 0)) {
172 if (
TT.isGNUEnvironment() ||
TT.isOSFuchsia() ||
173 (
TT.isAndroid() && !
TT.isAndroidVersionLT(9))) {
186 if (
TT.isOSOpenBSD()) {
190 if (
TT.isOSWindows() && !
TT.isOSCygMing()) {
202 if (
TT.isAArch64()) {
203 if (
TT.isOSMSVCRT()) {
212 for (
int I = 0;
I < RTLIB::UNKNOWN_LIBCALL; ++
I) {
213 if (I < RTLIB::ATOMIC_LOAD || I > RTLIB::ATOMIC_FETCH_NAND_16)
220 for (
int I = 0;
I < RTLIB::UNKNOWN_LIBCALL; ++
I)
221 if (I < RTLIB::ATOMIC_LOAD || I > RTLIB::ATOMIC_FETCH_NAND_16)
225 if (
TT.isARM() ||
TT.isThumb()) {
234 if (
TT.isOSMSVCRT()) {
266 if (
TT.isLoongArch()) {
267 if (!
TT.isLoongArch64()) {
299 if (
TT.isRISCV32()) {
309 if (!
TT.isSPARC64()) {
320 if (
TT.isSystemZ()) {
340 if (
TT.isOSMSVCRT()) {
348void RuntimeLibcallsInfo::initCmpLibcallCCs() {
349 std::fill(CmpLibcallCCs, CmpLibcallCCs + RTLIB::UNKNOWN_LIBCALL,
354 CmpLibcallCCs[RTLIB::OEQ_PPCF128] =
ISD::SETEQ;
358 CmpLibcallCCs[RTLIB::UNE_PPCF128] =
ISD::SETNE;
362 CmpLibcallCCs[RTLIB::OGE_PPCF128] =
ISD::SETGE;
366 CmpLibcallCCs[RTLIB::OLT_PPCF128] =
ISD::SETLT;
370 CmpLibcallCCs[RTLIB::OLE_PPCF128] =
ISD::SETLE;
374 CmpLibcallCCs[RTLIB::OGT_PPCF128] =
ISD::SETGT;
378 CmpLibcallCCs[RTLIB::UO_PPCF128] =
ISD::SETNE;
Triple - Helper class for working with autoconf configuration names.
@ ARM_AAPCS_VFP
Same as ARM_AAPCS, but uses hard floating point ABI.
@ C
The default llvm calling convention, compatible with C.
Libcall
RTLIB::Libcall enum - This enum defines all of the runtime library calls the backend can emit.
This is an optimization pass for GlobalISel generic memory operations.
void setLibcallName(RTLIB::Libcall Call, const char *Name)
Rename the default libcall routine name for the specified libcall.
void setLibcallCallingConv(RTLIB::Libcall Call, CallingConv::ID CC)
Set the CallingConv that should be used for the specified libcall.