On 16/05/2022 11:28, Tobias Burnus wrote:
While 'vendor' and 'kind' is well defined, 'arch' and 'isa' isn't.
When looking at an 'metadirective' testcase (which oddly uses 'arch(amd)'),
I noticed that LLVM uses 'arch(amdgcn)' while we use 'gcn', cf. e.g.
'clang/lib/Headers/openmp_wrappers/math.h'.
(Side note: we use the target triplet amdgcn-amdhsa and LLVM uses
amdgcn-amd-amdhsa.)
Given the target triplet, the LLVM choice seems to make more sense; 'gcn'
only shows up as directory name (under gcc/config + libgomp/).
Thus, I think we have two options:
* Either also change to (only) 'amdgcn' - given that the supported arch()
values are neither documented not yet widely used.
* Or add 'amdgcn' alongside 'gcn' - which is what the attached patch does.
Which option do you prefer? Other thoughts?
As long as this remains backwards compatible and fixes your problem,
accepting everything that might occur is fine with me. I don't think
trying to pick one is realistic; whatever we choose, there'll always be
some other toolchain doing something different.
Andrew