LLVM 22.0.0git
RuntimeLibcallUtil.h
Go to the documentation of this file.
1//===-- CodeGen/RuntimeLibcallUtil.h - Runtime Library Calls ----*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file defines some helper functions for runtime library calls.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_CODEGEN_RUNTIMELIBCALLS_H
14#define LLVM_CODEGEN_RUNTIMELIBCALLS_H
15
21
22namespace llvm {
23namespace RTLIB {
24
25/// GetFPLibCall - Helper to return the right libcall for the given floating
26/// point type, or UNKNOWN_LIBCALL if there is none.
27LLVM_ABI Libcall getFPLibCall(EVT VT, Libcall Call_F32, Libcall Call_F64,
28 Libcall Call_F80, Libcall Call_F128,
29 Libcall Call_PPCF128);
30
31/// getFPEXT - Return the FPEXT_*_* value for the given types, or
32/// UNKNOWN_LIBCALL if there is none.
33LLVM_ABI Libcall getFPEXT(EVT OpVT, EVT RetVT);
34
35/// getFPROUND - Return the FPROUND_*_* value for the given types, or
36/// UNKNOWN_LIBCALL if there is none.
37LLVM_ABI Libcall getFPROUND(EVT OpVT, EVT RetVT);
38
39/// getFPTOSINT - Return the FPTOSINT_*_* value for the given types, or
40/// UNKNOWN_LIBCALL if there is none.
41LLVM_ABI Libcall getFPTOSINT(EVT OpVT, EVT RetVT);
42
43/// getFPTOUINT - Return the FPTOUINT_*_* value for the given types, or
44/// UNKNOWN_LIBCALL if there is none.
45LLVM_ABI Libcall getFPTOUINT(EVT OpVT, EVT RetVT);
46
47/// getSINTTOFP - Return the SINTTOFP_*_* value for the given types, or
48/// UNKNOWN_LIBCALL if there is none.
49LLVM_ABI Libcall getSINTTOFP(EVT OpVT, EVT RetVT);
50
51/// getUINTTOFP - Return the UINTTOFP_*_* value for the given types, or
52/// UNKNOWN_LIBCALL if there is none.
53LLVM_ABI Libcall getUINTTOFP(EVT OpVT, EVT RetVT);
54
55/// getPOWI - Return the POWI_* value for the given types, or
56/// UNKNOWN_LIBCALL if there is none.
57LLVM_ABI Libcall getPOWI(EVT RetVT);
58
59/// getPOW - Return the POW_* value for the given types, or
60/// UNKNOWN_LIBCALL if there is none.
61LLVM_ABI Libcall getPOW(EVT RetVT);
62
63/// getLDEXP - Return the LDEXP_* value for the given types, or
64/// UNKNOWN_LIBCALL if there is none.
65LLVM_ABI Libcall getLDEXP(EVT RetVT);
66
67/// getFREXP - Return the FREXP_* value for the given types, or
68/// UNKNOWN_LIBCALL if there is none.
69LLVM_ABI Libcall getFREXP(EVT RetVT);
70
71/// Return the SIN_* value for the given types, or UNKNOWN_LIBCALL if there is
72/// none.
73LLVM_ABI Libcall getSIN(EVT RetVT);
74
75/// Return the COS_* value for the given types, or UNKNOWN_LIBCALL if there is
76/// none.
77LLVM_ABI Libcall getCOS(EVT RetVT);
78
79/// getSINCOS - Return the SINCOS_* value for the given types, or
80/// UNKNOWN_LIBCALL if there is none.
81LLVM_ABI Libcall getSINCOS(EVT RetVT);
82
83/// getSINCOSPI - Return the SINCOSPI_* value for the given types, or
84/// UNKNOWN_LIBCALL if there is none.
85LLVM_ABI Libcall getSINCOSPI(EVT RetVT);
86
87/// getMODF - Return the MODF_* value for the given types, or
88/// UNKNOWN_LIBCALL if there is none.
89LLVM_ABI Libcall getMODF(EVT RetVT);
90
91/// Return the SYNC_FETCH_AND_* value for the given opcode and type, or
92/// UNKNOWN_LIBCALL if there is none.
93LLVM_ABI Libcall getSYNC(unsigned Opc, MVT VT);
94
95/// Return the outline atomics value for the given atomic ordering, access
96/// size and set of libcalls for a given atomic, or UNKNOWN_LIBCALL if there
97/// is none.
98LLVM_ABI Libcall getOutlineAtomicHelper(const Libcall (&LC)[5][4],
99 AtomicOrdering Order, uint64_t MemSize);
100
101/// Return the outline atomics value for the given opcode, atomic ordering
102/// and type, or UNKNOWN_LIBCALL if there is none.
103LLVM_ABI Libcall getOUTLINE_ATOMIC(unsigned Opc, AtomicOrdering Order, MVT VT);
104
105/// getMEMCPY_ELEMENT_UNORDERED_ATOMIC - Return
106/// MEMCPY_ELEMENT_UNORDERED_ATOMIC_* value for the given element size or
107/// UNKNOW_LIBCALL if there is none.
109
110/// getMEMMOVE_ELEMENT_UNORDERED_ATOMIC - Return
111/// MEMMOVE_ELEMENT_UNORDERED_ATOMIC_* value for the given element size or
112/// UNKNOW_LIBCALL if there is none.
114
115/// getMEMSET_ELEMENT_UNORDERED_ATOMIC - Return
116/// MEMSET_ELEMENT_UNORDERED_ATOMIC_* value for the given element size or
117/// UNKNOW_LIBCALL if there is none.
119
120} // namespace RTLIB
121} // namespace llvm
122
123#endif
Atomic ordering constants.
#define LLVM_ABI
Definition Compiler.h:213
Machine Value Type.
LLVM_ABI Libcall getPOWI(EVT RetVT)
getPOWI - Return the POWI_* value for the given types, or UNKNOWN_LIBCALL if there is none.
LLVM_ABI Libcall getSINTTOFP(EVT OpVT, EVT RetVT)
getSINTTOFP - Return the SINTTOFP_*_* value for the given types, or UNKNOWN_LIBCALL if there is none.
LLVM_ABI Libcall getSYNC(unsigned Opc, MVT VT)
Return the SYNC_FETCH_AND_* value for the given opcode and type, or UNKNOWN_LIBCALL if there is none.
LLVM_ABI Libcall getLDEXP(EVT RetVT)
getLDEXP - Return the LDEXP_* value for the given types, or UNKNOWN_LIBCALL if there is none.
LLVM_ABI Libcall getUINTTOFP(EVT OpVT, EVT RetVT)
getUINTTOFP - Return the UINTTOFP_*_* value for the given types, or UNKNOWN_LIBCALL if there is none.
LLVM_ABI Libcall getFREXP(EVT RetVT)
getFREXP - Return the FREXP_* value for the given types, or UNKNOWN_LIBCALL if there is none.
LLVM_ABI Libcall getSINCOSPI(EVT RetVT)
getSINCOSPI - Return the SINCOSPI_* value for the given types, or UNKNOWN_LIBCALL if there is none.
LLVM_ABI Libcall getMEMCPY_ELEMENT_UNORDERED_ATOMIC(uint64_t ElementSize)
getMEMCPY_ELEMENT_UNORDERED_ATOMIC - Return MEMCPY_ELEMENT_UNORDERED_ATOMIC_* value for the given ele...
LLVM_ABI Libcall getMODF(EVT RetVT)
getMODF - Return the MODF_* value for the given types, or UNKNOWN_LIBCALL if there is none.
LLVM_ABI Libcall getFPLibCall(EVT VT, Libcall Call_F32, Libcall Call_F64, Libcall Call_F80, Libcall Call_F128, Libcall Call_PPCF128)
GetFPLibCall - Helper to return the right libcall for the given floating point type,...
LLVM_ABI Libcall getFPTOUINT(EVT OpVT, EVT RetVT)
getFPTOUINT - Return the FPTOUINT_*_* value for the given types, or UNKNOWN_LIBCALL if there is none.
LLVM_ABI Libcall getCOS(EVT RetVT)
Return the COS_* value for the given types, or UNKNOWN_LIBCALL if there is none.
LLVM_ABI Libcall getFPTOSINT(EVT OpVT, EVT RetVT)
getFPTOSINT - Return the FPTOSINT_*_* value for the given types, or UNKNOWN_LIBCALL if there is none.
LLVM_ABI Libcall getOUTLINE_ATOMIC(unsigned Opc, AtomicOrdering Order, MVT VT)
Return the outline atomics value for the given opcode, atomic ordering and type, or UNKNOWN_LIBCALL i...
LLVM_ABI Libcall getFPEXT(EVT OpVT, EVT RetVT)
getFPEXT - Return the FPEXT_*_* value for the given types, or UNKNOWN_LIBCALL if there is none.
LLVM_ABI Libcall getFPROUND(EVT OpVT, EVT RetVT)
getFPROUND - Return the FPROUND_*_* value for the given types, or UNKNOWN_LIBCALL if there is none.
LLVM_ABI Libcall getSIN(EVT RetVT)
Return the SIN_* value for the given types, or UNKNOWN_LIBCALL if there is none.
LLVM_ABI Libcall getMEMSET_ELEMENT_UNORDERED_ATOMIC(uint64_t ElementSize)
getMEMSET_ELEMENT_UNORDERED_ATOMIC - Return MEMSET_ELEMENT_UNORDERED_ATOMIC_* value for the given ele...
LLVM_ABI Libcall getPOW(EVT RetVT)
getPOW - Return the POW_* value for the given types, or UNKNOWN_LIBCALL if there is none.
LLVM_ABI Libcall getOutlineAtomicHelper(const Libcall(&LC)[5][4], AtomicOrdering Order, uint64_t MemSize)
Return the outline atomics value for the given atomic ordering, access size and set of libcalls for a...
LLVM_ABI Libcall getSINCOS(EVT RetVT)
getSINCOS - Return the SINCOS_* value for the given types, or UNKNOWN_LIBCALL if there is none.
LLVM_ABI Libcall getMEMMOVE_ELEMENT_UNORDERED_ATOMIC(uint64_t ElementSize)
getMEMMOVE_ELEMENT_UNORDERED_ATOMIC - Return MEMMOVE_ELEMENT_UNORDERED_ATOMIC_* value for the given e...
This is an optimization pass for GlobalISel generic memory operations.
AtomicOrdering
Atomic ordering for LLVM's memory model.
Extended Value Type.
Definition ValueTypes.h:35