* 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
2006-12-07 Andrew Pinski <andrew_pinski@playstation.sony.com>
* config/spu/spu-c.c (spu_build_overload_builtin): Delete.
(spu_resolve_overloaded_builtin): Check for non scalar instead
of vector type and check the function call argument type also for non scalar.
Call build_function_call instead of spu_build_overload_builtin.
2006-12-07 Andrew Pinski <andrew_pinski@playstation.sony.com>
* gcc.target/spu: New directory.
* gcc.target/spu/spu.exp: New file.
* gcc.target/spu/intrinsics-1.c: New test.
From-SVN: r119637
2006-12-07 Richard Guenther <rguenther@suse.de>
* builtins.c (expand_builtin_pow): Adjust predicates for
pow to cbrt expansion to unsafe math and !HONOR_NANS for
negative base.
From-SVN: r119622
* tree-vrp.c (compare_values): Short circuit INTEGER_CST;
use fold_constant_to_binary; tolerate wrong type constants.
(value_intersect_p): Do just two tests.
From-SVN: r119619
* config/bfin/bfin.c (print_operand): New modifier 'N' for constants.
* config/bfin/bfin.md (ssashiftv2hi3, ssashifthi3, lshiftv2hi3,
lshifthi3): Use it, and fix the order of alternatives.
From-SVN: r119616
* common.opt (record-gcc-switches): New command line switch.
* target.h (print_switch_type): New enum.
(print_switch_fn_type): New typedef for a function pointer.
(struct gcc_target): Add record_gcc_switches and record_gcc_switches_section fields.
* target-def.h (TARGET_ASM_RECORD_GCC_SWITCHES): Provide a default definition.
(TARGET_ASM_RECORD_GCC_SWITCHES_SECTION): Provide a default definition.
* toplev.c (print_single_switch): Simplify by providing a pointer to function that will format and output the switch appropriately.
(print_switch_values): Likewise.
(print_to_asm_out_file): New function.
(print_to_stderr): New function.
(init_asm_output): If flag_record_gcc_switches is set then if the target supports recording the switches then emit them into the assembler output file, otherwise tell the user that the switch is not supported.
* varasm.c (eld_record_gcc_switches): New function. Example handler for the record_gcc_switches target hook.
* doc/tm.texi (TARGET_ASM_RECORD_GCC_SWITCHES): Document the new target hook.
(TARGET_ASM_RECORD_GCC_SWITCHES_SECTION): Likewise.
* doc/invoke.texi (-frecord-gcc-switches): Document.
From-SVN: r119615
2006-12-06 Tobias Burnus <burnus@net-b.de>
PR fortran/29711
* error.c (error_print): Fix handling of printf-style position specifiers
of the form "%3$d"
From-SVN: r119609