diff options
author | Duncan Sands <baldrick@free.fr> | 2008-07-17 02:36:29 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2008-07-17 02:36:29 +0000 |
commit | b2ff885aaed8f9b033b16ca78d645650efc32433 (patch) | |
tree | 69b25d7e34c9d08ac613662ac3e194bb8ac17b40 /include | |
parent | 066fcf8628b14ebe93253a153cb1ffa2e901ee9b (diff) | |
download | external_llvm-b2ff885aaed8f9b033b16ca78d645650efc32433.zip external_llvm-b2ff885aaed8f9b033b16ca78d645650efc32433.tar.gz external_llvm-b2ff885aaed8f9b033b16ca78d645650efc32433.tar.bz2 |
Factorize some code for determining which libcall to use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53713 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/CodeGen/RuntimeLibcalls.h | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/include/llvm/CodeGen/RuntimeLibcalls.h b/include/llvm/CodeGen/RuntimeLibcalls.h index acbaa1a..89eed37 100644 --- a/include/llvm/CodeGen/RuntimeLibcalls.h +++ b/include/llvm/CodeGen/RuntimeLibcalls.h @@ -8,13 +8,15 @@ //===----------------------------------------------------------------------===// // // This file defines the enum representing the list of runtime library calls -// the backend may emit during code generation. +// the backend may emit during code generation, and also some helper functions. // //===----------------------------------------------------------------------===// #ifndef LLVM_CODEGEN_RUNTIMELIBCALLS_H #define LLVM_CODEGEN_RUNTIMELIBCALLS_H +#include "llvm/CodeGen/ValueTypes.h" + namespace llvm { namespace RTLIB { /// RTLIB::Libcall enum - This enum defines all of the runtime library calls @@ -168,6 +170,30 @@ namespace RTLIB { UNKNOWN_LIBCALL }; + + /// getFPEXT - Return the FPEXT_*_* value for the given types, or + /// UNKNOWN_LIBCALL if there is none. + Libcall getFPEXT(MVT OpVT, MVT RetVT); + + /// getFPROUND - Return the FPROUND_*_* value for the given types, or + /// UNKNOWN_LIBCALL if there is none. + Libcall getFPROUND(MVT OpVT, MVT RetVT); + + /// getFPTOSINT - Return the FPTOSINT_*_* value for the given types, or + /// UNKNOWN_LIBCALL if there is none. + Libcall getFPTOSINT(MVT OpVT, MVT RetVT); + + /// getFPTOUINT - Return the FPTOUINT_*_* value for the given types, or + /// UNKNOWN_LIBCALL if there is none. + Libcall getFPTOUINT(MVT OpVT, MVT RetVT); + + /// getSINTTOFP - Return the SINTTOFP_*_* value for the given types, or + /// UNKNOWN_LIBCALL if there is none. + Libcall getSINTTOFP(MVT OpVT, MVT RetVT); + + /// getUINTTOFP - Return the UINTTOFP_*_* value for the given types, or + /// UNKNOWN_LIBCALL if there is none. + Libcall getUINTTOFP(MVT OpVT, MVT RetVT); } } |