Lanai: Use TableGen to set libcall calling conventions (#146080)

This commit is contained in:
Matt Arsenault 2025-07-08 17:15:58 +09:00 committed by GitHub
parent 58ad99606b
commit b116ee4536
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 12 additions and 4 deletions

View File

@ -1389,6 +1389,18 @@ def __hexagon_fast2_sqrtdf2 : RuntimeLibcallImpl<SQRT_F64>;
def __hexagon_memcpy_likely_aligned_min32bytes_mult8bytes
: RuntimeLibcallImpl<HEXAGON_MEMCPY_LIKELY_ALIGNED_MIN32BYTES_MULT8BYTES>;
//===----------------------------------------------------------------------===//
// Lanai Runtime Libcalls
//===----------------------------------------------------------------------===//
def isLanai : RuntimeLibcallPredicate<"TT.getArch() == Triple::lanai">;
// Use fast calling convention for library functions.
def LanaiSystemLibrary
: SystemRuntimeLibrary<isLanai, (add DefaultRuntimeLibcallImpls)> {
let DefaultLibcallCallingConv = FASTCC;
}
//===----------------------------------------------------------------------===//
// Mips16 Runtime Libcalls
//===----------------------------------------------------------------------===//

View File

@ -150,10 +150,6 @@ LanaiTargetLowering::LanaiTargetLowering(const TargetMachine &TM,
// statements. Re-evaluate this on new benchmarks.
setMinimumJumpTableEntries(100);
// Use fast calling convention for library functions.
for (RTLIB::LibcallImpl LC : RTLIB::libcall_impls())
setLibcallImplCallingConv(LC, CallingConv::Fast);
MaxStoresPerMemset = 16; // For @llvm.memset -> sequence of stores
MaxStoresPerMemsetOptSize = 8;
MaxStoresPerMemcpy = 16; // For @llvm.memcpy -> sequence of stores