Skip to content
Snippets Groups Projects
Commit db2e9a2a authored by Prathamesh Kulkarni's avatar Prathamesh Kulkarni
Browse files

[optc-save-gen.awk] Fix streaming of command line options for offloading.


The patch modifies optc-save-gen.awk to generate if (!lto_stream_offload_p)
check before streaming out target-specific opt in cl_optimization_stream_out,
when offloading is enabled.

Also, it modifies cl_optimization_stream_in to issue an error during build time
if accelerator backend defines a target-specific Optimization option. This
restriction currently is in place to maintain consistency for streaming of
Optimization options between host and accelerator. A proper fix would be
to merge target-specific Optimization options for host and accelerators
enabled for offloading.

gcc/ChangeLog:
	* optc-save-gen.awk: New array var_target_opt. Use it to generate
	if (!lto_stream_offload_p) check in cl_optimization_stream_out,
	and generate a diagnostic with #error if accelerator backend uses
	Optimization for target-specifc options in cl_optimization_stream_in.

Signed-off-by: default avatarPrathamesh Kulkarni <prathameshk@nvidia.com>
parent c1a53d9d
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment