LLVM 20.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
20
21namespace llvm {
22namespace RTLIB {
23
24/// GetFPLibCall - Helper to return the right libcall for the given floating
25/// point type, or UNKNOWN_LIBCALL if there is none.
26Libcall getFPLibCall(EVT VT, Libcall Call_F32, Libcall Call_F64,
27 Libcall Call_F80, Libcall Call_F128, Libcall Call_PPCF128);
28
29/// getFPEXT - Return the FPEXT_*_* value for the given types, or
30/// UNKNOWN_LIBCALL if there is none.
31Libcall getFPEXT(EVT OpVT, EVT RetVT);
32
33/// getFPROUND - Return the FPROUND_*_* value for the given types, or
34/// UNKNOWN_LIBCALL if there is none.
35Libcall getFPROUND(EVT OpVT, EVT RetVT);
36
37/// getFPTOSINT - Return the FPTOSINT_*_* value for the given types, or
38/// UNKNOWN_LIBCALL if there is none.
39Libcall getFPTOSINT(EVT OpVT, EVT RetVT);
40
41/// getFPTOUINT - Return the FPTOUINT_*_* value for the given types, or
42/// UNKNOWN_LIBCALL if there is none.
43Libcall getFPTOUINT(EVT OpVT, EVT RetVT);
44
45/// getSINTTOFP - Return the SINTTOFP_*_* value for the given types, or
46/// UNKNOWN_LIBCALL if there is none.
47Libcall getSINTTOFP(EVT OpVT, EVT RetVT);
48
49/// getUINTTOFP - Return the UINTTOFP_*_* value for the given types, or
50/// UNKNOWN_LIBCALL if there is none.
51Libcall getUINTTOFP(EVT OpVT, EVT RetVT);
52
53/// getPOWI - Return the POWI_* value for the given types, or
54/// UNKNOWN_LIBCALL if there is none.
55Libcall getPOWI(EVT RetVT);
56
57/// getLDEXP - Return the LDEXP_* value for the given types, or
58/// UNKNOWN_LIBCALL if there is none.
59Libcall getLDEXP(EVT RetVT);
60
61/// getFREXP - Return the FREXP_* value for the given types, or
62/// UNKNOWN_LIBCALL if there is none.
63Libcall getFREXP(EVT RetVT);
64
65/// Return the SYNC_FETCH_AND_* value for the given opcode and type, or
66/// UNKNOWN_LIBCALL if there is none.
67Libcall getSYNC(unsigned Opc, MVT VT);
68
69/// Return the outline atomics value for the given atomic ordering, access
70/// size and set of libcalls for a given atomic, or UNKNOWN_LIBCALL if there
71/// is none.
73 uint64_t MemSize);
74
75/// Return the outline atomics value for the given opcode, atomic ordering
76/// and type, or UNKNOWN_LIBCALL if there is none.
77Libcall getOUTLINE_ATOMIC(unsigned Opc, AtomicOrdering Order, MVT VT);
78
79/// getMEMCPY_ELEMENT_UNORDERED_ATOMIC - Return
80/// MEMCPY_ELEMENT_UNORDERED_ATOMIC_* value for the given element size or
81/// UNKNOW_LIBCALL if there is none.
83
84/// getMEMMOVE_ELEMENT_UNORDERED_ATOMIC - Return
85/// MEMMOVE_ELEMENT_UNORDERED_ATOMIC_* value for the given element size or
86/// UNKNOW_LIBCALL if there is none.
88
89/// getMEMSET_ELEMENT_UNORDERED_ATOMIC - Return
90/// MEMSET_ELEMENT_UNORDERED_ATOMIC_* value for the given element size or
91/// UNKNOW_LIBCALL if there is none.
93
94/// Initialize the default condition code on the libcalls.
95void initCmpLibcallCCs(ISD::CondCode *CmpLibcallCCs);
96
97} // namespace RTLIB
98} // namespace llvm
99
100#endif
Atomic ordering constants.
Machine Value Type.
CondCode
ISD::CondCode enum - These are ordered carefully to make the bitfields below work out,...
Definition: ISDOpcodes.h:1603
Libcall getPOWI(EVT RetVT)
getPOWI - Return the POWI_* value for the given types, or UNKNOWN_LIBCALL if there is none.
Libcall getSINTTOFP(EVT OpVT, EVT RetVT)
getSINTTOFP - Return the SINTTOFP_*_* value for the given types, or UNKNOWN_LIBCALL if there is none.
void initCmpLibcallCCs(ISD::CondCode *CmpLibcallCCs)
Initialize the default condition code on the libcalls.
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.
Libcall getLDEXP(EVT RetVT)
getLDEXP - Return the LDEXP_* value for the given types, or UNKNOWN_LIBCALL if there is none.
Libcall getUINTTOFP(EVT OpVT, EVT RetVT)
getUINTTOFP - Return the UINTTOFP_*_* value for the given types, or UNKNOWN_LIBCALL if there is none.
Libcall getFREXP(EVT RetVT)
getFREXP - Return the FREXP_* value for the given types, or UNKNOWN_LIBCALL if there is none.
Libcall
RTLIB::Libcall enum - This enum defines all of the runtime library calls the backend can emit.
Libcall getMEMCPY_ELEMENT_UNORDERED_ATOMIC(uint64_t ElementSize)
getMEMCPY_ELEMENT_UNORDERED_ATOMIC - Return MEMCPY_ELEMENT_UNORDERED_ATOMIC_* value for the given ele...
Libcall getFPTOUINT(EVT OpVT, EVT RetVT)
getFPTOUINT - Return the FPTOUINT_*_* value for the given types, or UNKNOWN_LIBCALL if there is none.
Libcall getFPTOSINT(EVT OpVT, EVT RetVT)
getFPTOSINT - Return the FPTOSINT_*_* value for the given types, or UNKNOWN_LIBCALL if there is none.
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...
Libcall getFPEXT(EVT OpVT, EVT RetVT)
getFPEXT - Return the FPEXT_*_* value for the given types, or UNKNOWN_LIBCALL if there is none.
Libcall getFPROUND(EVT OpVT, EVT RetVT)
getFPROUND - Return the FPROUND_*_* value for the given types, or UNKNOWN_LIBCALL if there is none.
Libcall getMEMSET_ELEMENT_UNORDERED_ATOMIC(uint64_t ElementSize)
getMEMSET_ELEMENT_UNORDERED_ATOMIC - Return MEMSET_ELEMENT_UNORDERED_ATOMIC_* value for the given ele...
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...
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,...
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.
Definition: AddressRanges.h:18
AtomicOrdering
Atomic ordering for LLVM's memory model.
Extended Value Type.
Definition: ValueTypes.h:35