Skip to content

[Driver][NFC] Check pointer Arg before dereferencing. - #21287

Merged
againull merged 3 commits into
intel:syclfrom
srividya-sundaram:optimize-lto-diags
Feb 20, 2026
Merged

[Driver][NFC] Check pointer Arg before dereferencing.#21287
againull merged 3 commits into
intel:syclfrom
srividya-sundaram:optimize-lto-diags

Conversation

@srividya-sundaram

Copy link
Copy Markdown
Contributor

Addresses: #21282

Arg *SYCLSplitMode =
Args.getLastArg(options::OPT_fsycl_device_code_split_EQ);
Arg *OffloadLTO = Args.getLastArg(options::OPT_foffload_lto,
options::OPT_foffload_lto_EQ);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like something that would benefit the community as it isn't specific to SYCL. Would this be better to just upstream instead of doing intel/llvm?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are to SYCL specific checks here before some of these diagnostics are emitted (like SYCLSplitMode). Unless I am mis-understanding what you are referring to.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, there are SYCL specific things here, but the fix itself can be applied to upstream and be pulled into intel/llvm as it also impacts OpenMP upstream behaviors.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but the fix itself can be applied to upstream and be pulled into intel/llvm as it also impacts OpenMP upstream behaviors.

err_drv_sycl_thinlto_split_off is specific to intel/llvm only and is therefore handled here, while the other two diagnostics are addressed in the upstream patch.

@mdtoguchi mdtoguchi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actions

Copy link
Copy Markdown
Contributor

@intel/llvm-gatekeepers please consider merging

1 similar comment
@github-actions

Copy link
Copy Markdown
Contributor

@intel/llvm-gatekeepers please consider merging

@srividya-sundaram

Copy link
Copy Markdown
Contributor Author

@intel/llvm-gatekeepers Please help merging. Thanks.

@againull
againull merged commit 0de930d into intel:sycl Feb 20, 2026
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants