Skip to content

RISCV: Start moving runtime libcall config to tablegen #147652

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: users/arsenm/runtime-libcalls/stop-using-defset-default-libcall-impls
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion llvm/include/llvm/IR/RuntimeLibcalls.td
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,6 @@ def __llvm_deoptimize : RuntimeLibcallImpl<DEOPTIMIZE>;

// Clear cache
def __clear_cache : RuntimeLibcallImpl<CLEAR_CACHE>;
def __riscv_flush_icache : RuntimeLibcallImpl<RISCV_FLUSH_ICACHE>;

//--------------------------------------------------------------------
// libm
Expand Down Expand Up @@ -928,6 +927,8 @@ def bzero : RuntimeLibcallImpl<BZERO>;
def __bzero : RuntimeLibcallImpl<BZERO>;
def _Unwind_SjLj_Resume : RuntimeLibcallImpl<UNWIND_RESUME>;

def __riscv_flush_icache : RuntimeLibcallImpl<RISCV_FLUSH_ICACHE>;

//===----------------------------------------------------------------------===//
// F128 libm Runtime Libcalls
//===----------------------------------------------------------------------===//
Expand Down Expand Up @@ -1844,6 +1845,18 @@ def PPCSystemLibrary
AvailableIf<memcpy, isNotAIX>,
LibcallImpls<(add Int128RTLibcalls), isPPC64>)>;

//===----------------------------------------------------------------------===//
// RISCV Runtime Libcalls
//===----------------------------------------------------------------------===//

def isRISCV : RuntimeLibcallPredicate<"TT.isRISCV()">;
def isRISCV64 : RuntimeLibcallPredicate<"TT.isRISCV64()">;

def RISCVSystemLibrary
: SystemRuntimeLibrary<isRISCV,
(add DefaultRuntimeLibcallImpls, __riscv_flush_icache,
LibcallImpls<(add Int128RTLibcalls), isRISCV64>)>;

//===----------------------------------------------------------------------===//
// SPARC Runtime Libcalls
//===----------------------------------------------------------------------===//
Expand Down