diff options
author | H.J. Lu <hongjiu.lu@intel.com> | 2008-06-30 21:32:36 +0000 |
---|---|---|
committer | H.J. Lu <hongjiu.lu@intel.com> | 2008-06-30 21:32:36 +0000 |
commit | 464b407bb3bb5f1e5b79e4d8e2a5329e5285a4ba (patch) | |
tree | b035cb8fcfdb6e41caafb2f0ce009b223a658c6c | |
parent | 0dfec735736b2a57887338638dfdc4c99c9f304d (diff) |
Merged with trunk at revision 137291.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/stack@137293 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 31 | ||||
-rw-r--r-- | gcc/config/i386/i386.md | 2 | ||||
-rw-r--r-- | gcc/cp/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/cp/decl2.c | 11 | ||||
-rw-r--r-- | gcc/df-scan.c | 67 | ||||
-rw-r--r-- | gcc/dse.c | 56 | ||||
-rw-r--r-- | gcc/ifcvt.c | 27 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/ext/altivec-16.C | 19 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/i386/movti.c | 10 |
10 files changed, 178 insertions, 61 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ed06103f65e..aaf1d083447 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,8 +1,30 @@ +2008-06-30 Uros Bizjak <ubizjak@gmail.com> + + * config/i386/i386.md (*movti_rex64): Add "!" to "r" constraint + of operand 0. + +2008-06-30 Kenneth Zadeck <zadeck@naturalbridge.com> + + * ifcvt.c (cond_move_process_if_block): Free vectors on false + return. + +2008-06-30 Kenneth Zadeck <zadeck@naturalbridge.com> + + * df-scan.c (df_scan_free_ref_vec, df_scan_free_mws_vec): New + macros. + (df_scan_free_internal): Free data structures not + allocated in storage pools. + (df_mw_hardreg_chain_delete_eq_uses): Use df_scan_free_mws_vec. + (df_refs_add_to_chains): Use df_scan_free_ref_vec and + df_scan_free_mws_vec. + * dse.c (dse_step6): Free offset_map_p and offset_map_n + unconditionally. + 2008-06-30 H.J. Lu <hongjiu.lu@intel.com> * config/i386/i386.c (contains_aligned_value_p): Return true for __float128. - (ix86_function_arg_boundary): Return its natural boundary for + (ix86_function_arg_boundary): Return its natural boundary for __float128. (return_in_memory_32): Don't check TDmode. (ix86_split_to_parts): Support splitting into 4 parts and @@ -10,8 +32,7 @@ (ix86_split_long_move): Support splitting into 4 parts. (bdesc_args): Enable IX86_BUILTIN_FABSQ and IX86_BUILTIN_COPYSIGNQ for SSE2. - (ix86_init_mmx_sse_builtins): Move __float80 and __float128 - to ... + (ix86_init_mmx_sse_builtins): Move __float80 and __float128 to ... (ix86_init_builtins): Here. (ix86_scalar_mode_supported_p): Always return true for TFmode. (ix86_c_mode_for_suffix): Always return TFmode and XFmode for @@ -34,9 +55,7 @@ H.J. Lu <hongjiu.lu@intel.com> * global.c (compute_regsets): Set frame_pointer_needed here. - - * reload1.c (init_elim_table): Don't set frame_pointer_needed - here. + * reload1.c (init_elim_table): Don't set frame_pointer_needed here. 2008-06-30 Aaron W. LaFramboise <aaronavay62@aaronwl.com> diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 9800b520f81..6c0d7814919 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -2466,7 +2466,7 @@ (const_string "TI")))]) (define_insn "*movti_rex64" - [(set (match_operand:TI 0 "nonimmediate_operand" "=r,o,x,x,xm") + [(set (match_operand:TI 0 "nonimmediate_operand" "=!r,o,x,x,xm") (match_operand:TI 1 "general_operand" "riFo,riF,C,xm,x"))] "TARGET_64BIT && !(MEM_P (operands[0]) && MEM_P (operands[1]))" diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 5897d1b5a74..dd40a292005 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,10 @@ +2008-06-30 Jakub Jelinek <jakub@redhat.com> + + PR c++/36662 + * decl2.c (is_late_template_attribute): If the first attribute + argument is IDENTIFIER_NODE, don't consider it when checking + if arguments are value or type dependent. + 2008-06-29 Paolo Carlini <paolo.carlini@oracle.com> PR c++/36655 diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index ee229f4e878..a5ece9a6709 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -1,6 +1,7 @@ /* Process declarations and variables for C++ compiler. Copyright (C) 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008 Free Software Foundation, Inc. + 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008 + Free Software Foundation, Inc. Hacked by Michael Tiemann (tiemann@cygnus.com) This file is part of GCC. @@ -1005,6 +1006,14 @@ is_late_template_attribute (tree attr, tree decl) for (arg = args; arg; arg = TREE_CHAIN (arg)) { tree t = TREE_VALUE (arg); + + /* If the first attribute argument is an identifier, only consider + second and following arguments. Attributes like mode, format, + cleanup and several target specific attributes aren't late + just because they have an IDENTIFIER_NODE as first argument. */ + if (arg == args && TREE_CODE (t) == IDENTIFIER_NODE) + continue; + if (value_dependent_expression_p (t) || type_dependent_expression_p (t)) return true; diff --git a/gcc/df-scan.c b/gcc/df-scan.c index 092273faa3b..5818717651d 100644 --- a/gcc/df-scan.c +++ b/gcc/df-scan.c @@ -60,6 +60,21 @@ along with GCC; see the file COPYING3. If not see #define EPILOGUE_USES(REGNO) 0 #endif +/* The following two macros free the vecs that hold either the refs or + the mw refs. They are a little tricky because the vec has 0 + elements is special and is not to be freed. */ +#define df_scan_free_ref_vec(V) \ + do { \ + if (V && *V) \ + free (V); \ + } while (0) + +#define df_scan_free_mws_vec(V) \ + do { \ + if (V && *V) \ + free (V); \ + } while (0) + /* The bitmap_obstack is used to hold some static variables that should not be reset after each function is compiled. */ @@ -174,11 +189,43 @@ struct df_scan_problem_data typedef struct df_scan_bb_info *df_scan_bb_info_t; + +/* Internal function to shut down the scanning problem. */ static void df_scan_free_internal (void) { struct df_scan_problem_data *problem_data = (struct df_scan_problem_data *) df_scan->problem_data; + unsigned int i; + basic_block bb; + + /* The vectors that hold the refs are not pool allocated because + they come in many sizes. This makes them impossible to delete + all at once. */ + for (i = 0; i < DF_INSN_SIZE(); i++) + { + struct df_insn_info *insn_info = DF_INSN_UID_GET(i); + /* Skip the insns that have no insn_info or have been + deleted. */ + if (insn_info) + { + df_scan_free_ref_vec (insn_info->defs); + df_scan_free_ref_vec (insn_info->uses); + df_scan_free_ref_vec (insn_info->eq_uses); + df_scan_free_mws_vec (insn_info->mw_hardregs); + } + } + + FOR_ALL_BB (bb) + { + unsigned int bb_index = bb->index; + struct df_scan_bb_info *bb_info = df_scan_get_bb_info (bb_index); + if (bb_info) + { + df_scan_free_ref_vec (bb_info->artificial_defs); + df_scan_free_ref_vec (bb_info->artificial_uses); + } + } free (df->def_info.refs); free (df->def_info.begin); @@ -1977,7 +2024,7 @@ df_mw_hardreg_chain_delete_eq_uses (struct df_insn_info *insn_info) if (count == 0) { - free (insn_info->mw_hardregs); + df_scan_free_mws_vec (insn_info->mw_hardregs); insn_info->mw_hardregs = df_null_mw_rec; return 0; } @@ -2515,8 +2562,7 @@ df_refs_add_to_chains (struct df_collection_rec *collection_rec, chain specially. */ if (collection_rec->def_vec) { - if (insn_rec->defs && *insn_rec->defs) - free (insn_rec->defs); + df_scan_free_ref_vec (insn_rec->defs); insn_rec->defs = df_install_refs (bb, collection_rec->def_vec, collection_rec->next_def, @@ -2525,8 +2571,7 @@ df_refs_add_to_chains (struct df_collection_rec *collection_rec, } if (collection_rec->use_vec) { - if (insn_rec->uses && *insn_rec->uses) - free (insn_rec->uses); + df_scan_free_ref_vec (insn_rec->uses); insn_rec->uses = df_install_refs (bb, collection_rec->use_vec, collection_rec->next_use, @@ -2535,8 +2580,7 @@ df_refs_add_to_chains (struct df_collection_rec *collection_rec, } if (collection_rec->eq_use_vec) { - if (insn_rec->eq_uses && *insn_rec->eq_uses) - free (insn_rec->eq_uses); + df_scan_free_ref_vec (insn_rec->eq_uses); insn_rec->eq_uses = df_install_refs (bb, collection_rec->eq_use_vec, collection_rec->next_eq_use, @@ -2545,8 +2589,7 @@ df_refs_add_to_chains (struct df_collection_rec *collection_rec, } if (collection_rec->mw_vec) { - if (insn_rec->mw_hardregs && *insn_rec->mw_hardregs) - free (insn_rec->mw_hardregs); + df_scan_free_mws_vec (insn_rec->mw_hardregs); insn_rec->mw_hardregs = df_install_mws (collection_rec->mw_vec, collection_rec->next_mw); @@ -2556,15 +2599,13 @@ df_refs_add_to_chains (struct df_collection_rec *collection_rec, { struct df_scan_bb_info *bb_info = df_scan_get_bb_info (bb->index); - if (bb_info->artificial_defs && *bb_info->artificial_defs) - free (bb_info->artificial_defs); + df_scan_free_ref_vec (bb_info->artificial_defs); bb_info->artificial_defs = df_install_refs (bb, collection_rec->def_vec, collection_rec->next_def, df->def_regs, &df->def_info, false); - if (bb_info->artificial_uses && *bb_info->artificial_uses) - free (bb_info->artificial_uses); + df_scan_free_ref_vec (bb_info->artificial_uses); bb_info->artificial_uses = df_install_refs (bb, collection_rec->use_vec, collection_rec->next_use, diff --git a/gcc/dse.c b/gcc/dse.c index b65a72b90d0..71d34620110 100644 --- a/gcc/dse.c +++ b/gcc/dse.c @@ -3156,43 +3156,30 @@ dse_step6 (bool global_done) group_info_t group; basic_block bb; - if (global_done) - { - for (i = 0; VEC_iterate (group_info_t, rtx_group_vec, i, group); i++) - { - free (group->offset_map_n); - free (group->offset_map_p); - BITMAP_FREE (group->store1_n); - BITMAP_FREE (group->store1_p); - BITMAP_FREE (group->store2_n); - BITMAP_FREE (group->store2_p); - BITMAP_FREE (group->group_kill); - } - - FOR_ALL_BB (bb) - { - bb_info_t bb_info = bb_table[bb->index]; - BITMAP_FREE (bb_info->gen); - if (bb_info->kill) - BITMAP_FREE (bb_info->kill); - if (bb_info->in) - BITMAP_FREE (bb_info->in); - if (bb_info->out) - BITMAP_FREE (bb_info->out); - } - } - else + for (i = 0; VEC_iterate (group_info_t, rtx_group_vec, i, group); i++) { - for (i = 0; VEC_iterate (group_info_t, rtx_group_vec, i, group); i++) - { - BITMAP_FREE (group->store1_n); - BITMAP_FREE (group->store1_p); - BITMAP_FREE (group->store2_n); - BITMAP_FREE (group->store2_p); - BITMAP_FREE (group->group_kill); - } + free (group->offset_map_n); + free (group->offset_map_p); + BITMAP_FREE (group->store1_n); + BITMAP_FREE (group->store1_p); + BITMAP_FREE (group->store2_n); + BITMAP_FREE (group->store2_p); + BITMAP_FREE (group->group_kill); } + if (global_done) + FOR_ALL_BB (bb) + { + bb_info_t bb_info = bb_table[bb->index]; + BITMAP_FREE (bb_info->gen); + if (bb_info->kill) + BITMAP_FREE (bb_info->kill); + if (bb_info->in) + BITMAP_FREE (bb_info->in); + if (bb_info->out) + BITMAP_FREE (bb_info->out); + } + if (clear_alias_sets) { BITMAP_FREE (clear_alias_sets); @@ -3217,7 +3204,6 @@ dse_step6 (bool global_done) } - /* ------------------------------------------------------------------------- DSE ------------------------------------------------------------------------- */ diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c index e1601b1eacb..da8afde3106 100644 --- a/gcc/ifcvt.c +++ b/gcc/ifcvt.c @@ -2614,7 +2614,11 @@ cond_move_process_if_block (struct noce_if_info *if_info) /* Make sure the blocks are suitable. */ if (!check_cond_move_block (then_bb, then_vals, then_regs, cond) || (else_bb && !check_cond_move_block (else_bb, else_vals, else_regs, cond))) - return FALSE; + { + VEC_free (int, heap, then_regs); + VEC_free (int, heap, else_regs); + return FALSE; + } /* Make sure the blocks can be used together. If the same register is set in both blocks, and is not set to a constant in both @@ -2635,7 +2639,11 @@ cond_move_process_if_block (struct noce_if_info *if_info) if (!CONSTANT_P (then_vals[reg]) && !CONSTANT_P (else_vals[reg]) && !rtx_equal_p (then_vals[reg], else_vals[reg])) - return FALSE; + { + VEC_free (int, heap, then_regs); + VEC_free (int, heap, else_regs); + return FALSE; + } } } @@ -2649,7 +2657,11 @@ cond_move_process_if_block (struct noce_if_info *if_info) branches, since if we convert we are going to always execute them. */ if (c > MAX_CONDITIONAL_EXECUTE) - return FALSE; + { + VEC_free (int, heap, then_regs); + VEC_free (int, heap, else_regs); + return FALSE; + } /* Try to emit the conditional moves. First do the then block, then do anything left in the else blocks. */ @@ -2661,11 +2673,17 @@ cond_move_process_if_block (struct noce_if_info *if_info) then_vals, else_vals, true))) { end_sequence (); + VEC_free (int, heap, then_regs); + VEC_free (int, heap, else_regs); return FALSE; } seq = end_ifcvt_sequence (if_info); if (!seq) - return FALSE; + { + VEC_free (int, heap, then_regs); + VEC_free (int, heap, else_regs); + return FALSE; + } loc_insn = first_active_insn (then_bb); if (!loc_insn) @@ -2698,7 +2716,6 @@ cond_move_process_if_block (struct noce_if_info *if_info) VEC_free (int, heap, then_regs); VEC_free (int, heap, else_regs); - return TRUE; } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a23526877dd..3a2c9a1b1e2 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,12 @@ +2008-06-30 Uros Bizjak <ubizjak@gmail.com> + + * gcc.target/i386/movti.c: New test. + +2008-06-30 Jakub Jelinek <jakub@redhat.com> + + PR c++/36662 + * g++.dg/ext/altivec-16.C: New test. + 2008-06-30 Ira Rosen <irar@il.ibm.com> PR tree-optimization/36648 diff --git a/gcc/testsuite/g++.dg/ext/altivec-16.C b/gcc/testsuite/g++.dg/ext/altivec-16.C new file mode 100644 index 00000000000..91230d26138 --- /dev/null +++ b/gcc/testsuite/g++.dg/ext/altivec-16.C @@ -0,0 +1,19 @@ +// PR c++/36662 +// { dg-do compile { target powerpc*-*-* } } +// { dg-require-effective-target powerpc_altivec_ok } +// { dg-options "-maltivec" } + +#define vector __attribute__((altivec (vector__))) + +template <typename c> struct S {}; + +template <> struct S<vector float> +{ + static vector float zero; +}; + +template <int> +void g (void) +{ + vector float t = S<vector float>::zero; +} diff --git a/gcc/testsuite/gcc.target/i386/movti.c b/gcc/testsuite/gcc.target/i386/movti.c new file mode 100644 index 00000000000..e306c1e3f01 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/movti.c @@ -0,0 +1,10 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target dfp } */ +/* { dg-options "-O -std=gnu99" } */ + +_Decimal128 test (void) +{ + return 1234123412341234.123412341234dl; +} + +/* { dg-final { scan-assembler-not "movabs" } } */ |