-
Notifications
You must be signed in to change notification settings - Fork 807
[ESIMD][NFC] Extract ESIMD handling from sycl-post-link to library. #18684
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
Conversation
This change extracts handleESIMD from sycl-post-link to SYCLPostLink component for reuse in NewOffloading compilation flow in clang and for reuse in sycl-jit. The documentation of lowerESIMDConstructs are fixed and the argument name is changed to more straightforward.
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 overall. Minor nit.
I also have a question. Will it be reasonable to add a unittest for testing this functionality?
(location: llvm/unittests)
Not a blocker though.
Thanks
Speaking of the testing, different parts are being tested by LIT tests by |
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! Just a few nits.
Hi @maksimsab |
@intel/llvm-gatekeepers please consider merging |
@maksimsab is this actually ready for merge? |
@intel/llvm-gatekeepers please consider merging |
@maksimsab x2 is this actually ready for merge? |
@sarnex thanks for pointing out! @intel/llvm-gatekeepers Can we merge this please? |
Starting from intel#18684 in debug/release with asserts builds entry points are always dumped in ESIMDPostSplitProcessing. This is meant to be a debugging tool, but now it is spamming build logs. intel#18684 is marked as NFC, so my assumption is that this was unintentional. Guard the dump with a variable (disabled by default) so that it can be enabled for debugging, the same way as it was in sycl-post-link.cpp prior to the code move. FYI: `LLVM_ENABLE_DUMP` is an option documented to > Enable dump functions even when assertions are disabled (from [llvm/CMakeLists.txt:698](https://github.com/llvm/llvm-project/blob/32b1f167fbee28debc7527b939a6764575c854a4/llvm/CMakeLists.txt#L698)) and its typical usage is to guard the definitions of dump functions, e.g.: ```cpp LLVM_DUMP_METHOD void dump() const; ``` and not to guard **calls** to such functions.
Starting from intel#18684 in debug/release with asserts builds entry points are always dumped in ESIMDPostSplitProcessing. This is meant to be a debugging tool, but now it is spamming build logs. intel#18684 is marked as NFC, so my assumption is that this was unintentional. Guard the dump with a variable (disabled by default) so that it can be enabled for debugging, the same way as it was in sycl-post-link.cpp prior to the code move. FYI: `LLVM_ENABLE_DUMP` is an option documented to > Enable dump functions even when assertions are disabled (from [llvm/CMakeLists.txt:698](https://github.com/llvm/llvm-project/blob/32b1f167fbee28debc7527b939a6764575c854a4/llvm/CMakeLists.txt#L698)) and its typical usage is to guard the definitions of dump functions, e.g.: ```cpp class Foo { // ... void dump() const; } ``` and not to guard **calls** to such functions.
…20150) Starting from #18684 in debug/release with asserts builds entry points are always dumped in ESIMDPostSplitProcessing. This is meant to be a debugging tool, but now it is spamming build logs. #18684 is marked as NFC, so my assumption is that this was unintentional. Guard the dump with a variable (disabled by default) so that it can be enabled for debugging, the same way as it was in sycl-post-link.cpp prior to the code move. FYI: `LLVM_ENABLE_DUMP` is an option documented to > Enable dump functions even when assertions are disabled (from [llvm/CMakeLists.txt:698](https://github.com/llvm/llvm-project/blob/32b1f167fbee28debc7527b939a6764575c854a4/llvm/CMakeLists.txt#L698)) and its typical usage is to guard the definitions of dump functions, e.g.: ```cpp class Foo { // ... #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) void dump() const; #endif } ``` and not to guard **calls** to such functions.
This change extracts handleESIMD from sycl-post-link to SYCLPostLink component for reuse in NewOffloading compilation flow in clang and for reuse in sycl-jit.
The body of
handleESIMD
function is refactored for better readability.The documentation of lowerESIMDConstructs is fixed and the argument name is changed to more straightforward.