diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2024-07-20 12:09:30 +0900 |
---|---|---|
committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2024-07-20 12:36:57 +0900 |
commit | 5893b1e297f3a333b30a9d32d0909b77a9fcd31c (patch) | |
tree | 430da220e26491e90a9751aa3a0afb8e9cee9567 | |
parent | 168ecd706904d6ce221dc5107da92c56aea7c8e9 (diff) | |
download | llvm-5893b1e297f3a333b30a9d32d0909b77a9fcd31c.zip llvm-5893b1e297f3a333b30a9d32d0909b77a9fcd31c.tar.gz llvm-5893b1e297f3a333b30a9d32d0909b77a9fcd31c.tar.bz2 |
Reformat
-rw-r--r-- | llvm/include/llvm/CodeGen/RuntimeLibcalls.h | 172 | ||||
-rw-r--r-- | llvm/include/llvm/LTO/LTO.h | 2 | ||||
-rw-r--r-- | llvm/lib/CodeGen/TargetLoweringBase.cpp | 6 | ||||
-rw-r--r-- | llvm/lib/LTO/LTO.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Target/Hexagon/HexagonISelLowering.cpp | 2 |
5 files changed, 90 insertions, 94 deletions
diff --git a/llvm/include/llvm/CodeGen/RuntimeLibcalls.h b/llvm/include/llvm/CodeGen/RuntimeLibcalls.h index 3a407c4..f317041 100644 --- a/llvm/include/llvm/CodeGen/RuntimeLibcalls.h +++ b/llvm/include/llvm/CodeGen/RuntimeLibcalls.h @@ -19,95 +19,91 @@ namespace llvm { namespace RTLIB { - /// RTLIB::Libcall enum - This enum defines all of the runtime library calls - /// the backend can emit. The various long double types cannot be merged, - /// because 80-bit library functions use "xf" and 128-bit use "tf". - /// - /// When adding PPCF128 functions here, note that their names generally need - /// to be overridden for Darwin with the xxx$LDBL128 form. See - /// PPCISelLowering.cpp. - /// - enum Libcall { +/// RTLIB::Libcall enum - This enum defines all of the runtime library calls +/// the backend can emit. The various long double types cannot be merged, +/// because 80-bit library functions use "xf" and 128-bit use "tf". +/// +/// When adding PPCF128 functions here, note that their names generally need +/// to be overridden for Darwin with the xxx$LDBL128 form. See +/// PPCISelLowering.cpp. +/// +enum Libcall { #define HANDLE_LIBCALL(code, name) code, - #include "llvm/IR/RuntimeLibcalls.def" +#include "llvm/IR/RuntimeLibcalls.def" #undef HANDLE_LIBCALL - }; - - /// GetFPLibCall - Helper to return the right libcall for the given floating - /// point type, or UNKNOWN_LIBCALL if there is none. - Libcall getFPLibCall(EVT VT, - Libcall Call_F32, - Libcall Call_F64, - Libcall Call_F80, - Libcall Call_F128, - Libcall Call_PPCF128); - - /// getFPEXT - Return the FPEXT_*_* value for the given types, or - /// UNKNOWN_LIBCALL if there is none. - Libcall getFPEXT(EVT OpVT, EVT RetVT); - - /// getFPROUND - Return the FPROUND_*_* value for the given types, or - /// UNKNOWN_LIBCALL if there is none. - Libcall getFPROUND(EVT OpVT, EVT RetVT); - - /// getFPTOSINT - Return the FPTOSINT_*_* value for the given types, or - /// UNKNOWN_LIBCALL if there is none. - Libcall getFPTOSINT(EVT OpVT, EVT RetVT); - - /// getFPTOUINT - Return the FPTOUINT_*_* value for the given types, or - /// UNKNOWN_LIBCALL if there is none. - Libcall getFPTOUINT(EVT OpVT, EVT RetVT); - - /// getSINTTOFP - Return the SINTTOFP_*_* value for the given types, or - /// UNKNOWN_LIBCALL if there is none. - Libcall getSINTTOFP(EVT OpVT, EVT RetVT); - - /// getUINTTOFP - Return the UINTTOFP_*_* value for the given types, or - /// UNKNOWN_LIBCALL if there is none. - Libcall getUINTTOFP(EVT OpVT, EVT RetVT); - - /// getPOWI - Return the POWI_* value for the given types, or - /// UNKNOWN_LIBCALL if there is none. - Libcall getPOWI(EVT RetVT); - - /// getLDEXP - Return the LDEXP_* value for the given types, or - /// UNKNOWN_LIBCALL if there is none. - Libcall getLDEXP(EVT RetVT); - - /// getFREXP - Return the FREXP_* value for the given types, or - /// UNKNOWN_LIBCALL if there is none. - Libcall getFREXP(EVT RetVT); - - /// Return the SYNC_FETCH_AND_* value for the given opcode and type, or - /// UNKNOWN_LIBCALL if there is none. - Libcall getSYNC(unsigned Opc, MVT VT); - - /// Return the outline atomics value for the given atomic ordering, access - /// size and set of libcalls for a given atomic, or UNKNOWN_LIBCALL if there - /// is none. - Libcall getOutlineAtomicHelper(const Libcall (&LC)[5][4], - AtomicOrdering Order, uint64_t MemSize); - - /// Return the outline atomics value for the given opcode, atomic ordering - /// and type, or UNKNOWN_LIBCALL if there is none. - Libcall getOUTLINE_ATOMIC(unsigned Opc, AtomicOrdering Order, MVT VT); - - /// getMEMCPY_ELEMENT_UNORDERED_ATOMIC - Return - /// MEMCPY_ELEMENT_UNORDERED_ATOMIC_* value for the given element size or - /// UNKNOW_LIBCALL if there is none. - Libcall getMEMCPY_ELEMENT_UNORDERED_ATOMIC(uint64_t ElementSize); - - /// getMEMMOVE_ELEMENT_UNORDERED_ATOMIC - Return - /// MEMMOVE_ELEMENT_UNORDERED_ATOMIC_* value for the given element size or - /// UNKNOW_LIBCALL if there is none. - Libcall getMEMMOVE_ELEMENT_UNORDERED_ATOMIC(uint64_t ElementSize); - - /// getMEMSET_ELEMENT_UNORDERED_ATOMIC - Return - /// MEMSET_ELEMENT_UNORDERED_ATOMIC_* value for the given element size or - /// UNKNOW_LIBCALL if there is none. - Libcall getMEMSET_ELEMENT_UNORDERED_ATOMIC(uint64_t ElementSize); - -} -} +}; + +/// GetFPLibCall - Helper to return the right libcall for the given floating +/// point type, or UNKNOWN_LIBCALL if there is none. +Libcall getFPLibCall(EVT VT, Libcall Call_F32, Libcall Call_F64, + Libcall Call_F80, Libcall Call_F128, Libcall Call_PPCF128); + +/// getFPEXT - Return the FPEXT_*_* value for the given types, or +/// UNKNOWN_LIBCALL if there is none. +Libcall getFPEXT(EVT OpVT, EVT RetVT); + +/// getFPROUND - Return the FPROUND_*_* value for the given types, or +/// UNKNOWN_LIBCALL if there is none. +Libcall getFPROUND(EVT OpVT, EVT RetVT); + +/// getFPTOSINT - Return the FPTOSINT_*_* value for the given types, or +/// UNKNOWN_LIBCALL if there is none. +Libcall getFPTOSINT(EVT OpVT, EVT RetVT); + +/// getFPTOUINT - Return the FPTOUINT_*_* value for the given types, or +/// UNKNOWN_LIBCALL if there is none. +Libcall getFPTOUINT(EVT OpVT, EVT RetVT); + +/// getSINTTOFP - Return the SINTTOFP_*_* value for the given types, or +/// UNKNOWN_LIBCALL if there is none. +Libcall getSINTTOFP(EVT OpVT, EVT RetVT); + +/// getUINTTOFP - Return the UINTTOFP_*_* value for the given types, or +/// UNKNOWN_LIBCALL if there is none. +Libcall getUINTTOFP(EVT OpVT, EVT RetVT); + +/// getPOWI - Return the POWI_* value for the given types, or +/// UNKNOWN_LIBCALL if there is none. +Libcall getPOWI(EVT RetVT); + +/// getLDEXP - Return the LDEXP_* value for the given types, or +/// UNKNOWN_LIBCALL if there is none. +Libcall getLDEXP(EVT RetVT); + +/// getFREXP - Return the FREXP_* value for the given types, or +/// UNKNOWN_LIBCALL if there is none. +Libcall getFREXP(EVT RetVT); + +/// Return the SYNC_FETCH_AND_* value for the given opcode and type, or +/// UNKNOWN_LIBCALL if there is none. +Libcall getSYNC(unsigned Opc, MVT VT); + +/// Return the outline atomics value for the given atomic ordering, access +/// size and set of libcalls for a given atomic, or UNKNOWN_LIBCALL if there +/// is none. +Libcall getOutlineAtomicHelper(const Libcall (&LC)[5][4], AtomicOrdering Order, + uint64_t MemSize); + +/// Return the outline atomics value for the given opcode, atomic ordering +/// and type, or UNKNOWN_LIBCALL if there is none. +Libcall getOUTLINE_ATOMIC(unsigned Opc, AtomicOrdering Order, MVT VT); + +/// getMEMCPY_ELEMENT_UNORDERED_ATOMIC - Return +/// MEMCPY_ELEMENT_UNORDERED_ATOMIC_* value for the given element size or +/// UNKNOW_LIBCALL if there is none. +Libcall getMEMCPY_ELEMENT_UNORDERED_ATOMIC(uint64_t ElementSize); + +/// getMEMMOVE_ELEMENT_UNORDERED_ATOMIC - Return +/// MEMMOVE_ELEMENT_UNORDERED_ATOMIC_* value for the given element size or +/// UNKNOW_LIBCALL if there is none. +Libcall getMEMMOVE_ELEMENT_UNORDERED_ATOMIC(uint64_t ElementSize); + +/// getMEMSET_ELEMENT_UNORDERED_ATOMIC - Return +/// MEMSET_ELEMENT_UNORDERED_ATOMIC_* value for the given element size or +/// UNKNOW_LIBCALL if there is none. +Libcall getMEMSET_ELEMENT_UNORDERED_ATOMIC(uint64_t ElementSize); + +} // namespace RTLIB +} // namespace llvm #endif diff --git a/llvm/include/llvm/LTO/LTO.h b/llvm/include/llvm/LTO/LTO.h index 94996ae..63c8435 100644 --- a/llvm/include/llvm/LTO/LTO.h +++ b/llvm/include/llvm/LTO/LTO.h @@ -301,7 +301,7 @@ public: /// Static method that returns a list of libcall symbols that can be generated /// by LTO but might not be visible from bitcode symbol table. - static ArrayRef<const char*> getRuntimeLibcallSymbols(); + static ArrayRef<const char *> getRuntimeLibcallSymbols(); private: Config Conf; diff --git a/llvm/lib/CodeGen/TargetLoweringBase.cpp b/llvm/lib/CodeGen/TargetLoweringBase.cpp index f0fa6aa..914c67a 100644 --- a/llvm/lib/CodeGen/TargetLoweringBase.cpp +++ b/llvm/lib/CodeGen/TargetLoweringBase.cpp @@ -114,8 +114,7 @@ static bool darwinHasSinCos(const Triple &TT) { } void TargetLoweringBase::InitLibcalls(const Triple &TT) { -#define HANDLE_LIBCALL(code, name) \ - setLibcallName(RTLIB::code, name); +#define HANDLE_LIBCALL(code, name) setLibcallName(RTLIB::code, name); #include "llvm/IR/RuntimeLibcalls.def" #undef HANDLE_LIBCALL // Initialize calling conventions to their default. @@ -985,7 +984,8 @@ TargetLoweringBase::TargetLoweringBase(const TargetMachine &tm) : TM(tm) { MinCmpXchgSizeInBits = 0; SupportsUnalignedAtomics = false; - std::fill(std::begin(LibcallRoutineNames), std::end(LibcallRoutineNames), nullptr); + std::fill(std::begin(LibcallRoutineNames), std::end(LibcallRoutineNames), + nullptr); InitLibcalls(TM.getTargetTriple()); InitCmpLibcallCCs(CmpLibcallCCs); diff --git a/llvm/lib/LTO/LTO.cpp b/llvm/lib/LTO/LTO.cpp index 4ffacbb..94db666 100644 --- a/llvm/lib/LTO/LTO.cpp +++ b/llvm/lib/LTO/LTO.cpp @@ -1363,7 +1363,7 @@ static const char *libcallRoutineNames[] = { #undef HANDLE_LIBCALL }; -ArrayRef<const char*> LTO::getRuntimeLibcallSymbols() { +ArrayRef<const char *> LTO::getRuntimeLibcallSymbols() { return ArrayRef(libcallRoutineNames); } diff --git a/llvm/lib/Target/Hexagon/HexagonISelLowering.cpp b/llvm/lib/Target/Hexagon/HexagonISelLowering.cpp index 918fc12..84defa8 100644 --- a/llvm/lib/Target/Hexagon/HexagonISelLowering.cpp +++ b/llvm/lib/Target/Hexagon/HexagonISelLowering.cpp @@ -39,12 +39,12 @@ #include "llvm/IR/DiagnosticPrinter.h" #include "llvm/IR/Function.h" #include "llvm/IR/GlobalValue.h" +#include "llvm/IR/IRBuilder.h" #include "llvm/IR/InlineAsm.h" #include "llvm/IR/Instructions.h" #include "llvm/IR/IntrinsicInst.h" #include "llvm/IR/Intrinsics.h" #include "llvm/IR/IntrinsicsHexagon.h" -#include "llvm/IR/IRBuilder.h" #include "llvm/IR/Module.h" #include "llvm/IR/Type.h" #include "llvm/IR/Value.h" |