diff options
author | uros <uros@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-05-07 07:34:29 +0000 |
---|---|---|
committer | uros <uros@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-05-07 07:34:29 +0000 |
commit | 3032a4eac370ee7a180a157cf45422bc1fefc1c9 (patch) | |
tree | 214eea9862ae259290c0ee6f7c97e1a0e69402bd | |
parent | 167313562a3d5d5190594080d987b2b718145816 (diff) | |
download | gcc-3032a4eac370ee7a180a157cf45422bc1fefc1c9.tar.gz |
PR target/66015
* config/alpha/alpha.c (alpha_override_options_after_change): New.
(TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): New.
(alpha_override_options): Move align_loops, align_jumps and
align_functions handling into alpha_override_options_after_change.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222870 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/config/alpha/alpha.c | 35 |
2 files changed, 32 insertions, 11 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a3ccaf63f43..19cd61cde92 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2015-05-07 Uros Bizjak <ubizjak@gmail.com> + + PR target/66015 + * config/alpha/alpha.c (alpha_override_options_after_change): New. + (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): New. + (alpha_override_options): Move align_loops, align_jumps and + align_functions handling into alpha_override_options_after_change. + 2015-05-06 Sandra Loosemore <sandra@codesourcery.com> Chris Jones <chrisj@nvidia.com> Joshua Conner <jconner@nvidia.com> diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c index 6f797b3d688..5ed4dc6154b 100644 --- a/gcc/config/alpha/alpha.c +++ b/gcc/config/alpha/alpha.c @@ -241,6 +241,7 @@ static struct machine_function *alpha_init_machine_status (void); static rtx alpha_emit_xfloating_compare (enum rtx_code *, rtx, rtx); static void alpha_handle_trap_shadows (void); static void alpha_align_insns (void); +static void alpha_override_options_after_change (void); #if TARGET_ABI_OPEN_VMS static void alpha_write_linkage (FILE *, const char *); @@ -628,17 +629,7 @@ alpha_option_override (void) else if (flag_pic == 2) target_flags &= ~MASK_SMALL_DATA; - /* Align labels and loops for optimal branching. */ - /* ??? Kludge these by not doing anything if we don't optimize. */ - if (optimize > 0) - { - if (align_loops <= 0) - align_loops = 16; - if (align_jumps <= 0) - align_jumps = 16; - } - if (align_functions <= 0) - align_functions = 16; + alpha_override_options_after_change (); /* Register variables and functions with the garbage collector. */ @@ -662,6 +653,24 @@ alpha_option_override (void) register_pass (&handle_trap_shadows_info); register_pass (&align_insns_info); } + +/* Implement targetm.override_options_after_change. */ + +static void +alpha_override_options_after_change (void) +{ + /* Align labels and loops for optimal branching. */ + /* ??? Kludge these by not doing anything if we don't optimize. */ + if (optimize > 0) + { + if (align_loops <= 0) + align_loops = 16; + if (align_jumps <= 0) + align_jumps = 16; + } + if (align_functions <= 0) + align_functions = 16; +} /* Returns 1 if VALUE is a mask that contains full bytes of zero or ones. */ @@ -10098,6 +10107,10 @@ alpha_atomic_assign_expand_fenv (tree *hold, tree *clear, tree *update) #undef TARGET_OPTION_OVERRIDE #define TARGET_OPTION_OVERRIDE alpha_option_override +#undef TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE +#define TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE \ + alpha_override_options_after_change + #ifdef TARGET_ALTERNATE_LONG_DOUBLE_MANGLING #undef TARGET_MANGLE_TYPE #define TARGET_MANGLE_TYPE alpha_mangle_type |