Arnaud Charlet [Fri, 4 Nov 2011 12:04:55 +0000 (13:04 +0100)]
[multiple changes]
2011-11-04 Robert Dewar <dewar@adacore.com>
* exp_ch2.adb (Expand_Entity_Reference): Do not set
Atomic_Sync_Required for the case of a prefix of an attribute.
* exp_ch4.adb (Expand_N_Explicit_Dereference): May require
atomic synchronization
(Expand_N_Indexed_Component): Ditto.
(Expand_B_Selected_Component): Ditto.
* sem_prag.adb (Process_Suppress_Unsuppress):
Disable/Enable_Atomic_Synchronization can now occur for array
types with pragma Atomic_Components.
* sinfo.ads, sinfo.adb (Atomic_Sync_Required): Can now occur on
N_Explicit_Dereference nodes and on N_Indexed_Component nodes.
2011-11-04 Gary Dismukes <dismukes@adacore.com>
* gnat_ugn.texi: Editorial corrections for gnattest section.
Robert Dewar [Fri, 4 Nov 2011 11:00:33 +0000 (11:00 +0000)]
sem_prag.adb: Minor reformatting.
2011-11-04 Robert Dewar <dewar@adacore.com>
* sem_prag.adb: Minor reformatting.
* gnat_rm.texi: Update documentation for pragma Warnings (Off,
"***") usage.
* exp_ch2.adb (Expand_Entity_Reference): Only set
Atomic_Sync_Required on entities that are variables. Doesn't
make any sense on anything else.
Robert Dewar [Fri, 4 Nov 2011 10:58:44 +0000 (10:58 +0000)]
exp_ch2.adb (Expand_Entity_Reference): Extend handling of atomic sync to type case.
2011-11-04 Robert Dewar <dewar@adacore.com>
* exp_ch2.adb (Expand_Entity_Reference): Extend handling of
atomic sync to type case.
* sem_prag.adb (Process_Suppress_Unsuppress): Atomic Sync can
apply to types.
Jakub Jelinek [Fri, 4 Nov 2011 10:39:25 +0000 (11:39 +0100)]
i386.c (ix86_expand_vector_convert_uns_vsivsf): New function.
* config/i386/i386.c (ix86_expand_vector_convert_uns_vsivsf): New
function.
* config/i386/i386-protos.h (ix86_expand_vector_convert_uns_vsivsf):
New prototype.
* config/i386/sse.md (floatuns<sseintvecmodelower><mode>2): Use it.
For floatunsv8siv8sf2 require TARGET_AVX2.
* gcc.dg/torture/vec-cvt-1.c: Enable commented out inttoflttestui
test.
* config/i386/i386.c (ix86_expand_adjust_ufix_to_sfix_si): Add
XORP argument. Subtract 0x1p31 instead of 0x1p32. Use normal
signalling comparison instead of non-signalling. Store into
*XORP pseudo holding 0x80000000 integers if 0x1p31 has been
subtracted and 0 otherwise.
* config/i386/i386-protos.h (ix86_expand_adjust_ufix_to_sfix_si):
Adjust prototype.
* config/i386/sse.md (fixuns_trunc<mode><sseintvecmodelower>2): Enable
already for TARGET_SSE2. Xor in vector initialized by
ix86_expand_adjust_ufix_to_sfix_si at the end.
(vec_pack_ufix_trunc_<mode>): Likewise.
Jakub Jelinek [Fri, 4 Nov 2011 10:35:44 +0000 (11:35 +0100)]
tree-vect-stmts.c (vectorizable_conversion): Rewritten to handle not just FLOAT_EXPR and FIX_TRUNC_EXPR...
* tree-vect-stmts.c (vectorizable_conversion): Rewritten to handle
not just FLOAT_EXPR and FIX_TRUNC_EXPR, but also CONVERT_EXPR_CODE_P,
WIDEN_MULT_EXPR and WIDEN_LSHIFT_EXPR to handle what
vectorizable_type_demotion and vectorizable_type_promotion did.
Additionally handle FLOAT_EXPR and FIX_TRUNC_EXPR where the integer
is {,un}signed {char,short}.
(vect_create_vectorized_demotion_stmts): Fix comment typo. For
recursive calls unconditionally use VEC_PACK_TRUNC_EXPR.
Push vec_dest back to the vec_dsts vector at the end.
(vect_create_vectorized_promotion_stmts): Don't recurse, do just
one step. Removed multi_step_cvt, vec_dsts, slp_node and
prev_stmt_info arguments, add vec_dest argument. Push always
into vec_tmp, not just when multi_step_cvt != 0, replace *vec_oprdn0
with vec_tmp at the end after freeing old *vec_oprnd0 vector.
(vectorizable_type_demotion, vectorizable_type_promotion): Removed.
(vect_analyze_stmt): Don't call vectorizable_type_demotion and
vectorizable_type_promotion. Call vectorizable_conversion even
for SLP bb vectorization.
(vect_transform_stmt): Call vectorizable_conversion instead of
vectorizable_type_demotion and vectorizable_type_promotion.
(supportable_widening_operation): Clear *multi_step_cvt first,
simplify c1/c2 computation, free *interm_types vector on failure.
(supportable_narrowing_operation): Clear *multi_step_cvt first,
free *interm_types vector on failure, handle multi-step
FIX_TRUNC_EXPR.
Mikael Morin [Fri, 4 Nov 2011 00:31:19 +0000 (00:31 +0000)]
re PR fortran/43829 (Scalarization of reductions)
PR fortran/43829
* trans-array.c (gfc_conv_expr_descriptor): Accept the inline intrinsic
case in the assertion.
* trans-intrinsic (enter_nested_loop): New function.
(gfc_conv_intrinsic_arith): Support non-scalar cases.
(nest_loop_dimension, walk_inline_intrinsic_arith): New functions.
(walk_inline_intrinsic_function): Handle sum and product.
(gfc_inline_intrinsic_function_p): Ditto.
* trans.h (gfc_get_loopinfo): New macro.
Mikael Morin [Fri, 4 Nov 2011 00:14:58 +0000 (00:14 +0000)]
frontend-passes.c (cfe_register_funcs): Return early in the case of an inline intrinsic function.
* frontend-passes.c (cfe_register_funcs): Return early in the case
of an inline intrinsic function.
(optimize_binop_array_assignment): Skip optimization in the case of
an inline intrinsic function.
Mikael Morin [Fri, 4 Nov 2011 00:11:39 +0000 (00:11 +0000)]
trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Set loop's temporary rank to the loop rank.
* trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Set loop's
temporary rank to the loop rank. Mark ss chains for multiple loop
if necessary. Use gfc_trans_scalarized_loop_boundary to end one loop
and start another.
Mikael Morin [Fri, 4 Nov 2011 00:09:27 +0000 (00:09 +0000)]
trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Set loop's temporary rank to the loop rank.
* trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Set loop's
temporary rank to the loop rank. Mark ss chains for multiple loop
if necessary. Use gfc_trans_scalarized_loop_boundary to end one loop
and start another.
Mikael Morin [Fri, 4 Nov 2011 00:04:27 +0000 (00:04 +0000)]
trans-expr.c (gfc_conv_procedure_call): Handle temporaries for arguments to elemental calls.
* trans-expr.c (gfc_conv_procedure_call): Handle temporaries for
arguments to elemental calls.
* trans-stmt.c (replace_ss): New function.
(gfc_conv_elemental_dependencies): Remove temporary loop handling.
Create a new ss for the temporary and replace the original one with it.
Remove fake array references. Recalculate all offsets.
Mikael Morin [Fri, 4 Nov 2011 00:00:23 +0000 (00:00 +0000)]
trans-array.h (gfc_free_ss, [...]): New prototypes.
* trans-array.h (gfc_free_ss, gfc_set_delta): New prototypes.
* trans-array.c (gfc_free_ss): Remove forward declaration.
Make non-static.
(set_delta, gfc_set_delta): Remove forward declaration.
Make non-static and rename the former to the later. Update uses.
Mikael Morin [Thu, 3 Nov 2011 23:53:42 +0000 (23:53 +0000)]
trans-array.c (outermost_loop): New function.
* trans-array.c (outermost_loop): New function.
(gfc_trans_array_constructor, gfc_set_vector_loop_bounds,
gfc_add_loop_ss_code): Put generated code out of the outermost loop.
* trans-array.c (gfc_add_loop_ss_code): Skip non-nestedmost ss.
Call recursively gfc_add_loop_ss_code for all the nested loops.
(gfc_conv_ss_startstride): Only get the descriptor for the outermost
ss. Call recursively gfc_conv_ss_startstride for all the nested loops.
(set_loop_bounds): Call recursively for all the nested loops.
(set_delta): Ditto.
Mikael Morin [Thu, 3 Nov 2011 23:39:11 +0000 (23:39 +0000)]
trans.h (struct gfc_loopinfo): New fields nested and next.
* trans.h (struct gfc_loopinfo): New fields nested and next.
* trans-array.c (gfc_add_ss_to_loop): Update list of nested list if
ss has non-null nested_ss field.
Mikael Morin [Thu, 3 Nov 2011 23:34:53 +0000 (23:34 +0000)]
trans-array.c (get_array_ref_dim, [...]): Rename the former to the latter and loop over the parents.
* trans-array.c (get_array_ref_dim, get_scalarizer_dim_for_array_dim):
Rename the former to the latter and loop over the parents.
(innermost_ss): New function.
(get_array_ref_dim_for_loop_dim): New function.
(gfc_trans_create_temp_array): Use get_scalarizer_dim_for_array_dim.
(set_loop_bounds): Use get_array_dim_for_loop_dim).
Mikael Morin [Thu, 3 Nov 2011 23:17:08 +0000 (23:17 +0000)]
trans.h (struct gfc_ss): New field parent.
* trans.h (struct gfc_ss): New field parent.
* trans-array.c (gfc_trans_scalarizing_loops): Skip clearing if a
parent exists.
* trans-expr.c (gfc_advance_se_ss_chain): Move to parent ss at the
end of the chain.
Mikael Morin [Thu, 3 Nov 2011 22:59:29 +0000 (22:59 +0000)]
trans-array.c (gfc_trans_array_constructor, [...]): Rename the former to the later.
* trans-array.c (gfc_trans_array_constructor, trans_array_constructor):
Rename the former to the later. Get loop from ss.
Remove loop argument.
(gfc_add_loop_ss_code): Update call.
Mikael Morin [Thu, 3 Nov 2011 22:50:06 +0000 (22:50 +0000)]
trans.h (struct gfc_ss_info): New field refcount.
* trans.h (struct gfc_ss_info): New field refcount.
* trans-array.c (free_ss_info): Decrement refcount. Return early if
still non-zero.
(gfc_get_array_ss, gfc_get_temp_ss, gfc_get_scalar_ss): Increment
refcount.
Mikael Morin [Thu, 3 Nov 2011 22:40:55 +0000 (22:40 +0000)]
trans-array.c (set_loop_bounds): Separate the beginning of gfc_conv_loop_setup into a function of its own.
* trans-array.c (set_loop_bounds): Separate the beginning of
gfc_conv_loop_setup into a function of its own.
(set_delta): Separate the end of gfc_conv_loop_setup into a function
of its own.
(gfc_conv_loop_setup): Call set_loop_bounds and set delta.
(set_loop_bounds, set_delta, gfc_conv_loop_setup): Make loopspec a
pointer to the specloop field from the loop struct.
Mikael Morin [Thu, 3 Nov 2011 22:04:50 +0000 (22:04 +0000)]
trans.h (struct gfc_ss, [...]): Move field string_length from the former struct to the latter.
* trans.h (struct gfc_ss, struct gfc_ss_info): Move field
string_length from the former struct to the latter.
* trans-array.c
(gfc_get_temp_ss, gfc_trans_array_constructor, gfc_add_loop_ss_code,
gfc_conv_ss_descriptor, gfc_conv_scalarized_array_ref,
gfc_conv_resolve_dependencies, gfc_conv_loop_setup,
gfc_conv_expr_descriptor): Update references to string_length and
factor common reference chains where possible.
* trans-const.c (gfc_conv_constant): Ditto.
* trans-expr.c (gfc_conv_variable, gfc_conv_subref_array_arg,
gfc_conv_expr): Ditto.
Mikael Morin [Thu, 3 Nov 2011 21:47:49 +0000 (21:47 +0000)]
trans.h (struct gfc_ss, [...]): Move shape field from the former struct to the latter.
* trans.h (struct gfc_ss, struct gfc_array_info): Move shape field
from the former struct to the latter.
* trans-array.c (gfc_conv_ss_startstride, gfc_conv_loop_setup):
Update field references.
* trans-expr.c (gfc_trans_subarray_assign): Update field references
and factor common reference chains.
* trans-io.c (transfer_array_component): Ditto.
Mikael Morin [Thu, 3 Nov 2011 21:35:35 +0000 (21:35 +0000)]
trans-array.c (dim_ok, [...]): Rename the former to the latter.
* trans-array.c (dim_ok, transposed_dims): Rename the former to the
latter. Change argument type. Invert return value.
(gfc_conv_expr_descriptor): Update calls.
Mikael Morin [Thu, 3 Nov 2011 21:33:28 +0000 (21:33 +0000)]
trans-array.c (get_array_ref_dim): Change argument type and name.
* trans-array.c (get_array_ref_dim): Change argument type and name.
Obtain previous argument from the new argument in the body.
(gfc_trans_create_temp_arry, gfc_conv_loop_setup): Update calls.
Mikael Morin [Thu, 3 Nov 2011 21:31:12 +0000 (21:31 +0000)]
trans-array.c (gfc_set_vector_loop_bounds, [...]): Rename the former to the latter.
* trans-array.c (gfc_set_vector_loop_bounds, set_vector_loop_bounds):
Rename the former to the latter. Change type and name of argument.
Get previous argument from the new one.
(gfc_add_loop_ss_code): Update call.
Mikael Morin [Thu, 3 Nov 2011 21:28:26 +0000 (21:28 +0000)]
trans-array.h (gfc_trans_create_temp_array): Replace info argument with ss argument.
* trans-array.h (gfc_trans_create_temp_array): Replace info argument
with ss argument.
* trans-array.c (gfc_trans_create_temp_array): Ditto. Get info from ss.
(gfc_trans_array_constructor, gfc_conv_loop_setup): Update call to
gfc_trans_create_temp_array.
* trans-expr.c (gfc_conv_procedure_call): Ditto.
* trans-intrinsic.c (gfc_conv_intrinsic_transfer): Ditto.
* trans-stmt.c (gfc_conv_elemental_dependencies): Ditto.
Mikael Morin [Thu, 3 Nov 2011 21:21:30 +0000 (21:21 +0000)]
trans-array.c (gfc_trans_array_bound_check, [...]): Rename the former to the latter.
* trans-array.c (gfc_trans_array_bound_check,
trans_array_bound_check): Rename the former to the latter.
Replace descriptor argument with ss argument. Get descriptor from ss.
(gfc_conv_array_index_offset, conv_array_index_offset): Rename the
former to the latter. Update call to trans_array_bound_check.
Replace info argument with ss argument. Get info from ss.
(gfc_conv_scalarized_array_ref): Update call to conv_array_index_offset.
(add_array_offset): Ditto
Mikael Morin [Thu, 3 Nov 2011 21:19:27 +0000 (21:19 +0000)]
trans-array.c (gfc_trans_constant_array_constructor, [...]): Rename the former to the latter.
* trans-array.c (gfc_trans_constant_array_constructor,
trans_constant_array_constructor): Rename the former to the latter.
Don't set the rank of the temporary for the loop. Remove then unused
loop argument.
(gfc_trans_array_constructor): Update call.
* config.host (crisv32-*-none, cris-*-none): Remove.
(crisv32-*-elf): Append to tmake_file, don't just set it.
(cris-*-elf): Add missing t-fdpbit to tmake_file.
Rainer Orth [Thu, 3 Nov 2011 18:19:54 +0000 (18:19 +0000)]
Restore arm-eabi bootstrap (PR target/50978)
PR target/50978
* config/arm/t-bpabi: New file.
* config.gcc (arm*-*-linux*): Add arm/t-bpabi to tmake_file for
arm*-*-linux-*eabi.
(arm*-*-uclinux*): Add arm/t-bpabi to tmake_file for
arm*-*-uclinux*eabi.
(arm*-*-eabi*, arm*-*-symbianelf*): Add arm/t-bpabi to tmake_file
for arm*-*-eabi*.
Michael Matz [Thu, 3 Nov 2011 17:17:07 +0000 (17:17 +0000)]
re PR bootstrap/50857 (The compiler is built with exceptions and RTTI enabled)
libcpp/
PR bootstrap/50857
* configure.ac: Check for -fno-exceptions -fno-rtti.
* configure: Regenerate.
* Makefile.in (NOEXCEPTION_FLAGS): New flag.
(ALL_CXXFLAGS): Use it.
gcc/
PR bootstrap/50857
* configure.ac: Check for -fno-exceptions -fno-rtti.
* configure: Regenerate.
* Makefile.in (NOEXCEPTION_FLAGS): New flag.
(ALL_CXXFLAGS): Use it.