aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/alpha
diff options
context:
space:
mode:
authorUros Bizjak <uros@gcc.gnu.org>2016-10-11 18:30:45 +0200
committerUros Bizjak <uros@gcc.gnu.org>2016-10-11 18:30:45 +0200
commita32fc2165b93b4ff31fb35d17afd6701de35721e (patch)
tree19b10bcf8eed18910727210af7824f766fed214b /gcc/config/alpha
parent66d76fc91e78c98c75ad9ef7f11758fc68988172 (diff)
downloadgcc-a32fc2165b93b4ff31fb35d17afd6701de35721e.zip
gcc-a32fc2165b93b4ff31fb35d17afd6701de35721e.tar.gz
gcc-a32fc2165b93b4ff31fb35d17afd6701de35721e.tar.bz2
alpha-passes.def: New file.
* config/alpha/alpha-passes.def: New file. * config/alpha/t-alpha: New file. * config/alpha/alpha-protos.h (gcc::context, rtl_opt_pass): Declare. (make_pass_handle_trap_shadows): New prototype. (make_pass_align_insns): Ditto. * config/alpha/alpha.c (alpha_option_override): Don't register passes here. * config.gcc (alpha*-*-*) Add alpha/t-alpha to tmake_file. From-SVN: r240996
Diffstat (limited to 'gcc/config/alpha')
-rw-r--r--gcc/config/alpha/alpha-passes.def21
-rw-r--r--gcc/config/alpha/alpha-protos.h6
-rw-r--r--gcc/config/alpha/alpha.c15
-rw-r--r--gcc/config/alpha/t-alpha19
4 files changed, 46 insertions, 15 deletions
diff --git a/gcc/config/alpha/alpha-passes.def b/gcc/config/alpha/alpha-passes.def
new file mode 100644
index 0000000..d960e7c
--- /dev/null
+++ b/gcc/config/alpha/alpha-passes.def
@@ -0,0 +1,21 @@
+/* Description of target passes for DEC Alpha
+ Copyright (C) 2016 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC 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, or (at your option) any later
+version.
+
+GCC 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/>. */
+
+ INSERT_PASS_BEFORE (pass_shorten_branches, 1, pass_align_insns);
+ INSERT_PASS_AFTER (pass_convert_to_eh_region_ranges, 1, pass_handle_trap_shadows);
diff --git a/gcc/config/alpha/alpha-protos.h b/gcc/config/alpha/alpha-protos.h
index da7232c..b02c951 100644
--- a/gcc/config/alpha/alpha-protos.h
+++ b/gcc/config/alpha/alpha-protos.h
@@ -112,3 +112,9 @@ extern rtx unicosmk_add_call_info_word (rtx);
extern bool some_small_symbolic_operand_int (rtx);
extern int tls_symbolic_operand_1 (rtx, int, int);
extern rtx resolve_reload_operand (rtx);
+
+namespace gcc { class context; }
+class rtl_opt_pass;
+
+extern rtl_opt_pass *make_pass_handle_trap_shadows (gcc::context *);
+extern rtl_opt_pass *make_pass_align_insns (gcc::context *);
diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c
index d646879..7f53967 100644
--- a/gcc/config/alpha/alpha.c
+++ b/gcc/config/alpha/alpha.c
@@ -374,18 +374,6 @@ alpha_option_override (void)
64, 64, 16*1024 }
};
- opt_pass *pass_handle_trap_shadows = make_pass_handle_trap_shadows (g);
- struct register_pass_info handle_trap_shadows_info
- = { pass_handle_trap_shadows, "eh_ranges",
- 1, PASS_POS_INSERT_AFTER
- };
-
- opt_pass *pass_align_insns = make_pass_align_insns (g);
- struct register_pass_info align_insns_info
- = { pass_align_insns, "shorten",
- 1, PASS_POS_INSERT_BEFORE
- };
-
int const ct_size = ARRAY_SIZE (cpu_table);
int line_size = 0, l1_size = 0, l2_size = 0;
int i;
@@ -610,9 +598,6 @@ alpha_option_override (void)
target_flags |= MASK_LONG_DOUBLE_128;
#endif
- /* This needs to be done at start up. It's convenient to do it here. */
- register_pass (&handle_trap_shadows_info);
- register_pass (&align_insns_info);
}
/* Implement targetm.override_options_after_change. */
diff --git a/gcc/config/alpha/t-alpha b/gcc/config/alpha/t-alpha
new file mode 100644
index 0000000..f9b0a24
--- /dev/null
+++ b/gcc/config/alpha/t-alpha
@@ -0,0 +1,19 @@
+# Copyright (C) 2016 Free Software Foundation, Inc.
+#
+# This file is part of GCC.
+#
+# GCC 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, or (at your option)
+# any later version.
+#
+# GCC 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/>.
+
+PASSES_EXTRA += $(srcdir)/config/alpha/alpha-passes.def