[Alignment][NFC] Migrate Instructions to Align
[llvm-core.git] / include / llvm / CodeGen / RuntimeLibcalls.h
blobf71f39e5bf033e262deaf841a40c7d4284f60a03
1 //===-- CodeGen/RuntimeLibcalls.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 the enum representing the list of runtime library calls
10 // the backend may emit during code generation, and also some helper functions.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_CODEGEN_RUNTIMELIBCALLS_H
15 #define LLVM_CODEGEN_RUNTIMELIBCALLS_H
17 #include "llvm/CodeGen/ValueTypes.h"
19 namespace llvm {
20 namespace RTLIB {
21 /// RTLIB::Libcall enum - This enum defines all of the runtime library calls
22 /// the backend can emit. The various long double types cannot be merged,
23 /// because 80-bit library functions use "xf" and 128-bit use "tf".
24 ///
25 /// When adding PPCF128 functions here, note that their names generally need
26 /// to be overridden for Darwin with the xxx$LDBL128 form. See
27 /// PPCISelLowering.cpp.
28 ///
29 enum Libcall {
30 #define HANDLE_LIBCALL(code, name) code,
31 #include "llvm/IR/RuntimeLibcalls.def"
32 #undef HANDLE_LIBCALL
35 /// getFPEXT - Return the FPEXT_*_* value for the given types, or
36 /// UNKNOWN_LIBCALL if there is none.
37 Libcall getFPEXT(EVT OpVT, EVT RetVT);
39 /// getFPROUND - Return the FPROUND_*_* value for the given types, or
40 /// UNKNOWN_LIBCALL if there is none.
41 Libcall getFPROUND(EVT OpVT, EVT RetVT);
43 /// getFPTOSINT - Return the FPTOSINT_*_* value for the given types, or
44 /// UNKNOWN_LIBCALL if there is none.
45 Libcall getFPTOSINT(EVT OpVT, EVT RetVT);
47 /// getFPTOUINT - Return the FPTOUINT_*_* value for the given types, or
48 /// UNKNOWN_LIBCALL if there is none.
49 Libcall getFPTOUINT(EVT OpVT, EVT RetVT);
51 /// getSINTTOFP - Return the SINTTOFP_*_* value for the given types, or
52 /// UNKNOWN_LIBCALL if there is none.
53 Libcall getSINTTOFP(EVT OpVT, EVT RetVT);
55 /// getUINTTOFP - Return the UINTTOFP_*_* value for the given types, or
56 /// UNKNOWN_LIBCALL if there is none.
57 Libcall getUINTTOFP(EVT OpVT, EVT RetVT);
59 /// Return the SYNC_FETCH_AND_* value for the given opcode and type, or
60 /// UNKNOWN_LIBCALL if there is none.
61 Libcall getSYNC(unsigned Opc, MVT VT);
63 /// getMEMCPY_ELEMENT_UNORDERED_ATOMIC - Return
64 /// MEMCPY_ELEMENT_UNORDERED_ATOMIC_* value for the given element size or
65 /// UNKNOW_LIBCALL if there is none.
66 Libcall getMEMCPY_ELEMENT_UNORDERED_ATOMIC(uint64_t ElementSize);
68 /// getMEMMOVE_ELEMENT_UNORDERED_ATOMIC - Return
69 /// MEMMOVE_ELEMENT_UNORDERED_ATOMIC_* value for the given element size or
70 /// UNKNOW_LIBCALL if there is none.
71 Libcall getMEMMOVE_ELEMENT_UNORDERED_ATOMIC(uint64_t ElementSize);
73 /// getMEMSET_ELEMENT_UNORDERED_ATOMIC - Return
74 /// MEMSET_ELEMENT_UNORDERED_ATOMIC_* value for the given element size or
75 /// UNKNOW_LIBCALL if there is none.
76 Libcall getMEMSET_ELEMENT_UNORDERED_ATOMIC(uint64_t ElementSize);
81 #endif