15#define DEBUG_TYPE "runtime-libcalls-info"
20#define GET_INIT_RUNTIME_LIBCALL_NAMES
21#define GET_SET_TARGET_RUNTIME_LIBCALL_SETS
22#define DEFINE_GET_LOOKUP_LIBCALL_IMPL_NAME
23#include "llvm/IR/RuntimeLibcalls.inc"
24#undef GET_INIT_RUNTIME_LIBCALL_NAMES
25#undef GET_SET_TARGET_RUNTIME_LIBCALL_SETS
26#undef DEFINE_GET_LOOKUP_LIBCALL_IMPL_NAME
30void RuntimeLibcallsInfo::initLibcalls(
const Triple &TT,
34 setTargetRuntimeLibcallSets(TT, ExceptionModel,
FloatABI, EABIVersion,
37 if (TT.isARM() || TT.isThumb()) {
41 if (!TT.isWatchABI()) {
42 if (isAAPCS_ABI(TT, ABIName)) {
64iota_range<RTLIB::LibcallImpl>
65RuntimeLibcallsInfo::libcallImplNameHit(uint16_t NameOffsetEntry,
68 for (uint16_t Entry :
ArrayRef(RuntimeLibcallNameOffsetTable)
69 .drop_front(NameOffsetEntry + 1)) {
70 if (Entry != StrOffset)
75 RTLIB::LibcallImpl ImplStart =
static_cast<RTLIB::LibcallImpl
>(
76 &RuntimeLibcallNameOffsetTable[NameOffsetEntry] -
77 &RuntimeLibcallNameOffsetTable[0]);
79 static_cast<RTLIB::LibcallImpl
>(ImplStart + NumAliases));
82bool RuntimeLibcallsInfo::isAAPCS_ABI(
const Triple &TT, StringRef ABIName) {
87bool RuntimeLibcallsInfo::darwinHasExp10(
const Triple &TT) {
90 return !
TT.isMacOSXVersionLT(10, 9);
92 return !
TT.isOSVersionLT(7, 0);
#define LLVM_ATTRIBUTE_ALWAYS_INLINE
LLVM_ATTRIBUTE_ALWAYS_INLINE - On compilers where we have a directive to do so, mark a method "always...
StringRef - Represent a constant reference to a string, i.e.
Triple - Helper class for working with autoconf configuration names.
LLVM_ABI LLVM_READONLY ARMABI computeTargetABI(const Triple &TT, StringRef ABIName="")
@ ARM_APCS
ARM Procedure Calling Standard (obsolete, but still used on some targets).
@ ARM_AAPCS
ARM Architecture Procedure Calling Standard calling convention (aka EABI).
This is an optimization pass for GlobalISel generic memory operations.
auto enum_seq(EnumT Begin, EnumT End)
Iterate over an enum type from Begin up to - but not including - End.
ArrayRef(const T &OneElt) -> ArrayRef< T >
void setLibcallImplCallingConv(RTLIB::LibcallImpl Call, CallingConv::ID CC)
Set the CallingConv that should be used for the specified libcall implementation.