-
Notifications
You must be signed in to change notification settings - Fork 14.4k
RuntimeLibcalls: Cleanup darwin bzero configuration #145639
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
RuntimeLibcalls: Cleanup darwin bzero configuration #145639
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
@llvm/pr-subscribers-backend-aarch64 Author: Matt Arsenault (arsenm) ChangesWrite this in a more predicate-apply style instead of the Full diff: https://github.com/llvm/llvm-project/pull/145639.diff 1 Files Affected:
diff --git a/llvm/lib/IR/RuntimeLibcalls.cpp b/llvm/lib/IR/RuntimeLibcalls.cpp
index cb8c8457f5a47..5c01d8595d0f9 100644
--- a/llvm/lib/IR/RuntimeLibcalls.cpp
+++ b/llvm/lib/IR/RuntimeLibcalls.cpp
@@ -432,19 +432,11 @@ void RuntimeLibcallsInfo::initLibcalls(const Triple &TT,
setLibcallName(RTLIB::FPROUND_F32_F16, "__truncsfhf2");
// Some darwins have an optimized __bzero/bzero function.
- switch (TT.getArch()) {
- case Triple::x86:
- case Triple::x86_64:
+ if (TT.isX86()) {
if (TT.isMacOSX() && !TT.isMacOSXVersionLT(10, 6))
setLibcallName(RTLIB::BZERO, "__bzero");
- break;
- case Triple::aarch64:
- case Triple::aarch64_32:
+ } else if (TT.isAArch64())
setLibcallName(RTLIB::BZERO, "bzero");
- break;
- default:
- break;
- }
if (darwinHasSinCosStret(TT)) {
setLibcallName(RTLIB::SINCOS_STRET_F32, "__sincosf_stret");
|
@llvm/pr-subscribers-llvm-ir Author: Matt Arsenault (arsenm) ChangesWrite this in a more predicate-apply style instead of the Full diff: https://github.com/llvm/llvm-project/pull/145639.diff 1 Files Affected:
diff --git a/llvm/lib/IR/RuntimeLibcalls.cpp b/llvm/lib/IR/RuntimeLibcalls.cpp
index cb8c8457f5a47..5c01d8595d0f9 100644
--- a/llvm/lib/IR/RuntimeLibcalls.cpp
+++ b/llvm/lib/IR/RuntimeLibcalls.cpp
@@ -432,19 +432,11 @@ void RuntimeLibcallsInfo::initLibcalls(const Triple &TT,
setLibcallName(RTLIB::FPROUND_F32_F16, "__truncsfhf2");
// Some darwins have an optimized __bzero/bzero function.
- switch (TT.getArch()) {
- case Triple::x86:
- case Triple::x86_64:
+ if (TT.isX86()) {
if (TT.isMacOSX() && !TT.isMacOSXVersionLT(10, 6))
setLibcallName(RTLIB::BZERO, "__bzero");
- break;
- case Triple::aarch64:
- case Triple::aarch64_32:
+ } else if (TT.isAArch64())
setLibcallName(RTLIB::BZERO, "bzero");
- break;
- default:
- break;
- }
if (darwinHasSinCosStret(TT)) {
setLibcallName(RTLIB::SINCOS_STRET_F32, "__sincosf_stret");
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks
2fdd403
to
9eebced
Compare
5266f79
to
56a5cab
Compare
56a5cab
to
c975ea8
Compare
Write this in a more predicate-apply style instead of the switch.
9eebced
to
ae0b97b
Compare
Write this in a more predicate-apply style instead of the switch.
Write this in a more predicate-apply style instead of the switch.
Write this in a more predicate-apply style instead of the
switch.