Skip to content
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

Revert "[TLI] Add support for hypot libcall." #114312

Merged
merged 1 commit into from
Oct 30, 2024
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
15 changes: 0 additions & 15 deletions llvm/include/llvm/Analysis/TargetLibraryInfo.def
Original file line number Diff line number Diff line change
Expand Up @@ -1671,21 +1671,6 @@ TLI_DEFINE_ENUM_INTERNAL(htons)
TLI_DEFINE_STRING_INTERNAL("htons")
TLI_DEFINE_SIG_INTERNAL(Int16, Int16)

/// double hypot(double x, double y);
TLI_DEFINE_ENUM_INTERNAL(hypot)
TLI_DEFINE_STRING_INTERNAL("hypot")
TLI_DEFINE_SIG_INTERNAL(Dbl, Dbl, Dbl)

/// float hypotf(float x, float y);
TLI_DEFINE_ENUM_INTERNAL(hypotf)
TLI_DEFINE_STRING_INTERNAL("hypotf")
TLI_DEFINE_SIG_INTERNAL(Flt, Flt, Flt)

/// long double hypotl(long double x, long double y);
TLI_DEFINE_ENUM_INTERNAL(hypotl)
TLI_DEFINE_STRING_INTERNAL("hypotl")
TLI_DEFINE_SIG_INTERNAL(LDbl, LDbl, LDbl)

/// int iprintf(const char *format, ...);
TLI_DEFINE_ENUM_INTERNAL(iprintf)
TLI_DEFINE_STRING_INTERNAL("iprintf")
Expand Down
2 changes: 0 additions & 2 deletions llvm/lib/Analysis/TargetLibraryInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,6 @@ static void initializeLibCalls(TargetLibraryInfoImpl &TLI, const Triple &T,
TLI.setUnavailable(LibFunc_expf);
TLI.setUnavailable(LibFunc_floorf);
TLI.setUnavailable(LibFunc_fmodf);
TLI.setUnavailable(LibFunc_hypotf);
TLI.setUnavailable(LibFunc_log10f);
TLI.setUnavailable(LibFunc_logf);
TLI.setUnavailable(LibFunc_modff);
Expand Down Expand Up @@ -332,7 +331,6 @@ static void initializeLibCalls(TargetLibraryInfoImpl &TLI, const Triple &T,
TLI.setUnavailable(LibFunc_floorl);
TLI.setUnavailable(LibFunc_fmodl);
TLI.setUnavailable(LibFunc_frexpl);
TLI.setUnavailable(LibFunc_hypotl);
TLI.setUnavailable(LibFunc_ldexpl);
TLI.setUnavailable(LibFunc_log10l);
TLI.setUnavailable(LibFunc_logl);
Expand Down
3 changes: 0 additions & 3 deletions llvm/lib/Transforms/Utils/BuildLibCalls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1215,9 +1215,6 @@ bool llvm::inferNonMandatoryLibFuncAttrs(Function &F,
case LibFunc_fmod:
case LibFunc_fmodf:
case LibFunc_fmodl:
case LibFunc_hypot:
case LibFunc_hypotf:
case LibFunc_hypotl:
case LibFunc_isascii:
case LibFunc_isdigit:
case LibFunc_labs:
Expand Down
9 changes: 0 additions & 9 deletions llvm/test/Transforms/InferFunctionAttrs/annotate.ll
Original file line number Diff line number Diff line change
Expand Up @@ -589,15 +589,6 @@ declare ptr @gets(ptr)
; CHECK: declare noundef i32 @gettimeofday(ptr nocapture noundef, ptr nocapture noundef) [[NOFREE_NOUNWIND]]
declare i32 @gettimeofday(ptr, ptr)

; CHECK: declare double @hypot(double, double) [[NOFREE_NOUNWIND_WILLRETURN_WRITEONLY]]
declare double @hypot(double, double)

; CHECK: declare float @hypotf(float, float) [[NOFREE_NOUNWIND_WILLRETURN_WRITEONLY]]
declare float @hypotf(float, float)

; CHECK: declare x86_fp80 @hypotl(x86_fp80, x86_fp80) [[NOFREE_NOUNWIND_WILLRETURN_WRITEONLY]]
declare x86_fp80 @hypotl(x86_fp80, x86_fp80)

; CHECK: declare i32 @isascii(i32) [[NOFREE_NOUNWIND_WILLRETURN_WRITEONLY]]
declare i32 @isascii(i32)

Expand Down
12 changes: 0 additions & 12 deletions llvm/test/tools/llvm-tli-checker/ps4-tli-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -602,18 +602,6 @@ DynamicSymbols:
Type: STT_FUNC
Section: .text
Binding: STB_GLOBAL
- Name: hypot
Type: STT_FUNC
Section: .text
Binding: STB_GLOBAL
- Name: hypotf
Type: STT_FUNC
Section: .text
Binding: STB_GLOBAL
- Name: hypotl
Type: STT_FUNC
Section: .text
Binding: STB_GLOBAL
- Name: isdigit
Type: STT_FUNC
Section: .text
Expand Down
3 changes: 0 additions & 3 deletions llvm/unittests/Analysis/TargetLibraryInfoTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,6 @@ TEST_F(TargetLibraryInfoTest, ValidProto) {
"declare %struct* @getpwnam(i8*)\n"
"declare i8* @gets(i8*)\n"
"declare i32 @gettimeofday(%struct*, i8*)\n"
"declare double @hypot(double, double)\n"
"declare float @hypotf(float, float)\n"
"declare x86_fp80 @hypotl(x86_fp80, x86_fp80)\n"
"declare i32 @_Z7isasciii(i32)\n"
"declare i32 @_Z7isdigiti(i32)\n"
"declare i64 @labs(i64)\n"
Expand Down
Loading