This patch contains the major part of the GCN back-end. The machine description has been broken out to avoid the mailing list size limit. The back-end contains various bits that support OpenACC and OpenMP, but the middle-end and libgomp patches are missing, as is mkoffload. I include them here because they're harmless and carving up the files seems like unnecessary effort. The remaining offload support will be posted at a later date. The gcn-run.c is a separate tool that can run a GCN program on a GPU using the ROCm drivers and HSA runtime libraries. 2018-11-16 Andrew Stubbs Kwok Cheung Yeung Julian Brown Tom de Vries Jan Hubicka Martin Jambor gcc/ * common/config/gcn/gcn-common.c: New file. * config/gcn/driver-gcn.c: New file. * config/gcn/gcn-builtins.def: New file. * config/gcn/gcn-hsa.h: New file. * config/gcn/gcn-modes.def: New file. * config/gcn/gcn-opts.h: New file. * config/gcn/gcn-passes.def: New file. * config/gcn/gcn-protos.h: New file. * config/gcn/gcn-run.c: New file. * config/gcn/gcn-tree.c: New file. * config/gcn/gcn.c: New file. * config/gcn/gcn.h: New file. * config/gcn/gcn.opt: New file. * config/gcn/t-gcn-hsa: New file. --- gcc/common/config/gcn/gcn-common.c | 38 + gcc/config/gcn/driver-gcn.c | 32 + gcc/config/gcn/gcn-builtins.def | 116 + gcc/config/gcn/gcn-hsa.h | 115 + gcc/config/gcn/gcn-modes.def | 41 + gcc/config/gcn/gcn-opts.h | 36 + gcc/config/gcn/gcn-passes.def | 19 + gcc/config/gcn/gcn-protos.h | 144 + gcc/config/gcn/gcn-run.c | 854 +++++ gcc/config/gcn/gcn-tree.c | 721 +++++ gcc/config/gcn/gcn.c | 6016 ++++++++++++++++++++++++++++++++++++ gcc/config/gcn/gcn.h | 664 ++++ gcc/config/gcn/gcn.opt | 78 + gcc/config/gcn/t-gcn-hsa | 52 + 14 files changed, 8926 insertions(+) create mode 100644 gcc/common/config/gcn/gcn-common.c create mode 100644 gcc/config/gcn/driver-gcn.c create mode 100644 gcc/config/gcn/gcn-builtins.def create mode 100644 gcc/config/gcn/gcn-hsa.h create mode 100644 gcc/config/gcn/gcn-modes.def create mode 100644 gcc/config/gcn/gcn-opts.h create mode 100644 gcc/config/gcn/gcn-passes.def create mode 100644 gcc/config/gcn/gcn-protos.h create mode 100644 gcc/config/gcn/gcn-run.c create mode 100644 gcc/config/gcn/gcn-tree.c create mode 100644 gcc/config/gcn/gcn.c create mode 100644 gcc/config/gcn/gcn.h create mode 100644 gcc/config/gcn/gcn.opt create mode 100644 gcc/config/gcn/t-gcn-hsa