Skip to content

Commit 39acfa7

Browse files
committed
Merge remote-tracking branch 'origin/sycl' into ben/command-handle-ur-tag
2 parents 92b5f52 + 642c96a commit 39acfa7

File tree

411 files changed

+6765
-2677
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

411 files changed

+6765
-2677
lines changed

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
fetch-depth: 1
6666
- name: Get subprojects that have doc changes
6767
id: docs-changed-subprojects
68-
uses: tj-actions/changed-files@v44
68+
uses: tj-actions/changed-files@v45
6969
with:
7070
files_yaml: |
7171
llvm:

.github/workflows/pr-code-format.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232

3333
- name: Get changed files
3434
id: changed-files
35-
uses: tj-actions/changed-files@v44
35+
uses: tj-actions/changed-files@v45
3636
with:
3737
separator: ","
3838
skip_initial_fetch: true

.github/workflows/release-binaries.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ jobs:
428428

429429
- name: Attest Build Provenance
430430
id: provenance
431-
uses: actions/attest-build-provenance@897ed5eab6ed058a474202017ada7f40bfa52940 # v1.0.0
431+
uses: actions/attest-build-provenance@1c608d11d69870c2092266b3f9a6f3abbf17002c # v1.4.3
432432
with:
433433
subject-path: ${{ needs.prepare.outputs.release-binary-filename }}
434434

.github/workflows/release-sources.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ jobs:
9292
- name: Attest Build Provenance
9393
if: github.event_name != 'pull_request'
9494
id: provenance
95-
uses: actions/attest-build-provenance@897ed5eab6ed058a474202017ada7f40bfa52940 # v1.0.0
95+
uses: actions/attest-build-provenance@1c608d11d69870c2092266b3f9a6f3abbf17002c # v1.4.3
9696
with:
9797
subject-path: "*.xz"
9898
- if: github.event_name != 'pull_request'

.github/workflows/scorecard.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
persist-credentials: false
3737

3838
- name: "Run analysis"
39-
uses: ossf/scorecard-action@dc50aa9510b46c811795eb24b2f1ba02a914e534 # v2.3.3
39+
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
4040
with:
4141
results_file: results.sarif
4242
results_format: sarif
@@ -57,6 +57,6 @@ jobs:
5757

5858
# Upload the results to GitHub's code scanning dashboard.
5959
- name: "Upload to code-scanning"
60-
uses: github/codeql-action/upload-sarif@b611370bb5703a7efb587f9d136a52ea24c5c38c # v3.25.11
60+
uses: github/codeql-action/upload-sarif@e2b3eafc8d227b0241d48be5f425d47c2d750a13 # v3.26.10
6161
with:
6262
sarif_file: results.sarif

.github/workflows/sycl-linux-run-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ permissions:
151151

152152
jobs:
153153
run:
154-
if: inputs.skip_run == 'false'
154+
if: github.event_name == 'workflow_dispatch' || inputs.skip_run == 'false'
155155
name: ${{ inputs.name }}
156156
runs-on: ${{ fromJSON(inputs.runner) }}
157157
container:

.github/workflows/sycl-nightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ jobs:
198198
echo "TAG=$(date +'%Y-%m-%d')-${GITHUB_SHA::7}" >> "$GITHUB_OUTPUT"
199199
fi
200200
- name: Upload binaries
201-
uses: softprops/action-gh-release@a74c6b72af54cfa997e81df42d94703d6313a2d0
201+
uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191
202202
with:
203203
files: |
204204
sycl_linux.tar.gz

clang/include/clang/Driver/ToolChain.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -781,6 +781,10 @@ class ToolChain {
781781
virtual void AddHIPIncludeArgs(const llvm::opt::ArgList &DriverArgs,
782782
llvm::opt::ArgStringList &CC1Args) const;
783783

784+
/// Add arguments to use SYCL specific includes.
785+
virtual void AddSYCLIncludeArgs(const llvm::opt::ArgList &DriverArgs,
786+
llvm::opt::ArgStringList &CC1Args) const;
787+
784788
/// Add arguments to use MCU GCC toolchain includes.
785789
virtual void AddIAMCUIncludeArgs(const llvm::opt::ArgList &DriverArgs,
786790
llvm::opt::ArgStringList &CC1Args) const;

clang/lib/Driver/Driver.cpp

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6786,13 +6786,10 @@ class OffloadingActionBuilder final {
67866786
// Do not use unbundler if the Host does not depend on device action.
67876787
// Now that we have unbundled the object, when doing -fsycl-link we
67886788
// want to continue the host link with the input object.
6789-
// For unbundling of an FPGA AOCX binary, we want to link with the original
6790-
// FPGA device archive.
67916789
if ((OffloadKind == Action::OFK_None && CanUseBundler) ||
67926790
(Args.hasArg(options::OPT_fsycl_link_EQ) && !HasFPGATarget) ||
67936791
(HasFPGATarget && ((Args.hasArg(options::OPT_fsycl_link_EQ) &&
6794-
HostAction->getType() == types::TY_Object) ||
6795-
HostAction->getType() == types::TY_FPGA_AOCX)))
6792+
HostAction->getType() == types::TY_Object))))
67966793
if (auto *UA = dyn_cast<OffloadUnbundlingJobAction>(HostAction))
67976794
HostAction = UA->getInputs().back();
67986795

@@ -7443,16 +7440,36 @@ void Driver::BuildActions(Compilation &C, DerivedArgList &Args,
74437440

74447441
// For an FPGA archive, we add the unbundling step above to take care of
74457442
// the device side, but also unbundle here to extract the host side
7446-
bool EarlyLink = false;
7447-
if (const Arg *A = Args.getLastArg(options::OPT_fsycl_link_EQ))
7448-
EarlyLink = A->getValue() == StringRef("early");
74497443
for (auto &LI : LinkerInputs) {
74507444
Action *UnbundlerInput = nullptr;
74517445
auto wrapObject = [&] {
7452-
if (EarlyLink && Args.hasArg(options::OPT_fintelfpga)) {
7453-
// Only wrap the object with -fsycl-link=early
7454-
auto *BC = C.MakeAction<OffloadWrapperJobAction>(LI, types::TY_LLVM_BC);
7455-
auto *ASM = C.MakeAction<BackendJobAction>(BC, types::TY_PP_Asm);
7446+
if (Args.hasArg(options::OPT_fsycl_link_EQ) &&
7447+
Args.hasArg(options::OPT_fintelfpga)) {
7448+
// Wrap the object when creating an FPGA AOCX or AOCR binary.
7449+
// When the input file is an AOCR (early) archive, the unbundled host
7450+
// binary consists of a list of objects. We cannot directly wrap that
7451+
// binary to be consumed later - this has to go through each listed
7452+
// object.
7453+
bool FPGAEarly = true;
7454+
if (auto *A = C.getInputArgs().getLastArg(options::OPT_fsycl_link_EQ))
7455+
FPGAEarly = A->getValue() == StringRef("early");
7456+
7457+
Action *WrapperAction;
7458+
if ((LI->getType() == types::TY_FPGA_AOCR ||
7459+
LI->getType() == types::TY_FPGA_AOCR_EMU) &&
7460+
!FPGAEarly) {
7461+
auto *RenameAction = C.MakeAction<FileTableTformJobAction>(
7462+
LI, types::TY_Tempfilelist, types::TY_Tempfilelist);
7463+
RenameAction->addRenameColumnTform(FileTableTformJobAction::COL_ZERO,
7464+
FileTableTformJobAction::COL_CODE);
7465+
ActionList WrapperItems({RenameAction});
7466+
WrapperAction = C.MakeAction<OffloadWrapperJobAction>(
7467+
WrapperItems, types::TY_LLVM_BC);
7468+
} else
7469+
WrapperAction =
7470+
C.MakeAction<OffloadWrapperJobAction>(LI, types::TY_LLVM_BC);
7471+
auto *ASM =
7472+
C.MakeAction<BackendJobAction>(WrapperAction, types::TY_PP_Asm);
74567473
auto *OBJ = C.MakeAction<AssembleJobAction>(ASM, types::TY_Object);
74577474
OffloadAction::HostDependence HDep(
74587475
*OBJ, *C.getSingleOffloadToolChain<Action::OFK_Host>(),

clang/lib/Driver/ToolChain.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1519,6 +1519,9 @@ void ToolChain::AddCudaIncludeArgs(const ArgList &DriverArgs,
15191519
void ToolChain::AddHIPIncludeArgs(const ArgList &DriverArgs,
15201520
ArgStringList &CC1Args) const {}
15211521

1522+
void ToolChain::AddSYCLIncludeArgs(const ArgList &DriverArgs,
1523+
ArgStringList &CC1Args) const {}
1524+
15221525
llvm::SmallVector<ToolChain::BitCodeLibraryInfo, 12>
15231526
ToolChain::getDeviceLibs(
15241527
const ArgList &DriverArgs,

0 commit comments

Comments
 (0)