LLVM 19.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
19
20namespace llvm {
21namespace RTLIB {
22
23/// GetFPLibCall - Helper to return the right libcall for the given floating
24/// point type, or UNKNOWN_LIBCALL if there is none.
25Libcall getFPLibCall(EVT VT, Libcall Call_F32, Libcall Call_F64,
26 Libcall Call_F80, Libcall Call_F128, Libcall Call_PPCF128);
27
28/// getFPEXT - Return the FPEXT_*_* value for the given types, or
29/// UNKNOWN_LIBCALL if there is none.
30Libcall getFPEXT(EVT OpVT, EVT RetVT);
31
32/// getFPROUND - Return the FPROUND_*_* value for the given types, or
33/// UNKNOWN_LIBCALL if there is none.
34Libcall getFPROUND(EVT OpVT, EVT RetVT);
35
36/// getFPTOSINT - Return the FPTOSINT_*_* value for the given types, or
37/// UNKNOWN_LIBCALL if there is none.
38Libcall getFPTOSINT(EVT OpVT, EVT RetVT);
39
40/// getFPTOUINT - Return the FPTOUINT_*_* value for the given types, or
41/// UNKNOWN_LIBCALL if there is none.
42Libcall getFPTOUINT(EVT OpVT, EVT RetVT);
43
44/// getSINTTOFP - Return the SINTTOFP_*_* value for the given types, or
45/// UNKNOWN_LIBCALL if there is none.
46Libcall getSINTTOFP(EVT OpVT, EVT RetVT);
47
48/// getUINTTOFP - Return the UINTTOFP_*_* value for the given types, or
49/// UNKNOWN_LIBCALL if there is none.
50Libcall getUINTTOFP(EVT OpVT, EVT RetVT);
51
52/// getPOWI - Return the POWI_* value for the given types, or
53/// UNKNOWN_LIBCALL if there is none.
54Libcall getPOWI(EVT RetVT);
55
56/// getLDEXP - Return the LDEXP_* value for the given types, or
57/// UNKNOWN_LIBCALL if there is none.
58Libcall getLDEXP(EVT RetVT);
59
60/// getFREXP - Return the FREXP_* value for the given types, or
61/// UNKNOWN_LIBCALL if there is none.
62Libcall getFREXP(EVT RetVT);
63
64/// Return the SYNC_FETCH_AND_* value for the given opcode and type, or
65/// UNKNOWN_LIBCALL if there is none.
66Libcall getSYNC(unsigned Opc, MVT VT);
67
68/// Return the outline atomics value for the given atomic ordering, access
69/// size and set of libcalls for a given atomic, or UNKNOWN_LIBCALL if there
70/// is none.
72 uint64_t MemSize);
73
74/// Return the outline atomics value for the given opcode, atomic ordering
75/// and type, or UNKNOWN_LIBCALL if there is none.
76Libcall getOUTLINE_ATOMIC(unsigned Opc, AtomicOrdering Order, MVT VT);
77
78/// getMEMCPY_ELEMENT_UNORDERED_ATOMIC - Return
79/// MEMCPY_ELEMENT_UNORDERED_ATOMIC_* value for the given element size or
80/// UNKNOW_LIBCALL if there is none.
82
83/// getMEMMOVE_ELEMENT_UNORDERED_ATOMIC - Return
84/// MEMMOVE_ELEMENT_UNORDERED_ATOMIC_* value for the given element size or
85/// UNKNOW_LIBCALL if there is none.
87
88/// getMEMSET_ELEMENT_UNORDERED_ATOMIC - Return
89/// MEMSET_ELEMENT_UNORDERED_ATOMIC_* value for the given element size or
90/// UNKNOW_LIBCALL if there is none.
92
93} // namespace RTLIB
94} // namespace llvm
95
96#endif
Atomic ordering constants.
Machine Value Type.
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.
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:34