-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
+0
−44
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This reverts commit feb2d86.
@llvm/pr-subscribers-llvm-analysis Author: None (gulfemsavrun) ChangesReverts llvm/llvm-project#113724 Full diff: https://github.com/llvm/llvm-project/pull/114312.diff 6 Files Affected:
diff --git a/llvm/include/llvm/Analysis/TargetLibraryInfo.def b/llvm/include/llvm/Analysis/TargetLibraryInfo.def
index fd53a26ef8fc11b..3e23e398f6a7976 100644
--- a/llvm/include/llvm/Analysis/TargetLibraryInfo.def
+++ b/llvm/include/llvm/Analysis/TargetLibraryInfo.def
@@ -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")
diff --git a/llvm/lib/Analysis/TargetLibraryInfo.cpp b/llvm/lib/Analysis/TargetLibraryInfo.cpp
index 7f0b98ab3c1514a..0ee83d217a5001e 100644
--- a/llvm/lib/Analysis/TargetLibraryInfo.cpp
+++ b/llvm/lib/Analysis/TargetLibraryInfo.cpp
@@ -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);
@@ -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);
diff --git a/llvm/lib/Transforms/Utils/BuildLibCalls.cpp b/llvm/lib/Transforms/Utils/BuildLibCalls.cpp
index e039457f313b29e..5fd4fd78c28a953 100644
--- a/llvm/lib/Transforms/Utils/BuildLibCalls.cpp
+++ b/llvm/lib/Transforms/Utils/BuildLibCalls.cpp
@@ -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:
diff --git a/llvm/test/Transforms/InferFunctionAttrs/annotate.ll b/llvm/test/Transforms/InferFunctionAttrs/annotate.ll
index 452d90aa98d88df..d8266f4c6703dd6 100644
--- a/llvm/test/Transforms/InferFunctionAttrs/annotate.ll
+++ b/llvm/test/Transforms/InferFunctionAttrs/annotate.ll
@@ -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)
diff --git a/llvm/test/tools/llvm-tli-checker/ps4-tli-check.yaml b/llvm/test/tools/llvm-tli-checker/ps4-tli-check.yaml
index d52f3c751b06695..408b9c39934286f 100644
--- a/llvm/test/tools/llvm-tli-checker/ps4-tli-check.yaml
+++ b/llvm/test/tools/llvm-tli-checker/ps4-tli-check.yaml
@@ -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
diff --git a/llvm/unittests/Analysis/TargetLibraryInfoTest.cpp b/llvm/unittests/Analysis/TargetLibraryInfoTest.cpp
index 982d00c5d335932..98f8989d4e6e9e9 100644
--- a/llvm/unittests/Analysis/TargetLibraryInfoTest.cpp
+++ b/llvm/unittests/Analysis/TargetLibraryInfoTest.cpp
@@ -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"
|
@llvm/pr-subscribers-llvm-transforms Author: None (gulfemsavrun) ChangesReverts llvm/llvm-project#113724 Full diff: https://github.com/llvm/llvm-project/pull/114312.diff 6 Files Affected:
diff --git a/llvm/include/llvm/Analysis/TargetLibraryInfo.def b/llvm/include/llvm/Analysis/TargetLibraryInfo.def
index fd53a26ef8fc11b..3e23e398f6a7976 100644
--- a/llvm/include/llvm/Analysis/TargetLibraryInfo.def
+++ b/llvm/include/llvm/Analysis/TargetLibraryInfo.def
@@ -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")
diff --git a/llvm/lib/Analysis/TargetLibraryInfo.cpp b/llvm/lib/Analysis/TargetLibraryInfo.cpp
index 7f0b98ab3c1514a..0ee83d217a5001e 100644
--- a/llvm/lib/Analysis/TargetLibraryInfo.cpp
+++ b/llvm/lib/Analysis/TargetLibraryInfo.cpp
@@ -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);
@@ -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);
diff --git a/llvm/lib/Transforms/Utils/BuildLibCalls.cpp b/llvm/lib/Transforms/Utils/BuildLibCalls.cpp
index e039457f313b29e..5fd4fd78c28a953 100644
--- a/llvm/lib/Transforms/Utils/BuildLibCalls.cpp
+++ b/llvm/lib/Transforms/Utils/BuildLibCalls.cpp
@@ -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:
diff --git a/llvm/test/Transforms/InferFunctionAttrs/annotate.ll b/llvm/test/Transforms/InferFunctionAttrs/annotate.ll
index 452d90aa98d88df..d8266f4c6703dd6 100644
--- a/llvm/test/Transforms/InferFunctionAttrs/annotate.ll
+++ b/llvm/test/Transforms/InferFunctionAttrs/annotate.ll
@@ -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)
diff --git a/llvm/test/tools/llvm-tli-checker/ps4-tli-check.yaml b/llvm/test/tools/llvm-tli-checker/ps4-tli-check.yaml
index d52f3c751b06695..408b9c39934286f 100644
--- a/llvm/test/tools/llvm-tli-checker/ps4-tli-check.yaml
+++ b/llvm/test/tools/llvm-tli-checker/ps4-tli-check.yaml
@@ -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
diff --git a/llvm/unittests/Analysis/TargetLibraryInfoTest.cpp b/llvm/unittests/Analysis/TargetLibraryInfoTest.cpp
index 982d00c5d335932..98f8989d4e6e9e9 100644
--- a/llvm/unittests/Analysis/TargetLibraryInfoTest.cpp
+++ b/llvm/unittests/Analysis/TargetLibraryInfoTest.cpp
@@ -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"
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reverts #113724