* tree-phinodes.c (remove_phi_node): Add argument
RELEASE_LHS_P. If given, release the SSA name on the LHS of
the PHI node.
Update all users.
* tree-ssa-dce.c: Remove forward declarations for static
functions. Re-arrange functions bodies as needed.
(find_obviously_necessary_stmts): Never mark PHI nodes as
obviously necessary.
From-SVN: r119740
PR target/30120
Revert:
2006-11-15 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.opt: New target option -mx87regparm.
* config/i386/i386.h (struct ix86_args): Add x87_nregs, x87_regno,
float_in_x87: Add new variables. mmx_words, sse_words: Remove.
(X87_REGPARM_MAX): Define.
* config/i386/i386.c (override_options): Error out for
-mx87regparm but no 80387 support.
(ix86_attribute_table): Add x87regparm.
(ix86_handle_cconv_attribute): Update comments for x87regparm.
(ix86_comp_type_attributes): Check for mismatched x87regparm types.
(ix86_function_x87regparm): New function.
(ix86_function_arg_regno_p): Add X87_REGPARM_MAX 80387 floating
point registers.
(init_cumulative_args): Initialize x87_nregs and float_in_x87
variables.
(function_arg_advance): Process x87_nregs and x87_regno when
floating point argument is to be passed in 80387 register.
(function_arg): Pass XFmode arguments in 80387 registers for local
functions. Pass SFmode and DFmode arguments to local functions
in 80387 registers when flag_unsafe_math_optimizations is set.
* reg-stack.c (convert_regs_entry): Disable NaN load for
stack registers that are used for argument passing.
* doc/extend.texi: Document x87regparm function attribute.
* doc/invoke.texi: Document -mx87regparm.
testsuite/ChangeLog:
PR target/30120
* gcc.target/i386/pr30120.c: New test.
Revert:
2006-11-15 Uros Bizjak <ubizjak@gmail.com>
* gcc.target/i386/x87regparm-1.c: New test.
* gcc.target/i386/x87regparm-2.c: New test.
* gcc.target/i386/x87regparm-3.c: New test.
* gcc.target/i386/x87regparm-4.c: New test.
From-SVN: r119734
* doc/loop.texi: Document number_of_latch_executions and
number_of_cond_exit_executions.
* tree-scalar-evolution.c (compute_overall_effect_of_inner_loop,
chrec_is_positive, number_of_iterations_for_all_loops,
scev_const_prop): Use number_of_latch_executions.
(set_nb_iterations_in_loop): Do not increase the value of the
number of iterations.
(number_of_iterations_in_loop): Renamed to ...
(number_of_latch_executions): ... this.
(number_of_exit_cond_executions): New function.
* tree-scalar-evolution.h (number_of_iterations_in_loop): Declaration
removed.
(number_of_latch_executions, number_of_exit_cond_executions): Declare.
* tree-ssa-loop-ivcanon.c (canonicalize_loop_induction_variables): Use
number_of_latch_executions.
* tree-data-ref.c (get_number_of_iters_for_loop): Use
number_of_exit_cond_executions.
* tree-vect-analyze.c (vect_get_loop_niters): Ditto.
* cfgloop.h (struct loop): Improve description of the nb_iterations
field.
* gcc.dg/tree-ssa/loop-17.c: Update outcome.
From-SVN: r119718
2006-12-10 Daniel Berlin <dberlin@dberlin.org>
* tree-ssa-alias.c (compact_name_tags): Use sort_tags_by_id.
(tree_pointer_compare): Remove.
From-SVN: r119714
2006-12-10 Andrew MacLeod <amacleod@redhat.com>
* common.opt (-ftree-lrs): Remove live range splitting option.
* makefile.in: Add tree-ssa-coalesce.o and reduce header dependancies.
* opts.c (decode_options): Remove flag_tree_live_range_split.
* tree-flow.h (struct var_ann_d): Rename fields from root_ to base_.
* tree-flow-inline.h (single_imm_use_p): New. Check for single use.
* tree-outof-ssa.c: Remove header files which aren't needed.
(SSANORM_*): Remove flags.
(print_exprs_edge, coalesce_abnormal_edges, coalesce_phi_operands,
coalesce_result_decls_and_copies, coalesce_asm_operands): Remove.
(coalesce_ssa_name): Move to tree-ssa-coalesce.c.
(assign_vars): Use Basevar instead of root_var structure.
(replace_def_variable): Dont do anything if def is replaceable.
(remove_ssa_form): Integrate functional changes.
(rewrite_out_of_ssa): Remove live-range_split option.
* tree-ssa-coalesce.c: New File for ssa-name coalescing.
(coalesce_cost): Calculate the cost of a coalesce.
(coalesce_cost_bb): Calculate the coalesce cost within a BB.
(coalesce_cost_edge): Calculate the coalesce cost on an edge.
(pop_cost_one_pair): Remove the best coalesce with cost 1 from the list.
(pop_best_coalesce): Remove the best coalesce from the list.
(coalesce_pair_map_hash): Calculate coalesce pair hash.
(coalesce_pair_map_eq): Compare 2 coalesce pairs for hash function.
(create_coalesce_list): Create a coalesce list object.
(delete_coalesce_list): Free a coalesce list object.
(find_coalesce_pair): Find matching pair in the coalesce list.
(add_cost_one_coalesce): Add a coalesce to the "cost one" list.
(add_coalesce): Add a coalesce to the coalesce list.
(compare_pairs): Comparision function to determine pair sorted order.
(num_coalesce_pairs): Number of coalesced pairs.
(first_coalesce_pair, end_coalesce_pair_p, next_coalesce_pair):
Coalesce pair iterator functions.
(sort_coalesce_list): Sort coalesce pairs in order of expense.
(dump_coalesce_list): Show coalesce list.
(ssa_conflicts_new): Create an SSA conflict graph.
(ssa_conflicts_delete): Delete an SSA conflict graph.
(ssa_conflicts_test_p): Test for conflicts.
(ssa_conflicts_add_one): Add a single conflict.
(ssa_conflicts_add): Add a conflict pair.
(ssa_conflicts_merge): Merge conflicts.
(struct live_track_d): Struct for tracking live partitions.
(new_live_track): Create new live_track object.
(delete_live_track): Delete a live_track object.
(live_track_remove_partition): Remove a partition from the live list.
(live_track_add_partition): Add a partition from the live list.
(live_track_clear_var): Take VAR from the live list.
(live_track_live_p): Is var live?
(live_track_process_use): Make var come alive.
(live_track_process_def): Make var go dead, add conflicts.
(live_track_init): Initialize to a live on exit set.
(live_track_clear_base_vars): Clear live partitions.
(build_ssa_conflict_graph): Build a conflict graph.
(print_exprs): Common debug output routine.
(abnormal_corrupt): Output info about a failed coalesce across an
abnormal edge.
(fail_abnormal_edge_coalesce): Output info about a failed MUST_COALESCE.
(create_outofssa_var_map): Create a var map and coalesce list.
(attempt_coalesce): Coalesce a pair.
(coalesce_partitions): Coalesce all pairs in a coalesce list.
(coalesce_ssa_name): Entry point. Determine what ssa_names to coalesce.
* tree-ssa-live.c: Remove header files which aren't needed.
(var_map_base_init): New. Initialize a basevar list.
(var_map_base_fini): New. Finish a basevar list.
(init_var_map): Initialize new fields.
(delete_var_map): Free new fields.
(var_union): Use renamed fields.
(compact_var_map): Remove.
(partition_to_view_init): Use renamed fields, change order of an if.
(partition_view_fini): Use renamed fields.
(partition_view_normal): Create basevar list if requested.
(partition_view_bitmap): Create a view based on a bitmap of partitions.
(change_partition_var): Use renamed fields.
(create_ssa_var_map): Remove.
(tpa_init, tpa_remove_partition, tpa_delete, tpa_compact,
root_var_init): Remove.
(partition_pair_map_hash, partition_pair_map_eq, create_coalesce_list,
delete_coalesce_list, find_partition_pair, coalesce_cost, add_coalesce,
compare_pairs, num_coalesce_pairs, first_partition_pair,
end_partition_pair_p, next_partition_pair, sort_coalesce_list,
pop_best_coalesce, add_conflicts_if_valid, set_if_valid,
build_tree_conflict_graph, coalesce_tpa_members, dump_coalesce_list,
tpa_dump): Moved to tree-ssa-coalesce.c and/or renamed there.
(dump_var_map): Use renamed fields.
* tree-ssa-live.h (struct _var_map): Modify fields.
(partition_to_var, version_to_var, var_to_partition): Use renamed
fields.
(basevar_index): New. Index of the base variable of a partition.
(num_basevars): New. Number of unique base variables in partition map.
(register_ssa_partition): Use renamed fields.
(struct tree_partition_associator_d): Remove.
(tpa_num_trees, tpa_tree, tpa_first_partition, tpa_next_partition,
tpa_find_tree, tpa_decompact, root_var_init, root_var_num,
root_var, root_var_first_partition, root_var_next_partition,
root_var_dump, root_var_delete, root_var_remove_partition,
root_var_find, root_var_compact, root_var_decompact): Remove.
(struct partition_pair, struct coalesce_list_d): Moved to
tree-ssa-coalesce.c
* tree-ssa-ter.c: Remove header files which aren't needed.
From-SVN: r119711
2006-12-10 Andreas Tobler <a.tobler@schweiz.org>
PR bootstrap/30134
* configure.in: Correct x86 darwin support for libjava to powerpc
and i?86 only.
* configure: Regenerate.
From-SVN: r119708
* cse.c: (struct cse_basic_block_data): Remove LAST field.
(struct branch_path): Remove BRANCH and TAKEN fields. Add new
BB field.
(cse_visited_basic_blocks): New static bitmap.
(cse_end_of_basic_block, cse_basic_block): Remove.
(cse_find_path, cse_dump_path, cse_prescan_path,
cse_extended_basic_block): New static functions.
(cse_insn): Don't CSE over setjmp calls. Use the CFG to find
basic block boundaries. Don't record jump equivalences here.
Update the CFG after doing in-place replacement of the SET_SRC.
(cse_main): Rewrite. Look for extended basic block headers
and call cse_extended_basic_block on them until all paths that
start at this header are exhausted.
(rest_of_handle_cse): Verify that the CFG is incrementally updated
and correct after cse_main.
Don't call delete_trivially_dead_insns, let cfgcleanup do that.
(rest_of_handle_cse2): Verify the CFG here, too, after cse_main.
(pass_cse): Add TODO_verify_flow.
(pass_cse2): Likewise.
From-SVN: r119706
2006-12-04 Rask Ingemann Lambertsen <rask@sygehus.dk>
* reload1.c (choose_reload_regs): Don't set byte offset when
resolving subregs of hard regs.
From-SVN: r119705
2006-12-09 Paul Thomas <pault@gcc.gnu.org>
PR fortran/29975
PR fortran/30068
PR fortran/30096
* interface.c (compare_type_rank_if): Reject invalid generic
interfaces.
(check_interface1): Give a warning for nonreferred to ambiguous
interfaces.
(check_sym_interfaces): Check whether an ambiguous interface is
referred to. Do not check host associated interfaces since these
cannot be ambiguous with the local versions.
(check_uop_interface, gfc_check_interfaces): Update call to
check_interface1.
* symbol.c (gfc_get_sym_tree, gfc_get_sym_tree): Allow adding
unambiguous procedures to generic interfaces.
* gfortran.h (symbol_attribute): Added use_only and
ambiguous_interfaces.
* module.c (load_need): Set the use_only flag, if needed.
* resolve.c (resolve_fl_procedure): Warn for nonreferred
interfaces.
* expr.c (find_array_section): Fix initializer array contructor.
2006-12-09 Paul Thomas <pault@gcc.gnu.org>
Tobias Burnus <burnus@gcc.gnu.org>
PR fortran/29975
PR fortran/30068
* gfortran.dg/interface_4.f90: Test adding procedure to generic
interface.
* gfortran.dg/interface_5.f90: Test warning for not-referenced-to
ambiguous interfaces.
* gfortran.dg/interface_6.f90: Test invalid, ambiguous interface.
* gfortran.dg/interface_7.f90: Test invalid, ambiguous interface.
* gfortran.dg/interface_8.f90: Test warning for not-referenced-to
ambiguous interfaces.
* gfortran.dg/interface_1.f90: Change dg-error into a dg-warning.
* gfortran.dg/array_initializer_2.f90: Add initializer array
constructor test.
PR fortran/30096
* gfortran.dg/interface_9.f90: Test that host interfaces are
not checked for ambiguity with the local version.
Co-Authored-By: Tobias Burnus <burnus@gcc.gnu.org>
From-SVN: r119697
2006-11-25 Paul Thomas <pault@gcc.gnu.org>
PR fortran/29464
* module.c (load_generic_interfaces): Add symbols for all the
local names of an interface. Share the interface amongst the
symbols.
* gfortran.h : Add generic_copy to symbol_attribute.
* symbol.c (free_symbol): Only free interface if generic_copy
is not set.
2006-11-25 Paul Thomas <pault@gcc.gnu.org>
PR fortran/29464
* gfortran.dg/module_interface_2.f90: New test.
From-SVN: r119696
2006-12-09 Paul Thomas <pault@gcc.gnu.org>
PR fortran/29941
* resolve.c (resolve_function): Add LEN to the functions not
checked for assumed size actual args.
2006-12-09 Paul Thomas <pault@gcc.gnu.org>
PR fortran/29941
* gfortran.dg/assumed_len.f90: New test.
From-SVN: r119695
* config/spu/spu-protos.h (spu_split_immediate): Renamed from
spu_split_address.
(cpat_const_p, gen_cpat_const): Add.
* config/spu/spu.c (immediate_class): New enum.
(cpat_info, classify_immediate): New.
(print_operand): Use S, D, T instead of F, G, H. Use
classify_immediate. Handle cpat cases.
(spu_split_immediate): Renamed from spu_split_address. Split all
immediates that can be split.
(immediate_load_p): Use classify_immediate.
(spu_legitimate_constant_p): Accept everything except some cases of
CONST_VECTOR.
(spu_expand_move): Use spu_split_immedate.
(fsmbi_const_p): Use classify_immediate.
(cpat_const_p): New.
(gen_cpat_const: New.
* config/spu/constraints.md (j,k,l): New constraints for cpat
instructions.
* config/spu/spu.md (unnamed splitter): Change address splitter to
handle all immediates.
(_mov<mode>, _movdi, _movti): Handle i, j, k constraints for cpat
instructions.
(cpat, _cpat, splitter): Generate a TImode constant for cpat patterns
when possible.
From-SVN: r119682
* lib/target-supports.exp
(check_effective_target_large_long_double): New.
* gcc.dg/Wconversion-real.c : Use it.
* gcc.dg/Wconversion-integer.c : Fix for targets where char is
unsigned.
From-SVN: r119662
2006-12-08 Andrew MacLeod <amacleod@redhat.com>
* Makefile.in: Add new file tree-ssa-ter.c.
* tree-outof-ssa.c (struct temp_expr_table_d, new_temp_expr_table,
free_temp_expr_table, add_value_to_version_list,
add_value_to_partition_list, remove_value_from_partition_list,
add_dependence, check_replaceable, finish_expr, mark_replaceable,
kill_expr, kill_virtual_exprs, find_replaceable_in_bb,
find_replaceable_exprs, dump_replaceable_exprs): Move to tree-ssa-ter.c.
* tree-ssa-live.h (find_replaceable_exprs, dump_replaceable_exprs): Add
prototypes.
* tree-ssa-ter.c: New file using code moved from tree-outof-ssa.c.
(struct value_expr_d): Remove.
(struct temp_expr_table_d): Rename fields, add explicit vector of
replaceable expressions instead of sharing. Change value_expr_p's to
bitmap. Delete free_list.
(new_temp_expr_table): Rename fields, count number of ssa_names in
each partition.
(free_temp_expr_table): Rename field, free new fields.
(new_value_expr, free_value_expr, find_value_in_list, add_value_to_list,
add_info_to_list, remove_value_from_list): Delete.
(version_to_be_replaced_p): New. Is an ssa-name replaceable?
(make_dependent_on_partition): New. Set bit in version list, allocating
a bitmap if need be.
(add_to_partition_kill_list): New. Set bit in the partition list,
allocating a bitmap if need be.
(remove_from_partition_kill_list): New. Remove a bit from the
partition list, free the bitmap if it is empty.
(add_dependence): Use renamed field, cleanup. Don't add a dependence
on partitions with only one member.
(is_replaceable_p): New. Split out replaceability check from
check_replaceable.
(process_replaceable): New. Replacement code split from
check_replaceable.
(check_replaceable): Removed.
(finished_with_expr): Renamed from finish_expr.
(kill_expr): Use renamed fields. Less parameters.
(kill_virtual_exprs): Less parameters.
(mark_replaceable): Use renamed fields.
(find_replaceable_in_bb): Use renamed fields, cleanup.
(find_replaceable_exprs): Use renamed routines, cleanup.
(dump_replaceable_exprs): don;t go past end of ssa_names list.
(debug_ter): New. Debug routine to dump state.
From-SVN: r119657
* config/bfin/bfin.c (effective_address_32bit_p): Return true for
anything involving the GOT.
(bfin_adjust_cost): Don't take the REGNO of a MEM.
(trapping_loads_p): Look inside the pattern of an insn to find the
SET.
* config/bfin/bfin.md (attr "type"): Add movcc.
(insn_reservation "alu"): Likewise.
(movsicc_insn1, movsicc_insn2): Change type to movcc.
From-SVN: r119655