LLVM  5.0.0
RuntimeLibcalls.h
Go to the documentation of this file.
1 //===-- CodeGen/RuntimeLibcalls.h - Runtime Library Calls -------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file defines the enum representing the list of runtime library calls
11 // the backend may emit during code generation, and also some helper functions.
12 //
13 //===----------------------------------------------------------------------===//
14 
15 #ifndef LLVM_CODEGEN_RUNTIMELIBCALLS_H
16 #define LLVM_CODEGEN_RUNTIMELIBCALLS_H
17 
19 
20 namespace llvm {
21 namespace RTLIB {
22  /// RTLIB::Libcall enum - This enum defines all of the runtime library calls
23  /// the backend can emit. The various long double types cannot be merged,
24  /// because 80-bit library functions use "xf" and 128-bit use "tf".
25  ///
26  /// When adding PPCF128 functions here, note that their names generally need
27  /// to be overridden for Darwin with the xxx$LDBL128 form. See
28  /// PPCISelLowering.cpp.
29  ///
30  enum Libcall {
31  // Integer
84 
85  // FLOATING POINT
216 
217  // CONVERSION
296 
297  // COMPARISON
330 
331  // MEMORY
335 
336  // ELEMENT-WISE UNORDERED-ATOMIC MEMORY of different element sizes
342 
348 
354 
355  // EXCEPTION HANDLING
357 
358  // Note: there's two sets of atomics libcalls; see
359  // <http://llvm.org/docs/Atomics.html> for more info on the
360  // difference between them.
361 
362  // Atomic '__sync_*' libcalls.
423 
424  // Atomic '__atomic_*' libcalls.
431 
438 
445 
452 
458 
464 
470 
476 
482 
488 
489  // Stack Protector Fail.
491 
492  // Deoptimization.
494 
496  };
497 
498  /// getFPEXT - Return the FPEXT_*_* value for the given types, or
499  /// UNKNOWN_LIBCALL if there is none.
500  Libcall getFPEXT(EVT OpVT, EVT RetVT);
501 
502  /// getFPROUND - Return the FPROUND_*_* value for the given types, or
503  /// UNKNOWN_LIBCALL if there is none.
504  Libcall getFPROUND(EVT OpVT, EVT RetVT);
505 
506  /// getFPTOSINT - Return the FPTOSINT_*_* value for the given types, or
507  /// UNKNOWN_LIBCALL if there is none.
508  Libcall getFPTOSINT(EVT OpVT, EVT RetVT);
509 
510  /// getFPTOUINT - Return the FPTOUINT_*_* value for the given types, or
511  /// UNKNOWN_LIBCALL if there is none.
512  Libcall getFPTOUINT(EVT OpVT, EVT RetVT);
513 
514  /// getSINTTOFP - Return the SINTTOFP_*_* value for the given types, or
515  /// UNKNOWN_LIBCALL if there is none.
516  Libcall getSINTTOFP(EVT OpVT, EVT RetVT);
517 
518  /// getUINTTOFP - Return the UINTTOFP_*_* value for the given types, or
519  /// UNKNOWN_LIBCALL if there is none.
520  Libcall getUINTTOFP(EVT OpVT, EVT RetVT);
521 
522  /// Return the SYNC_FETCH_AND_* value for the given opcode and type, or
523  /// UNKNOWN_LIBCALL if there is none.
524  Libcall getSYNC(unsigned Opc, MVT VT);
525 
526  /// getMEMCPY_ELEMENT_UNORDERED_ATOMIC - Return
527  /// MEMCPY_ELEMENT_UNORDERED_ATOMIC_* value for the given element size or
528  /// UNKNOW_LIBCALL if there is none.
529  Libcall getMEMCPY_ELEMENT_UNORDERED_ATOMIC(uint64_t ElementSize);
530 
531  /// getMEMMOVE_ELEMENT_UNORDERED_ATOMIC - Return
532  /// MEMMOVE_ELEMENT_UNORDERED_ATOMIC_* value for the given element size or
533  /// UNKNOW_LIBCALL if there is none.
534  Libcall getMEMMOVE_ELEMENT_UNORDERED_ATOMIC(uint64_t ElementSize);
535 
536  /// getMEMSET_ELEMENT_UNORDERED_ATOMIC - Return
537  /// MEMSET_ELEMENT_UNORDERED_ATOMIC_* value for the given element size or
538  /// UNKNOW_LIBCALL if there is none.
539  Libcall getMEMSET_ELEMENT_UNORDERED_ATOMIC(uint64_t ElementSize);
540 
541 }
542 }
543 
544 #endif
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
RTLIB::Libcall enum - This enum defines all of the runtime library calls the backend can emit...
Libcall getFPROUND(EVT OpVT, EVT RetVT)
getFPROUND - Return the FPROUND_*_* 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...
Machine Value Type.
Libcall getMEMMOVE_ELEMENT_UNORDERED_ATOMIC(uint64_t ElementSize)
getMEMMOVE_ELEMENT_UNORDERED_ATOMIC - Return MEMMOVE_ELEMENT_UNORDERED_ATOMIC_* value for the given e...
Libcall getFPTOSINT(EVT OpVT, EVT RetVT)
getFPTOSINT - Return the FPTOSINT_*_* value for the given types, or UNKNOWN_LIBCALL if there is none...
Extended Value Type.
Definition: ValueTypes.h:34
Libcall getMEMCPY_ELEMENT_UNORDERED_ATOMIC(uint64_t ElementSize)
getMEMCPY_ELEMENT_UNORDERED_ATOMIC - Return MEMCPY_ELEMENT_UNORDERED_ATOMIC_* value for the given ele...
Libcall getFPEXT(EVT OpVT, EVT RetVT)
getFPEXT - Return the FPEXT_*_* value for the given types, or UNKNOWN_LIBCALL if there is none...
Libcall getFPTOUINT(EVT OpVT, EVT RetVT)
getFPTOUINT - Return the FPTOUINT_*_* 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 getMEMSET_ELEMENT_UNORDERED_ATOMIC(uint64_t ElementSize)
getMEMSET_ELEMENT_UNORDERED_ATOMIC - Return MEMSET_ELEMENT_UNORDERED_ATOMIC_* value for the given ele...