@@ -5432,6 +5432,52 @@ class OffloadingActionBuilder final {
54325432 BundlingActions, types::TY_Object);
54335433 if (auto *OWA = dyn_cast<OffloadWrapperJobAction>(DeviceAction))
54345434 OWA->setOffloadKind (Action::OFK_Host);
5435+ // The Backend compilation step performed here is being done for
5436+ // creating FPGA archives. The possible split binaries after
5437+ // sycl-post-link need to be individually wrapped as opposed to
5438+ // being passed into the clang-offload-wrapper via a table and
5439+ // using the -batch option - effectively creating a single
5440+ // binary. The resulting archive created from -fsycl-link should
5441+ // not contain the singular binary, but should be individual
5442+ // binaries to be consumed later by either the -fsycl-link=image
5443+ // device compilation step or being linked into the final exe.
5444+ //
5445+ // Typical compile flow:
5446+ // .bc
5447+ // |
5448+ // sycl-post-link -split=kernel
5449+ // |
5450+ // +--------+--------+
5451+ // | | |
5452+ // split1 split2 split3
5453+ // | | |
5454+ // llvm-spirv llvm-spirv llvm-spirv
5455+ // | | |
5456+ // ocloc ocloc ocloc
5457+ // | | |
5458+ // +--------+--------+
5459+ // |
5460+ // clang-offload-wrapper -batch
5461+ // |
5462+ // .o
5463+ //
5464+ // Individual wrap compile flow:
5465+ // .bc
5466+ // |
5467+ // sycl-post-link -split=kernel
5468+ // |
5469+ // +--------+--------+
5470+ // | | |
5471+ // split1 split2 split3
5472+ // | | |
5473+ // llvm-spirv llvm-spirv llvm-spirv
5474+ // | | |
5475+ // ocloc ocloc ocloc
5476+ // | | |
5477+ // wrap wrap wrap
5478+ // | | |
5479+ // .o .o .o
5480+ //
54355481 Action *CompiledDeviceAction =
54365482 C.MakeAction <OffloadWrapperJobAction>(FPGAAOTAction,
54375483 types::TY_Tempfilelist);
0 commit comments