-
Notifications
You must be signed in to change notification settings - Fork 794
[SYCL] Option to disable alloca address space for sret arguments #17976
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 9 commits
dbe18de
53d4d29
5e569a7
9d98cde
3c3ad27
4dee04d
408135b
c790e52
78901db
ee42c37
ad66fb3
54f722a
04b377d
0c4b489
6760adb
8edcba2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8827,6 +8827,11 @@ def fsycl_is_native_cpu : Flag<["-"], "fsycl-is-native-cpu">, | |
| HelpText<"Perform device compilation for Native CPU.">, | ||
| Visibility<[CC1Option]>, | ||
| MarshallingInfoFlag<LangOpts<"SYCLIsNativeCPU">>; | ||
| defm offload_use_alloca_addrspace_for_srets : BoolFOption<"offload-use-alloca-addrspace-for-srets", | ||
| CodeGenOpts<"UseAllocaASForSrets">, | ||
| DefaultTrue, | ||
| PosFlag<SetTrue, [], [CC1Option], "Use alloca address space for sret arguments for offloading targets">, | ||
| NegFlag<SetFalse>>; | ||
|
Comment on lines
+8832
to
+8836
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Per the
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure, will do.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks! Looks good. |
||
|
|
||
| } // let Visibility = [CC1Option] | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5811,6 +5811,11 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, | |
|
|
||
| CmdArgs.push_back("-fsycl-optimize-non-user-code"); | ||
| } | ||
|
|
||
|
||
| // Disable this option for SYCL by default. | ||
| // TODO: This needs to be re-enabled once we have a real fix. | ||
| CmdArgs.push_back("-fno-offload-use-alloca-addrspace-for-srets"); | ||
|
|
||
|
||
| // Add any predefined macros associated with intel_gpu* type targets | ||
| // passed in with -fsycl-targets | ||
| // TODO: Macros are populated during device compilations and saved for | ||
|
|
@@ -6364,6 +6369,10 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, | |
| Args.addOptOutFlag(CmdArgs, options::OPT_foptimize_sibling_calls, | ||
| options::OPT_fno_optimize_sibling_calls); | ||
|
|
||
| Args.addOptOutFlag(CmdArgs, | ||
| options::OPT_foffload_use_alloca_addrspace_for_srets, | ||
| options::OPT_fno_offload_use_alloca_addrspace_for_srets); | ||
|
|
||
| RenderFloatingPointOptions(TC, D, isOptimizationLevelFast(Args), Args, | ||
| CmdArgs, JA, NoOffloadFP32PrecDiv, | ||
| NoOffloadFP32PrecSqrt); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per the
TODOmessage inclang/lib/Driver/ToolChains/Clang.cppregarding a temporary fix, should there likewise be a comment here that this CG option is temporary? Or is this part of what will be a permanent fix?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough, I will add it here too.