alpha-passes.def: New file.
authorUros Bizjak <uros@gcc.gnu.org>
Tue, 11 Oct 2016 16:30:45 +0000 (18:30 +0200)
committerUros Bizjak <uros@gcc.gnu.org>
Tue, 11 Oct 2016 16:30:45 +0000 (18:30 +0200)
* 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

gcc/ChangeLog
gcc/config.gcc
gcc/config/alpha/alpha-passes.def [new file with mode: 0644]
gcc/config/alpha/alpha-protos.h
gcc/config/alpha/alpha.c
gcc/config/alpha/t-alpha [new file with mode: 0644]

index 7143ebf42051665b2af1af2643f9137f8c9f66ae..b94c6e792857ee71b2b3f7d0170bfbc3cd6f46fa 100644 (file)
@@ -1,3 +1,14 @@
+2016-10-11  Uros Bizjak  <ubizjak@gmail.com>
+
+       * 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.
+
 2016-10-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
        PR target/77924
 
 2016-10-10  Jeff Law  <law@redhat.com>
 
-        PR tree-optimization/71947
+       PR tree-optimization/71947
        * tree-ssa-dom.c (cprop_into_stmt): Avoid replacing A with B, then
        B with A within a single statement.
 
 
        * config/aarch64/aarch64-arches.def (AARCH64_ARCH): #undef at the end.
        * config/aarch64/aarch64-cores.def (AARCH64_CORE): Likewise.
-       * config/aarch64/aarch64-fusion-pairs.def (AARCH64_FUSION_PAIR): Likewise.
-       * config/aarch64/aarch64-option-extensions.def (AARCH64_OPT_EXTENSION): Likewise.
-       * config/aarch64/aarch64-tuning-flags.def (AARCH64_EXTRA_TUNING_OPTION): Likewise.
+       * config/aarch64/aarch64-fusion-pairs.def (AARCH64_FUSION_PAIR):
+       Likewise.
+       * config/aarch64/aarch64-option-extensions.def (AARCH64_OPT_EXTENSION):
+       Likewise.
+       * config/aarch64/aarch64-tuning-flags.def (AARCH64_EXTRA_TUNING_OPTION):
+       Likewise.
        * config/aarch64/aarch64-opts.h (AARCH64_CORE): Don't #undef here.
        (AARCH64_ARCH): Likewise.
-       * common/config/aarch64/aarch64-common.c (AARCH64_OPT_EXTENSION): Likewise.
+       * common/config/aarch64/aarch64-common.c (AARCH64_OPT_EXTENSION):
+       Likewise.
        (AARCH64_CORE): Likewise.
        (AARCH64_ARCH): Likewise.
        * config/aarch64/aarch64-protos.h (AARCH64_FUSION_PAIR): Likewise.
index 7bbf5464073c0bf9b954baa2fb831a4f0fc5ffd3..2143d632fd25892e3633abafe17eee9326b1efd8 100644 (file)
@@ -972,27 +972,30 @@ aarch64*-*-linux*)
        ;;
 alpha*-*-linux*)
        tm_file="elfos.h ${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h glibc-stdint.h"
-       tmake_file="${tmake_file} alpha/t-linux"
+       tmake_file="${tmake_file} alpha/t-linux alpha/t-alpha"
        extra_options="${extra_options} alpha/elf.opt"
        ;;
 alpha*-*-freebsd*)
        tm_file="elfos.h ${tm_file} ${fbsd_tm_file} alpha/elf.h alpha/freebsd.h"
+       tmake_file="${tmake_file} alpha/t-alpha"
        extra_options="${extra_options} alpha/elf.opt"
        ;;
 alpha*-*-netbsd*)
        tm_file="elfos.h ${tm_file} netbsd.h alpha/elf.h netbsd-elf.h alpha/netbsd.h"
+       tmake_file="${tmake_file} alpha/t-alpha"
        extra_options="${extra_options} netbsd.opt netbsd-elf.opt \
                       alpha/elf.opt"
        ;;
 alpha*-*-openbsd*)
        tm_defines="${tm_defines} OBSD_HAS_DECLARE_FUNCTION_NAME OBSD_HAS_DECLARE_FUNCTION_SIZE OBSD_HAS_DECLARE_OBJECT"
        tm_file="elfos.h alpha/alpha.h alpha/elf.h openbsd.h openbsd-stdint.h alpha/openbsd.h openbsd-libpthread.h"
+       tmake_file="${tmake_file} alpha/t-alpha"
        extra_options="${extra_options} openbsd.opt alpha/elf.opt"
        # default x-alpha is only appropriate for dec-osf.
        ;;
 alpha*-dec-*vms*)
        tm_file="${tm_file} vms/vms.h alpha/vms.h"
-       tmake_file="${tmake_file} alpha/t-vms"
+       tmake_file="${tmake_file} alpha/t-vms alpha/t-alpha"
        ;;
 arc*-*-elf*)
        extra_headers="arc-simd.h"
diff --git a/gcc/config/alpha/alpha-passes.def b/gcc/config/alpha/alpha-passes.def
new file mode 100644 (file)
index 0000000..d960e7c
--- /dev/null
@@ -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);
index da7232cfd4758a42fe36a3a71ebc8dad848bbe1e..b02c951c122dfdf5341567284440eedf532d7228 100644 (file)
@@ -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 *);
index d646879e7e8a48d56a0380b241c464e349db4621..7f5396725b0c40ff9ee2a0850014bf5f12ce406e 100644 (file)
@@ -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 (file)
index 0000000..f9b0a24
--- /dev/null
@@ -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