Skip to content

RuntimeLibcalls: Pass in ABI name from MCOptions #144894

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

Merged
merged 1 commit into from
Jun 23, 2025
Merged
Show file tree
Hide file tree
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
7 changes: 4 additions & 3 deletions llvm/include/llvm/IR/RuntimeLibcalls.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ struct RuntimeLibcallsInfo {
const Triple &TT,
ExceptionHandling ExceptionModel = ExceptionHandling::None,
FloatABI::ABIType FloatABI = FloatABI::Default,
EABI EABIVersion = EABI::Default) {
initLibcalls(TT, ExceptionModel, FloatABI, EABIVersion);
EABI EABIVersion = EABI::Default, StringRef ABIName = "") {
initLibcalls(TT, ExceptionModel, FloatABI, EABIVersion, ABIName);
}

/// Rename the default libcall routine name for the specified libcall.
Expand Down Expand Up @@ -150,7 +150,8 @@ struct RuntimeLibcallsInfo {
/// Set default libcall names. If a target wants to opt-out of a libcall it
/// should be placed here.
LLVM_ABI void initLibcalls(const Triple &TT, ExceptionHandling ExceptionModel,
FloatABI::ABIType FloatABI, EABI ABIType);
FloatABI::ABIType FloatABI, EABI ABIType,
StringRef ABIName);
};

} // namespace RTLIB
Expand Down
3 changes: 2 additions & 1 deletion llvm/lib/CodeGen/TargetLoweringBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,8 @@ void RTLIB::initCmpLibcallCCs(ISD::CondCode *CmpLibcallCCs) {
/// NOTE: The TargetMachine owns TLOF.
TargetLoweringBase::TargetLoweringBase(const TargetMachine &tm)
: TM(tm), Libcalls(TM.getTargetTriple(), TM.Options.ExceptionModel,
TM.Options.FloatABIType, TM.Options.EABIVersion) {
TM.Options.FloatABIType, TM.Options.EABIVersion,
TM.Options.MCOptions.getABIName()) {
initActions();

// Perform these initializations only once.
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/IR/RuntimeLibcalls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ static void setLongDoubleIsF128Libm(RuntimeLibcallsInfo &Info,
void RuntimeLibcallsInfo::initLibcalls(const Triple &TT,
ExceptionHandling ExceptionModel,
FloatABI::ABIType FloatABI,
EABI EABIVersion) {
EABI EABIVersion, StringRef ABIName) {
initSoftFloatCmpLibcallPredicates();

initSoftFloatCmpLibcallPredicates();
Expand Down
Loading