From a32fc2165b93b4ff31fb35d17afd6701de35721e Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Tue, 11 Oct 2016 18:30:45 +0200 Subject: [PATCH] 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 --- gcc/ChangeLog | 25 ++++++++++++++++++++----- gcc/config.gcc | 7 +++++-- gcc/config/alpha/alpha-passes.def | 21 +++++++++++++++++++++ gcc/config/alpha/alpha-protos.h | 6 ++++++ gcc/config/alpha/alpha.c | 15 --------------- gcc/config/alpha/t-alpha | 19 +++++++++++++++++++ 6 files changed, 71 insertions(+), 22 deletions(-) create mode 100644 gcc/config/alpha/alpha-passes.def create mode 100644 gcc/config/alpha/t-alpha diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7143ebf4205..b94c6e79285 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,14 @@ +2016-10-11 Uros Bizjak + + * 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 PR target/77924 @@ -229,7 +240,7 @@ 2016-10-10 Jeff Law - 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. @@ -524,12 +535,16 @@ * 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. diff --git a/gcc/config.gcc b/gcc/config.gcc index 7bbf5464073..2143d632fd2 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -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 index 00000000000..d960e7cfc06 --- /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 +. */ + + 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 da7232cfd47..b02c951c122 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 d646879e7e8..7f5396725b0 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 00000000000..f9b0a24c4d8 --- /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 +# . + +PASSES_EXTRA += $(srcdir)/config/alpha/alpha-passes.def -- 2.30.2