-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[APFloat] Add exp function for APFloat::IEEESsingle using expf implementation from LLVM libc. #143959
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
base: main
Are you sure you want to change the base?
[APFloat] Add exp function for APFloat::IEEESsingle using expf implementation from LLVM libc. #143959
Changes from all commits
aeaac93
32f6609
d43491b
f134cb7
d18947d
79ee1b5
b1ea332
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -379,3 +379,9 @@ if(LLVM_WITH_Z3) | |
${Z3_INCLUDE_DIR} | ||
) | ||
endif() | ||
|
||
if(LLVM_INTEGRATE_LIBC) | ||
set_property(TARGET LLVMSupport PROPERTY CXX_STANDARD 17) | ||
target_include_directories(LLVMSupport PRIVATE "${LLVM_INCLUDE_DIR}/../../libc") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tested this build locally, and somehow the way this was declared caused a fatal include error trying to build APFloat.cpp, complaining that it couldn't find shared/math.h There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's ugly but maybe we can have these return std::optional and just fail out if the support wasn't built? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd expect that this would become a required dependency before we can actually start using it somewhere. |
||
target_compile_options(LLVMSupport PRIVATE "-Wno-c99-extensions") # _Complex warnings. | ||
endif() |
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.
Use the pragma to enable fenv_access?
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.
Done.
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.
I would still be more comfortable if you just add an exp implementation with a template argument for the rounding mode, and didn't use fenv access anywhere in the stack. This has just merely shuffled the problem into the libc code directly