|
|
|||
File indexing completed on 2026-05-10 08:43:34
0001 //===-- CodeGen/RuntimeLibcallUtil.h - Runtime Library Calls ----*- C++ -*-===// 0002 // 0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 0004 // See https://llvm.org/LICENSE.txt for license information. 0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 0006 // 0007 //===----------------------------------------------------------------------===// 0008 // 0009 // This file defines some helper functions for runtime library calls. 0010 // 0011 //===----------------------------------------------------------------------===// 0012 0013 #ifndef LLVM_CODEGEN_RUNTIMELIBCALLS_H 0014 #define LLVM_CODEGEN_RUNTIMELIBCALLS_H 0015 0016 #include "llvm/CodeGen/ISDOpcodes.h" 0017 #include "llvm/CodeGen/ValueTypes.h" 0018 #include "llvm/IR/RuntimeLibcalls.h" 0019 #include "llvm/Support/AtomicOrdering.h" 0020 0021 namespace llvm { 0022 namespace RTLIB { 0023 0024 /// GetFPLibCall - Helper to return the right libcall for the given floating 0025 /// point type, or UNKNOWN_LIBCALL if there is none. 0026 Libcall getFPLibCall(EVT VT, Libcall Call_F32, Libcall Call_F64, 0027 Libcall Call_F80, Libcall Call_F128, Libcall Call_PPCF128); 0028 0029 /// getFPEXT - Return the FPEXT_*_* value for the given types, or 0030 /// UNKNOWN_LIBCALL if there is none. 0031 Libcall getFPEXT(EVT OpVT, EVT RetVT); 0032 0033 /// getFPROUND - Return the FPROUND_*_* value for the given types, or 0034 /// UNKNOWN_LIBCALL if there is none. 0035 Libcall getFPROUND(EVT OpVT, EVT RetVT); 0036 0037 /// getFPTOSINT - Return the FPTOSINT_*_* value for the given types, or 0038 /// UNKNOWN_LIBCALL if there is none. 0039 Libcall getFPTOSINT(EVT OpVT, EVT RetVT); 0040 0041 /// getFPTOUINT - Return the FPTOUINT_*_* value for the given types, or 0042 /// UNKNOWN_LIBCALL if there is none. 0043 Libcall getFPTOUINT(EVT OpVT, EVT RetVT); 0044 0045 /// getSINTTOFP - Return the SINTTOFP_*_* value for the given types, or 0046 /// UNKNOWN_LIBCALL if there is none. 0047 Libcall getSINTTOFP(EVT OpVT, EVT RetVT); 0048 0049 /// getUINTTOFP - Return the UINTTOFP_*_* value for the given types, or 0050 /// UNKNOWN_LIBCALL if there is none. 0051 Libcall getUINTTOFP(EVT OpVT, EVT RetVT); 0052 0053 /// getPOWI - Return the POWI_* value for the given types, or 0054 /// UNKNOWN_LIBCALL if there is none. 0055 Libcall getPOWI(EVT RetVT); 0056 0057 /// getLDEXP - Return the LDEXP_* value for the given types, or 0058 /// UNKNOWN_LIBCALL if there is none. 0059 Libcall getLDEXP(EVT RetVT); 0060 0061 /// getFREXP - Return the FREXP_* value for the given types, or 0062 /// UNKNOWN_LIBCALL if there is none. 0063 Libcall getFREXP(EVT RetVT); 0064 0065 /// getFSINCOS - Return the FSINCOS_* value for the given types, or 0066 /// UNKNOWN_LIBCALL if there is none. 0067 Libcall getFSINCOS(EVT RetVT); 0068 0069 /// Return the SYNC_FETCH_AND_* value for the given opcode and type, or 0070 /// UNKNOWN_LIBCALL if there is none. 0071 Libcall getSYNC(unsigned Opc, MVT VT); 0072 0073 /// Return the outline atomics value for the given atomic ordering, access 0074 /// size and set of libcalls for a given atomic, or UNKNOWN_LIBCALL if there 0075 /// is none. 0076 Libcall getOutlineAtomicHelper(const Libcall (&LC)[5][4], AtomicOrdering Order, 0077 uint64_t MemSize); 0078 0079 /// Return the outline atomics value for the given opcode, atomic ordering 0080 /// and type, or UNKNOWN_LIBCALL if there is none. 0081 Libcall getOUTLINE_ATOMIC(unsigned Opc, AtomicOrdering Order, MVT VT); 0082 0083 /// getMEMCPY_ELEMENT_UNORDERED_ATOMIC - Return 0084 /// MEMCPY_ELEMENT_UNORDERED_ATOMIC_* value for the given element size or 0085 /// UNKNOW_LIBCALL if there is none. 0086 Libcall getMEMCPY_ELEMENT_UNORDERED_ATOMIC(uint64_t ElementSize); 0087 0088 /// getMEMMOVE_ELEMENT_UNORDERED_ATOMIC - Return 0089 /// MEMMOVE_ELEMENT_UNORDERED_ATOMIC_* value for the given element size or 0090 /// UNKNOW_LIBCALL if there is none. 0091 Libcall getMEMMOVE_ELEMENT_UNORDERED_ATOMIC(uint64_t ElementSize); 0092 0093 /// getMEMSET_ELEMENT_UNORDERED_ATOMIC - Return 0094 /// MEMSET_ELEMENT_UNORDERED_ATOMIC_* value for the given element size or 0095 /// UNKNOW_LIBCALL if there is none. 0096 Libcall getMEMSET_ELEMENT_UNORDERED_ATOMIC(uint64_t ElementSize); 0097 0098 /// Initialize the default condition code on the libcalls. 0099 void initCmpLibcallCCs(ISD::CondCode *CmpLibcallCCs); 0100 0101 } // namespace RTLIB 0102 } // namespace llvm 0103 0104 #endif
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|