You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[SYCL] Add splitting module capabilities when compiling for NVPTX and AMDGCN (#4107)
The patch allows modules splitting for NVPTX and AMDGCN targets.
As those path needs to rely on existing tool, the approach taken here is
to generate and intercept commands so they can be wrapped by a `llvm-foreach` tool call.
To do that, the patch adds `ForEachWrappingAction` which allows to encapsulate
a set of actions whose underlying commands will be wrapped under a llvm-foreach commands.
During the binding phases, the action will trigger the emission of jobs outside the set,
record the Jobs state then triggers the emission of the jobs inside the set.
The newly added commands are stolen from the Jobs list and
the commands are re-emitted with the llvm-foreach wrapping.
To allow standard clang tools to work properly,
SYCLPostLinkJobAction and FileTableTformJobAction reports
the underlying file type rather than TY_Tempfilelist or TY_tempfiletable
for those targets. Otherwise tools get confused as they don't know how to process the input.
To not make this patch too large, I maintained the SPIR-V path behaviour as it is, meaning the list of actions are not set up in the same way nor does it uses the `ForEachWrappingAction`. Otherwise there is a long list of test to update.
Signed-off-by: Victor Lomuller <[email protected]>
0 commit comments