2010-04-23 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/43846
* tree-sra.c (struct access): New flag grp_assignment_read.
(build_accesses_from_assign): Set grp_assignment_read.
(sort_and_splice_var_accesses): Propagate grp_assignment_read.
(enum mark_read_status): New type.
(analyze_access_subtree): Propagate grp_assignment_read, create
accesses also if both direct_read and root->grp_assignment_read.
* testsuite/gcc.dg/tree-ssa/sra-10.c: New test.
From-SVN: r158668
2010-04-23 Martin Jambor <mjambor@suse.cz>
PR middle-end/43835
* tree-sra.c (ipa_sra_preliminary_function_checks): Check that the
function does not have type attributes.
* testsuite/gcc.c-torture/execute/pr43835.c: New test.
From-SVN: r158667
2010-04-23 Richard Guenther <rguenther@suse.de>
PR lto/42653
* tree.c (free_lang_data_in_decl): Do not reset DECL_CONTEXT
of FUNCTION_DECLs.
* g++.dg/lto/20100423-1_0.C: New testcase.
From-SVN: r158666
2010-04-22 Laurynas Biveinis <laurynas.biveinis@gmail.com>
* sese.h (create_if_region_on_edge): Remove.
* sese.c (create_if_region_on_edge): Make static.
* tree-inline.c: Do not include ggc.h.
* expr.c: Do not include ggc.h.
* Makefile.in (tree-inline.o, expr.o): Remove $(GGC_H) from
dependencies.
From-SVN: r158661
PR tree-optimization/43842
* tree-vect-loop.c (vect_create_epilog_for_reduction): Handle
loop unrolling in update of exit phis. Fix comment.
* tree-vect-slp.c (vect_analyze_slp): Check that there are at
least two reduction statements in the loop before starting SLP
analysis.
From-SVN: r158650
2010-04-22 Alexander Monakov <amonakov@ispras.ru>
* tree-ssa-reassoc.c (eliminate_plus_minus_pair): Handle BIT_NOT_EXPR
to simplify a + ~a.
* gfortran.dg/reassoc_6.f: New testcase.
From-SVN: r158645
2010-04-22 Laurynas Biveinis <laurynas.biveinis@gmail.com>
* tree-parloops.c (loop_parallel_p): New argument
parloop_obstack. Pass it down.
(parallelize_loops): New variable parloop_obstack. Initialize it,
pass it down, free it.
* tree-loop-linear.c (linear_transform_loops): Pass down
lambda_obstack.
* tree-data-ref.h (lambda_compute_access_matrices): New argument
of type struct obstack *.
* tree-data-ref.c (analyze_subscript_affine_affine): New variable
scratch_obstack. Initialize it, pass down, free it.
* lambda.h (lambda_loop_new): Remove.
(lambda_matrix_new, lambda_matrix_inverse)
(lambda_trans_matrix_new, lambda_trans_matrix_inverse): New
argument of type struct obstack *.
* lambda-trans.c (lambda_trans_matrix_new): New argument
lambda_obstack. Pass it down, use obstack allocation for ret.
(lambda_trans_matrix_inverse): New argument lambda_obstack. Pass
it down.
* lambda-mat.c (lambda_matrix_get_column)
(lambda_matrix_project_to_null): Remove.
(lambda_matrix_new): New argument lambda_obstack. Use obstack
allocation for mat.
(lambda_matrix_inverse_hard, lambda_matrix_inverse): New argument
lambda_obstack.
* lambda-code.c (lambda_loop_new): New function.
(lambda_lattice_new, compute_nest_using_fourier_motzkin)
(lambda_compute_auxillary_space, lambda_compute_target_space)
(lambda_loopnest_transform, gcc_loop_to_lambda_loop)
(lambda_loopnest_to_gcc_loopnest): Pass down lambda_obstack.
(build_access_matrix): New argument lambda_obstack. Use obstack
allocation for am.
(lambda_compute_step_signs, lambda_compute_access_matrices): New
argument lambda_obstack. Pass it down.
From-SVN: r158644
2010-04-22 Richard Guenther <rguenther@suse.de>
PR tree-optimization/43845
* tree-ssa-pre.c (create_component_ref_by_pieces_1): Properly
lookup the CALL_EXPR function and arguments.
* gcc.c-torture/compile/pr43845.c: New testcase.
From-SVN: r158641
* ifcvt.c (dead_or_predicable): Use df_simulate_find_defs and
df_simulate_find_noclobber_defs as appropriate. Keep track of an
extra set merge_set_noclobber, and use it to relax the final test
slightly.
* df.h (df_simulate_find_noclobber_defs): Declare.
* df-problems.c (df_simulate_find_defs): Don't ignore partial or
conditional defs.
(df_simulate_find_noclobber_defs): New function.
From-SVN: r158639
2010-04-22 Johannes Singler <singler@kit.edu>
* include/parallel/partition.h (__parallel_partition):
Improve scalability by:
-introducing new variables __leftold, __rightold, __dist, thus
-getting rid of omp lock by using atomic operations
-getting rid of two omp barriers
From-SVN: r158636
* c-tree.h (push_init_level, pop_init_level, set_init_index)
(process_init_element): New argument of type struct obstack *.
* c-typeck.c (push_init_level, pop_init_level, set_designator)
(set_init_index, set_init_label, set_nonincremental_init)
(set_nonincremental_init_from_string, find_init_member)
(output_init_element, output_pending_init_elements)
(process_init_element): New argument braced_init_obstack. Pass it
down.
(push_range_stack, add_pending_init): New argument
braced_init_obstack. Use obstack allocation.
* c-parser.c (c_parser_initelt, c_parser_initval): New argument
braced_init_obstack. Pass it down.
(c_parser_braced_init): New variables ret, braced_init_obstack.
Initialize obstack, pass it down and finally free it.
From-SVN: r158634
2010-04-22 Richard Guenther <rguenther@suse.de>
PR fortran/43829
* resolve.c (gfc_resolve_index): Wrap around ...
(gfc_resolve_index_1): ... this. Add parameter to allow
any integer kind index type.
(resolve_array_ref): Allow any integer kind for the start
index of an array ref.
* gfortran.dg/vector_subscript_6.f90: New testcase.
* gfortran.dg/assign_10.f90: Adjust.
From-SVN: r158632
* lto-cgraph.c (lto_output_node): Do not output comdat groups
for boundary nodes.
(output_cgraph): Do not arrange comdat groups for boundary nodes.
From-SVN: r158615
* lto.c (globalize_cross_file_statics): When function has address taken,
it needs to be public.
* varpool.c (decide_is_variable_needed): Variable is always needed
during ltrans.
From-SVN: r158609
* cgraph.c (dump_cgraph_node): Dump also assembler name.
* ipa-inline.c (cgraph_decide_inlining_of_small_functions): Do not ice
at WPA dumping.
(cgraph_decide_inlining): Do not expect callee to be removed in all
cases.
From-SVN: r158607
PR middle-end/43570
* omp-low.c (scan_sharing_clauses): Don't scan_omp_op
OMP_CLAUSE_DECL for OMP_CLAUSE_COPYPRIVATE.
(lower_copyprivate_clauses): Use private var in outer
context instead of original var. Make sure the types
are correct for VLAs.
* testsuite/libgomp.fortran/vla8.f90: New test.
From-SVN: r158594
* dwarf2out.c (add_var_loc_to_decl): Add LABEL argument. Drop
last chain entry if it starts with the still current label.
(add_location_or_const_value_attribute): Check that
loc_list->first->next is NULL instead of comparing ->first with
->last.
(dwarf2out_var_location): Pass last_label resp. last_postcall_label
to add_var_loc_to_decl.
From-SVN: r158590
* dwarf2out.c (output_call_frame_info): For dw_cie_version
>= 4 add also address size and segment size fields into CIE
header.
* unwind-dw2.c (extract_cie_info): Handle CIE version 4, as
long as address size is the same as sizeof (void *) and
segment size is 0.
* unwind-dw2-fde.c (get_cie_encoding): Likewise. If
address size or segment size is unexpected, return DW_EH_PE_omit.
(classify_object_over_fdes): If get_cie_encoding returned
DW_EH_PE_omit, return -1.
(init_object): If classify_object_over_fdes returned -1,
pretend there were no FDEs at all.
From-SVN: r158589
* config/i386/i386.md (bswap<mode>2): Macroize expander from
bswap{si,di}2 using SWI48 mode iterator.
(*bswap<mode>2_movbe): Macroize insn from *bswap{si,di}_movbe using
SWI48 mode iterator. Set type attribute of bswap insn to bitmanip,
set modrm attribute of bswap insn to 0 and remove length attribute.
(*bswap<mode>2_1): Macroize insn from *bswap{si,di}_1 using SWI48 mode
iterator. Set type attribute to bitmanip, set modrm attribute to 0,
set mode attribute to <MODE> and remove length attribute.
From-SVN: r158587