PR tree-optimization/43984
* tree-ssa-pre.c (inserted_phi_names): Remove.
(inserted_exprs): Change to bitmap.
(create_expression_by_pieces): Set bits, don't append to vector.
(insert_into_preds_of_block): Don't handle inserted_phi_names.
(eliminate): Don't look at inserted_phi_names, remove deleted
insns from inserted_exprs.
(remove_dead_inserted_code): Adjust to use bitmaps instead of
vectors.
(init_pre, fini_pre): Allocate and free bitmaps.
(execute_pre): Insert insns on edges before elimination.
testsuite/
* gfortran.dg/pr43984.f90: New test.
From-SVN: r159106
2010-05-06 Richard Guenther <rguenther@suse.de>
PR tree-optimization/43571
* domwalk.c (walk_dominator_tree): Walk the dominator
sons in more optimal order.
From-SVN: r159100
2010-05-06 Richard Guenther <rguenther@suse.de>
PR tree-optimization/43934
* tree-ssa-loop-im.c (movement_possibility): Handle PHI nodes.
(stmt_cost): Likewise.
(extract_true_false_args_from_phi): New helper.
(determine_max_movement): For PHI nodes verify we can hoist them
and compute their cost.
(determine_invariantness_stmt): Handle PHI nodes.
(move_computations_stmt): Likewise. Hoist PHI nodes in
if-converted form using COND_EXPRs.
(move_computations): Return TODO_cleanup_cfg if we hoisted PHI
nodes.
(tree_ssa_lim): Likewise.
* tree-flow.h (tree_ssa_lim): Adjust prototype.
* tree-ssa-loop.c (tree_ssa_loop_im): Return todo.
* gcc.dg/tree-ssa/ssa-lim-9.c: New testcase.
From-SVN: r159099
2010-05-06 Richard Guenther <rguenther@suse.de>
PR tree-optimization/43987
* tree-ssa-structalias.c (could_have_pointers): For possibly
address-taken variables force pointers to be recorded.
(create_variable_info_for_1): Likewise.
(push_fields_onto_fieldstack): Pass in wheter all fields
must have pointers.
(find_func_aliases): Query types instead of vars whether
they contain pointers where appropriate.
* gcc.c-torture/execute/pr43987.c: New testcase.
* gcc.dg/torture/pta-escape-1.c: Adjust.
* gcc.dg/tree-ssa/pta-escape-1.c: Likewise.
* gcc.dg/tree-ssa/pta-escape-2.c: Likewise.
* gcc.dg/tree-ssa/pta-escape-3.c: Likewise.
* gcc.dg/ipa/ipa-pta-11.c: Likewise.
From-SVN: r159098
PR tree-optimization/43901
* tree-vect-stmts.c (vectorizable_call): Assert that vector
type is not NULL if it's transformation phase, and return
FALSE if it's analysis.
(vectorizable_conversion, vectorizable_operation,
vectorizable_type_demotion, vectorizable_type_promotion):
Likewise.
From-SVN: r159095
* stor-layout.c (pending_sizes): Change the type to
VEC(tree,gc) *.
(get_pending_sizes, put_pending_size, put_pending_sizes):
Update the uses of pending_sizes.
* c-decl.c (store_parm_decls): Likewise.
* c-tree.h (struct c_arg_info): Likewise.
* tree.h: Update the prototype for get_pending_sizes and
put_pending_sizes.
From-SVN: r159085
2010-05-05 Paolo Carlini <paolo.carlini@oracle.com>
* testsuite/23_containers/vector/bool/capacity/29134.cc: Adjust
for profile-mode too.
* testsuite/23_containers/vector/bool/modifiers/insert/31370.cc:
Likewise.
2010-05-05 Paolo Carlini <paolo.carlini@oracle.com>
* include/profile/unordered_map (unordered_map<>::insert(_InputIter,
_InputIter), unordered_multimap<>::insert(_InputIter, _InputIter)):
Fix typo, don't call base() on __first and __last.
2010-05-05 Paolo Carlini <paolo.carlini@oracle.com>
Fix profile-mode vs -std=c++0x
* include/profile/impl/profiler_trace.h: Do not include the
whole <algorithm>, include <bits/stl_heap.h> (additionally
to <bits/stl_algobase.h>).
(__write_cost_factors): Replace std::for_each with open-coding.
(__set_cost_factors): Likewise.
(__report): Likewise; use std::make_heap / std::sort_heap
instead of std::sort.
(__report_cost_factors): Replace std::remove with open-coding.
(__warn, __cost_factor_writer, __cost_factor_setter): Remove.
From-SVN: r159082
gcc/fortran/:
2010-05-05 Daniel Franke <franke.daniel@gmail.com>
PR fortran/24978
* gfortran.h: Removed repeat count from constructor, removed
all usages.
* data.h (gfc_assign_data_value_range): Changed return value from
void to gfc_try.
* data.c (gfc_assign_data_value): Add location to constructor element.
(gfc_assign_data_value_range): Call gfc_assign_data_value()
for each element in range. Return early if an error was generated.
* resolve.c (check_data_variable): Stop early if range assignment
generated an error.
gcc/testsuite/:
2010-05-05 Daniel Franke <franke.daniel@gmail.com>
PR fortran/24978
* gfortran.dg/data_invalid.f90: New.
From-SVN: r159076
PR debug/43478
* df-problems.c (struct dead_debug_use, struct dead_debug): New.
(dead_debug_init, dead_debug_finish): New functions.
(dead_debug_add, dead_debug_insert_before): Likewise.
(df_note_bb_compute): Initialize a dead_debug object, add dead
debug uses to it, insert debug bind insns before death insns,
reset debug insns that refer to pending uses at the end.
* rtl.h (make_debug_expr_from_rtl): New prototype.
* varasm.c (make_debug_expr_from_rtl): New function.
Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
From-SVN: r159063
* lto-symtab.c (lto_symtab_resolve_can_prevail_p): Alias of variable
with body can prevail.
* lto-symtab.c (lto_symtab_merge_decls_1): Prefer declarations with
size.
From-SVN: r159061
* var-tracking.c (var_debug_decl): Save DECL_DEBUG_EXPR value
in a temporary instead of invoking the macro multiple times.
(track_expr_p): Likewise.
From-SVN: r159058
2010-05-05 Janus Weil <janus@gcc.gnu.org>
PR fortran/43696
* resolve.c (resolve_fl_derived): Some fixes for class variables.
* symbol.c (gfc_build_class_symbol): Add separate class container for
class pointers.
2010-05-05 Janus Weil <janus@gcc.gnu.org>
PR fortran/43696
* gfortran.dg/class_17.f03: New.
From-SVN: r159056
* tree.c (free_lang_data_in_one_sizepos): New inline function.
(free_lang_data_in_type): Call it on TYPE_{MIN|MAX}_VALUE of numerical
types. Call it on TYPE_SIZE and TYPE_SIZE_UNIT of all types.
(free_lang_data_in_decl): Call it on DECL_SIZE and DECL_SIZE_UNIT of
all decls. Call it on DECL_FIELD_OFFSET of fields.
(find_decls_types_r): Follow DECL_VALUE_EXPR.
(iterative_hash_expr) <PLACEHOLDER_EXPR>: New case.
From-SVN: r159039
2010-05-04 Martin Jambor <mjambor@suse.cz>
* tree-sra.c (build_access_from_expr_1): The first parameter type
changed to simple tree.
(build_access_from_expr): Likewise, gsi parameter was eliminated.
(scan_assign_result): Renamed to assignment_mod_result, enum elements
renamed as well.
(build_accesses_from_assign): Removed all parameters except for a
simple gimple statement. Now returns a simple bool.
(scan_function): All non-analysis parts moved to separate functions
sra_modify_function_body and ipa_sra_modify_function_body. Removed all
parameters and updated both callers.
(sra_modify_expr): Removed parameter data.
(sra_modify_function_body): New function.
(perform_intra_sra): Call sra_modify_function_body to modify the
function body.
(replace_removed_params_ssa_names): Parameter data changed into
adjustments vector.
(sra_ipa_modify_expr): Likewise. Also removed unused parameter gsi and
changed the parameter dont_convert to convert with the opposite
meaning.
(sra_ipa_modify_assign): Parameter data changed into adjustments
vector, return value changed to bool.
(ipa_sra_modify_function_body): New function.
(sra_ipa_reset_debug_stmts): Updated a comment.
(modify_function): Use ipa_sra_modify_function_body to modify function
body.
From-SVN: r159038
gcc/
2010-05-04 H.J. Lu <hongjiu.lu@intel.com>
PR middle-end/43671
* alias.c (true_dependence): Handle the same VALUE in x and mem.
(canon_true_dependence): Likewise.
(write_dependence_p): Likewise.
gcc/testsuite/
2010-05-04 H.J. Lu <hongjiu.lu@intel.com>
PR middle-end/43671
* gcc.target/i386/pr43671.c: New.
From-SVN: r159033
* Makefile.in (cgraphbuild.o): Add dependency on ipa-utils.h
* cgraphbuild.c: Include ipa-utils.h
(record_reference_ctx): New struct.
(record_reference): Simplify to work on initializers; not statements.
(mark_address, mark_load, mark_store): New.
(build_cgraph_edges): Simplify using walk_stmt_load_store_addr_ops;
walk PHI nodes too.
(record_references_in_initializer): Update use of record_reference.
(rebuild_cgraph_edges): Simplify using walk_stmt_load_store_addr_ops;
walk PHI nodes too.
From-SVN: r159032
* lto-symtab.c (lto_cgraph_replace_node): Do not remove edges;
node will be removed anyway.
(lto_varpool_replace_node): Allow also unanalyzed nodes;
relink aliases of node into prevailing node.
* varpool.c (varpool_remove_node): Remove aliases properly;
when removing node, remove all its aliases too; remove DECL_INITIAL
of removed node; ggc_free the varpool node.
From-SVN: r159031