-
Notifications
You must be signed in to change notification settings - Fork 15.4k
[clang][flang][Triple][llvm] Add isOffload function to LangOpts and isGPU function to Triple #126956
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
[clang][flang][Triple][llvm] Add isOffload function to LangOpts and isGPU function to Triple #126956
Changes from 1 commit
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 |
|---|---|---|
|
|
@@ -4357,6 +4357,10 @@ bool CompilerInvocation::ParseLangArgs(LangOptions &Opts, ArgList &Args, | |
| Opts.OpenACCMacroOverride = A->getValue(); | ||
| } | ||
|
|
||
| Opts.IsOffloadingTarget = | ||
| (Opts.OpenMPIsTargetDevice || Opts.SYCLIsDevice || Opts.CUDAIsDevice) && | ||
|
||
| (T.isNVPTX() || T.isAMDGCN() || T.isSPIROrSPIRV()); | ||
|
|
||
| // FIXME: Eliminate this dependency. | ||
| unsigned Opt = getOptimizationLevel(Args, IK, Diags), | ||
| OptSize = getOptimizationLevelSize(Args); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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.
here (and a few other places) we were checking for
AMDGCN, but the new code checks forAMDGPU.im not sure if theyre basically interchangeable in offloading code, or if i need to be careful, or if the existing code is wrong and we should be using one or the other everywhere
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.
@arsenm
Uh oh!
There was an error while loading. Please reload this page.
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.
tThey are functionally equivalent given that r600 is essentially dead and doesn't support any offload languages. But probably should stick to amdgpu
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.
Think we should do a
sed s/isAMDGCN()/isAMDGPU()/gat some point?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.
probably
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.
thanks, so new code seems fine then