Skip to content

Commit b1cc318

Browse files
committed
Tidy categories
1 parent 26b50d9 commit b1cc318

File tree

1 file changed

+24
-28
lines changed

1 file changed

+24
-28
lines changed

llvm/include/llvm/IR/RuntimeLibcalls.td

Lines changed: 24 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -930,15 +930,29 @@ def calloc : RuntimeLibcallImpl<CALLOC>;
930930
} // End let IsDefault = true
931931

932932
//--------------------------------------------------------------------
933-
// compiler-rt, not available for most architectures
933+
// compiler-rt/libgcc but 64-bit only, not available by default
934934
//--------------------------------------------------------------------
935935

936-
def __ashlti3 : RuntimeLibcallImpl<SHL_I128>;
937-
def __lshrti3 : RuntimeLibcallImpl<SRL_I128>;
938-
def __ashrti3 : RuntimeLibcallImpl<SRA_I128>;
939-
def __multi3 : RuntimeLibcallImpl<MUL_I128>;
940-
def __mulodi4 : RuntimeLibcallImpl<MULO_I64>;
941-
def __muloti4 : RuntimeLibcallImpl<MULO_I128>;
936+
// Exist in libgcc and compiler-rt for 64-bit targets, or if
937+
// COMPILER_RT_ENABLE_SOFTWARE_INT128.
938+
defset list<RuntimeLibcallImpl> Int128RTLibcalls = {
939+
def __ashlti3 : RuntimeLibcallImpl<SHL_I128>;
940+
def __lshrti3 : RuntimeLibcallImpl<SRL_I128>;
941+
def __ashrti3 : RuntimeLibcallImpl<SRA_I128>;
942+
def __multi3 : RuntimeLibcallImpl<MUL_I128>;
943+
}
944+
945+
//--------------------------------------------------------------------
946+
// compiler-rt only, not available by default
947+
//--------------------------------------------------------------------
948+
949+
defset list<RuntimeLibcallImpl> CompilerRTOnlyInt64Libcalls = {
950+
def __mulodi4 : RuntimeLibcallImpl<MULO_I64>;
951+
}
952+
953+
defset list<RuntimeLibcallImpl> CompilerRTOnlyInt128Libcalls = {
954+
def __muloti4 : RuntimeLibcallImpl<MULO_I128>;
955+
}
942956

943957
//--------------------------------------------------------------------
944958
// Define implementation other libcalls
@@ -1034,21 +1048,6 @@ defset list<RuntimeLibcallImpl> LibmF128FiniteLibcalls = {
10341048
defvar AllDefaultRuntimeLibcallImpls
10351049
= !filter(entry, !instances<RuntimeLibcallImpl>(), entry.IsDefault);
10361050

1037-
// Exist in libgcc and compiler-rt for 64-bit targets, or if
1038-
// COMPILER_RT_ENABLE_SOFTWARE_INT128.
1039-
defvar Int128RTLibcalls = [
1040-
__ashlti3, __lshrti3, __ashrti3, __multi3
1041-
];
1042-
1043-
// Only available in compiler-rt
1044-
defvar CompilerRTOnlyInt64Libcalls = [
1045-
__mulodi4
1046-
];
1047-
1048-
defvar CompilerRTOnlyInt128Libcalls = [
1049-
__muloti4
1050-
];
1051-
10521051
defvar DefaultRuntimeLibcallImpls_f80 =
10531052
!filter(entry, AllDefaultRuntimeLibcallImpls,
10541053
!match(!cast<string>(entry.Provides), "F80"));
@@ -1064,12 +1063,9 @@ defvar DefaultRuntimeLibcallImpls_f128 =
10641063
defvar DefaultRuntimeLibcallImpls =
10651064
!listremove(
10661065
!listremove(
1067-
!listremove(
1068-
!listremove(AllDefaultRuntimeLibcallImpls, Int128RTLibcalls),
1069-
!listconcat(CompilerRTOnlyInt64Libcalls,
1070-
CompilerRTOnlyInt128Libcalls)),
1071-
DefaultRuntimeLibcallImpls_f80),
1072-
DefaultRuntimeLibcallImpls_ppcf128);
1066+
!listremove(AllDefaultRuntimeLibcallImpls, Int128RTLibcalls),
1067+
DefaultRuntimeLibcallImpls_f80),
1068+
DefaultRuntimeLibcallImpls_ppcf128);
10731069

10741070
/// Default set of libcall impls for 32-bit architectures.
10751071
defvar DefaultLibcallImpls32 = DefaultRuntimeLibcallImpls;

0 commit comments

Comments
 (0)