llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-tablegen Author: Matt Arsenault (arsenm) <details> <summary>Changes</summary> The IsDefault bit on RuntimeLibcallImpl fed a LibCallToDefaultImpl map in the TableGen backend that was populated but never read. Co-authored-by: Claude (Claude-Opus-4.8) <noreply@<!-- -->anthropic.com> --- Full diff: https://github.com/llvm/llvm-project/pull/219947.diff 3 Files Affected: - (modified) llvm/test/TableGen/RuntimeLibcallEmitter.td (+5-8) - (modified) llvm/utils/TableGen/Basic/RuntimeLibcalls.cpp (-8) - (modified) llvm/utils/TableGen/Basic/RuntimeLibcalls.h (-5) ``````````diff diff --git a/llvm/test/TableGen/RuntimeLibcallEmitter.td b/llvm/test/TableGen/RuntimeLibcallEmitter.td index 51c3e02885f4b..35e0068304e5e 100644 --- a/llvm/test/TableGen/RuntimeLibcallEmitter.td +++ b/llvm/test/TableGen/RuntimeLibcallEmitter.td @@ -13,14 +13,11 @@ def MEMCPY : RuntimeLibcall; def MEMSET : RuntimeLibcall; def CALLOC : RuntimeLibcall; -// Test default names. -let IsDefault = true in { - def __ashlsi3 : RuntimeLibcallImpl<SHL_I32>; - def __lshrdi3 : RuntimeLibcallImpl<SRL_I64>; - - def sqrtl_f128 : RuntimeLibcallImpl<SQRT_F128, "sqrtl">; - def sqrtl_f80 : RuntimeLibcallImpl<SQRT_F80, "sqrtl">; -} +def __ashlsi3 : RuntimeLibcallImpl<SHL_I32>; +def __lshrdi3 : RuntimeLibcallImpl<SRL_I64>; + +def sqrtl_f128 : RuntimeLibcallImpl<SQRT_F128, "sqrtl">; +def sqrtl_f80 : RuntimeLibcallImpl<SQRT_F80, "sqrtl">; // Ignore non-default in initDefaultLibCallNames. def bzero : RuntimeLibcallImpl<BZERO>; diff --git a/llvm/utils/TableGen/Basic/RuntimeLibcalls.cpp b/llvm/utils/TableGen/Basic/RuntimeLibcalls.cpp index 9c4a9107a6849..dfccfca5dbb4d 100644 --- a/llvm/utils/TableGen/Basic/RuntimeLibcalls.cpp +++ b/llvm/utils/TableGen/Basic/RuntimeLibcalls.cpp @@ -69,14 +69,6 @@ RuntimeLibcalls::RuntimeLibcalls(const RecordKeeper &Records) { const RuntimeLibcallImpl &LibCallImpl = RuntimeLibcallImplDefList.back(); Def2RuntimeLibcallImpl[LibCallImplDef] = &LibCallImpl; - - if (LibCallImpl.isDefault()) { - const RuntimeLibcall *Provides = LibCallImpl.getProvides(); - if (!Provides) - PrintFatalError(LibCallImplDef->getLoc(), - "default implementations must provide a libcall"); - LibCallToDefaultImpl[Provides] = &LibCallImpl; - } } } diff --git a/llvm/utils/TableGen/Basic/RuntimeLibcalls.h b/llvm/utils/TableGen/Basic/RuntimeLibcalls.h index 787c6b0d6a360..b296c86ffd111 100644 --- a/llvm/utils/TableGen/Basic/RuntimeLibcalls.h +++ b/llvm/utils/TableGen/Basic/RuntimeLibcalls.h @@ -135,8 +135,6 @@ class RuntimeLibcallImpl { OS << '\"' << getLibcallFuncName() << '\"'; } - bool isDefault() const { return TheDef->getValueAsBit("IsDefault"); } - void emitEnumEntry(raw_ostream &OS) const { OS << "RTLIB::impl_" << this->getName(); } @@ -173,9 +171,6 @@ class RuntimeLibcalls { std::vector<RuntimeLibcall> RuntimeLibcallDefList; std::vector<RuntimeLibcallImpl> RuntimeLibcallImplDefList; - DenseMap<const RuntimeLibcall *, const RuntimeLibcallImpl *> - LibCallToDefaultImpl; - public: RuntimeLibcalls(const RecordKeeper &Records); `````````` </details> https://github.com/llvm/llvm-project/pull/219947 _______________________________________________ llvm-branch-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
