aboutsummaryrefslogtreecommitdiff
path: root/gcc/common
diff options
context:
space:
mode:
authorAndrew Stubbs <ams@codesourcery.com>2019-01-17 12:33:19 +0000
committerAndrew Stubbs <ams@gcc.gnu.org>2019-01-17 12:33:19 +0000
commit5326695a6d3585f5c49633813909342098d1714c (patch)
tree0b323b46ebf2d5431ae2368ba580a0eda11e488c /gcc/common
parent3d6275e30a850b8e8051163bcd43ddbab2273046 (diff)
downloadgcc-5326695a6d3585f5c49633813909342098d1714c.zip
gcc-5326695a6d3585f5c49633813909342098d1714c.tar.gz
gcc-5326695a6d3585f5c49633813909342098d1714c.tar.bz2
GCN back-end code
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. 2019-01-17 Andrew Stubbs <ams@codesourcery.com> Kwok Cheung Yeung <kcy@codesourcery.com> Julian Brown <julian@codesourcery.com> Tom de Vries <tom@codesourcery.com> Jan Hubicka <hubicka@ucw.cz> Martin Jambor <mjambor@suse.cz> 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. Co-Authored-By: Jan Hubicka <hubicka@ucw.cz> Co-Authored-By: Julian Brown <julian@codesourcery.com> Co-Authored-By: Kwok Cheung Yeung <kcy@codesourcery.com> Co-Authored-By: Martin Jambor <mjambor@suse.cz> Co-Authored-By: Tom de Vries <tom@codesourcery.com> From-SVN: r268023
Diffstat (limited to 'gcc/common')
-rw-r--r--gcc/common/config/gcn/gcn-common.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/gcc/common/config/gcn/gcn-common.c b/gcc/common/config/gcn/gcn-common.c
new file mode 100644
index 0000000..f34953d
--- /dev/null
+++ b/gcc/common/config/gcn/gcn-common.c
@@ -0,0 +1,38 @@
+/* Common hooks for GCN
+ Copyright (C) 2016-2019 Free Software Foundation, Inc.
+
+ This file is free software; you can redistribute it and/or modify it under
+ the terms of the GNU General Public License as published by the Free
+ Software Foundation; either version 3 of the License, or (at your option)
+ any later version.
+
+ This file is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING3. If not see
+ <http://www.gnu.org/licenses/>. */
+
+#include "config.h"
+#include "system.h"
+#include "coretypes.h"
+#include "tm.h"
+#include "common/common-target.h"
+#include "common/common-target-def.h"
+#include "opts.h"
+#include "flags.h"
+#include "params.h"
+
+/* Set default optimization options. */
+static const struct default_options gcn_option_optimization_table[] =
+ {
+ { OPT_LEVELS_1_PLUS, OPT_fomit_frame_pointer, NULL, 1 },
+ { OPT_LEVELS_NONE, 0, NULL, 0 }
+ };
+
+#undef TARGET_OPTION_OPTIMIZATION_TABLE
+#define TARGET_OPTION_OPTIMIZATION_TABLE gcn_option_optimization_table
+
+struct gcc_targetm_common targetm_common = TARGETM_COMMON_INITIALIZER;