Skip to content

Commit 9cbb4db

Browse files
committed
Lanai: Use TableGen to set libcall calling conventions
1 parent eaca233 commit 9cbb4db

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

llvm/include/llvm/IR/RuntimeLibcalls.td

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1360,6 +1360,18 @@ def __hexagon_fast2_sqrtdf2 : RuntimeLibcallImpl<SQRT_F64>;
13601360
def __hexagon_memcpy_likely_aligned_min32bytes_mult8bytes
13611361
: RuntimeLibcallImpl<HEXAGON_MEMCPY_LIKELY_ALIGNED_MIN32BYTES_MULT8BYTES>;
13621362

1363+
//===----------------------------------------------------------------------===//
1364+
// Lanai Runtime Libcalls
1365+
//===----------------------------------------------------------------------===//
1366+
1367+
def isLanai : RuntimeLibcallPredicate<"TT.getArch() == Triple::lanai">;
1368+
1369+
// Use fast calling convention for library functions.
1370+
def LanaiSystemLibrary
1371+
: SystemRuntimeLibrary<isLanai, (add DefaultRuntimeLibcallImpls)> {
1372+
let DefaultLibcallCallingConv = FASTCC;
1373+
}
1374+
13631375
//===----------------------------------------------------------------------===//
13641376
// Mips16 Runtime Libcalls
13651377
//===----------------------------------------------------------------------===//

llvm/lib/Target/Lanai/LanaiISelLowering.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,6 @@ LanaiTargetLowering::LanaiTargetLowering(const TargetMachine &TM,
150150
// statements. Re-evaluate this on new benchmarks.
151151
setMinimumJumpTableEntries(100);
152152

153-
// Use fast calling convention for library functions.
154-
for (RTLIB::LibcallImpl LC : RTLIB::libcall_impls())
155-
setLibcallImplCallingConv(LC, CallingConv::Fast);
156-
157153
MaxStoresPerMemset = 16; // For @llvm.memset -> sequence of stores
158154
MaxStoresPerMemsetOptSize = 8;
159155
MaxStoresPerMemcpy = 16; // For @llvm.memcpy -> sequence of stores

0 commit comments

Comments
 (0)