2010-07-29 Janus Weil <janus@gcc.gnu.org>
PR fortran/45004
* trans-stmt.h (gfc_trans_class_init_assign): New prototype.
(gfc_trans_class_assign): Modified prototype.
* trans.h (gfc_conv_intrinsic_move_alloc): New prototype.
* trans-expr.c (gfc_trans_class_init_assign): Split off from ...
(gfc_trans_class_assign): ... here. Modified actual arguments.
* trans-intrinsic.c (gfc_conv_intrinsic_move_alloc): New function to
handle the MOVE_ALLOC intrinsic with scalar and class arguments.
* trans.c (trans_code): Call 'gfc_conv_intrinsic_move_alloc'.
2010-07-29 Janus Weil <janus@gcc.gnu.org>
PR fortran/45004
* gfortran.dg/move_alloc_2.f90: New.
From-SVN: r162688
2010-07-28 Richard Guenther <rguenther@suse.de>
* double-int.h (double_int_and_not): New function.
* combine.c (try_combine): Use it.
* tree-vrp.c (simplify_bit_ops_using_ranges): Likewise.
From-SVN: r162681
PR rtl-optimization/42575
* dce.c (word_dce_process_block): Renamed from byte_dce_process_block.
Argument AU removed. All callers changed. Ignore artificial refs.
Use return value of df_word_lr_simulate_defs to decide whether an insn
is necessary.
(fast_dce): Rename arg to WORD_LEVEL.
(run_word_dce): Renamed from rest_of_handle_fast_byte_dce. No longer
static.
(pass_fast_rtl_byte_dce): Delete.
* dce.h (run_word_dce): Declare.
* df-core.c (df_print_word_regset): Renamed from df_print_byteregset.
All callers changed. Simplify code to only deal with two-word regs.
* df.h (DF_WORD_LR): Renamed from DF_BYTE_LR.
(DF_WORD_LR_BB_INFO): Renamed from DF_BYTE_LR_BB_INFO.
(DF_WORD_LR_IN): Renamed from DF_BYTE_LR_IN.
(DF_WORD_LR_OUT): Renamed from DF_BYTE_LR_OUT.
(struct df_word_lr_bb_info): Renamed from df_byte_lr_bb_info.
(df_word_lr_mark_ref): Declare.
(df_word_lr_add_problem, df_word_lr_mark_ref, df_word_lr_simulate_defs,
df_word_lr_simulate_uses): Declare or rename from byte variants.
(df_byte_lr_simulate_artificial_refs_at_top,
df_byte_lr_simulate_artificial_refs_at_end, df_byte_lr_get_regno_start,
df_byte_lr_get_regno_len, df_compute_accessed_bytes): Delete
declarations.
(df_word_lr_get_bb_info): Rename from df_byte_lr_get_bb_info.
(enum df_mm): Delete.
* df-byte-scan.c: Delete file.
* df-problems.c (df_word_lr_problem_data): Renamed from
df_byte_lr_problem_data, all members deleted except for
WORD_LR_BITMAPS, which is renamed from BYTE_LR_BITMAPS. Uses changed.
(df_word_lr_expand_bitmap, df_byte_lr_simulate_artificial_refs_at_top,
df_byte_lr_simulate_artificial_refs_at_end, df_byte_lr_get_regno_start,
df_byte_lr_get_regno_len, df_byte_lr_check_regs,
df_byte_lr_confluence_0): Delete functions.
(df_word_lr_free_bb_info): Renamed from df_byte_lr_free_bb_info; all
callers changed.
(df_word_lr_alloc): Renamed from df_byte_lr_alloc; all callers changed.
Don't initialize members that were deleted, don't try to discover data
about registers. Ignore hard regs.
(df_word_lr_reset): Renamed from df_byte_lr_reset; all callers changed.
(df_word_lr_mark_ref): New function.
(df_word_lr_bb_local_compute): Renamed from
df_byte_bb_lr_local_compute; all callers changed. Use
df_word_lr_mark_ref. Assert that artificial refs don't include
pseudos. Ignore hard registers.
(df_word_lr_local_compute): Renamed from df_byte_lr_local_compute.
Assert that exit block uses don't contain pseudos.
(df_word_lr_init): Renamed from df_byte_lr_init; all callers changed.
(df_word_lr_confluence_n): Renamed from df_byte_lr_confluence_n; all
callers changed. Ignore hard regs.
(df_word_lr_transfer_function): Renamed from
df_byte_lr_transfer_function; all callers changed.
(df_word_lr_free): Renamed from df_byte_lr_free; all callers changed.
(df_word_lr_top_dump): Renamed from df_byte_lr_top_dump; all callers
changed.
(df_word_lr_bottom_dump): Renamed from df_byte_lr_bottom_dump; all
callers changed.
(problem_WORD_LR): Renamed from problem_BYTE_LR; uses changed;
confluence operator 0 set to NULL.
(df_word_lr_add_problem): Renamed from df_byte_lr_add_problem; all
callers changed.
(df_word_lr_simulate_defs): Renamed from df_byte_lr_simulate_defs.
Return bool, true if bitmap changed or insn otherwise necessary.
All callers changed. Simplify using df_word_lr_mark_ref.
(df_word_lr_simulate_uses): Renamed from df_byte_lr_simulate_uses;
all callers changed. Simplify using df_word_lr_mark_ref.
* lower-subreg.c: Include "dce.h"
(decompose_multiword_subregs): Call run_word_dce if df available.
* Makefile.in (lower-subreg.o): Adjust dependencies.
(df-byte-scan.o): Delete.
* timevar.def (TV_DF_WORD_LR): Renamed from TV_DF_BYTE_LR.
From-SVN: r162678
2010-07-29 Richard Guenther <rguenther@suse.de>
* tree.c (build_vector): Assert that the vector constant
has enough elements.
(build_vector_from_ctor): Pad with trailing zeros.
From-SVN: r162677
2010-07-29 Richard Guenther <rguenther@suse.de>
PR middle-end/45034
* convert.c (convert_to_integer): Always use an unsigned
type for narrowed negate and bitwise not.
* gcc.c-torture/execute/pr45034.c: New testcase.
From-SVN: r162673
* tree-vect-loop.c (vect_create_epilog_for_reduction): Switch
to outer loop when creating reduction epilogue for double reduction,
and switch back to the inner loop when updating the phi nodes.
Update uses of outer loop exit phi nodes in double reduction (instead
of uses of reduction).
From-SVN: r162668
2010-07-28 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/44931
* io/inquire.c (inquire_via_unit): Use ttyname to return actual device
file name for stdin, stdout, and stderr. If ttyname does not succeed
fall back to default names for these units. Include string.h to allow
using strlen function.
* unix.c: Remove typedef of unix_stream structure, move to unix.h.
* unix.h: Add typedef of unix_stream structure so that it is
accessible to inquire.c.
From-SVN: r162667
IVOPT performance tuning patch. The main problem is a variant of maximal weight
bipartite matching/assignment problem -- i.e., there is an additional global
cost function. The complexity of the algorighm to find the optimial solution
> O(n^2). The existing algorithm in gcc tries to find the solution in 3 stages:
1) Find the initial solution set (dynamic programing style)
2) Extend the solution set
3) Prune the soultion set.
The problem is that in step 1, the initial set tends to be too large so that
the final solution is very likely local optimal.
This patch addresses the problem and sees very large SPEC improvements.
Another area of problem is that ivopts often creates loop invariant expressions, and
such expressions increase register pressure which is not counted. This is addressed
in this patch.
The third main problem is the profile data is not considered in cost computation
The forth problem is that loop invariant comptuation's cost is not properly adjusted.
There are more tuning opportuties, namely:
1) Do not check ivs dependency during ivs set pruning (this improves deallII 8% on core2)
2) Unconditionally consider all important candidates in partial set expansion (in addition
to the extended solutino based on selected candidates)
3) revisit the two stage initial set computation.
From-SVN: r162653
2010-07-28 Daniel Kraft <d@domob.eu>
* gfortran.h (gfc_build_intrinsic_call): New method.
* expr.c (gfc_build_intrinsic_call): New method.
* simplify.c (range_check): Ignore non-constant value.
(simplify_bound_dim): Handle non-variable expressions and
fix memory leak with non-free'ed expression.
(simplify_bound): Handle non-variable expressions.
(gfc_simplify_shape): Ditto.
(gfc_simplify_size): Ditto, but only in certain cases possible.
2010-07-28 Daniel Kraft <d@domob.eu>
* gfortran.dg/bound_8.f90: New test.
From-SVN: r162648
PR debug/45103
* dwarf2out.c (dwarf2out_var_location): Always consider
NOTE_DURING_CALL_P notes, even when not followed by real instructions.
From-SVN: r162646
2010-07-28 Richard Guenther <rguenther@suse.de>
* tree-ssa-ccp.c: Remove comment regarding STORE-CCP.
(set_lattice_value): Do not query an old default value.
(get_value_for_expr): New function. Properly canonicalize
float values.
(ccp_visit_phi_node): Use it.
From-SVN: r162638
* config/rs6000/rs6000.c (rs6000_override_options):
Use TARGET_MACHO inline, move darwin_one_byte_bool from here...
... to darwin_rs6000_override_options.
(rs6000_return_in_memory): Update preceding comment for darwin
64 bit ABI. Use TARGET_MACHO inline.
(rs6000_darwin64_struct_check_p): New.
(function_arg_advance): Use rs6000_darwin64_struct_check_p.
(function_arg): Likewise.
(rs6000_arg_partial_bytes): Likewise.
(rs6000_function_value): Likewise.
From-SVN: r162635
* config/darwin-driver.c (SWITCH_TAKES_ARG,
WORD_SWITCH_TAKES_ARG): Remove.
* cppspec.c (SWITCH_TAKES_ARG, WORD_SWITCH_TAKES_ARG): Remove.
* defaults.h (DEFAULT_SWITCH_TAKES_ARG,
DEFAULT_WORD_SWITCH_TAKES_ARG): Move from gcc.h.
(SWITCH_TAKES_ARG, WORD_SWITCH_TAKES_ARG): Move default
definitions from gcc.c.
* gcc.c (SWITCH_TAKES_ARG, WORD_SWITCH_TAKES_ARG): Move to
defaults.h.
* gcc.h (DEFAULT_SWITCH_TAKES_ARG, DEFAULT_WORD_SWITCH_TAKES_ARG):
Move to defaults.h.
* opts-common.c: Include tm.h.
(decode_cmdline_option): Use SWITCH_TAKES_ARG and
WORD_SWITCH_TAKES_ARG to count arguments to unknown options.
Handle more than one argument. Set canonical_option_num_elements.
(decode_cmdline_options_to_array): Set
canonical_option_num_elements and trailing elements of
canonical_option.
* opts.h (struct cl_decoded_option): Allow four elements in
canonical_option. Add field canonical_option_num_elements.
* Makefile.in (opts-common.o): Update dependencies.
ada:
* gcc-interface/misc.c (gnat_init_options): Ignore erroneous
options. Check canonical_option_num_elements on options copied.
fortran:
* gfortranspec.c (SWITCH_TAKES_ARG, WORD_SWITCH_TAKES_ARG):
Remove.
From-SVN: r162620
PR middle-end/44790
PR middle-end/44993
* expr.c (expand_expr_real_1) <MEM_REF>: Revert latest change. Make
sure the base has address_mode before adding the offset.
From-SVN: r162618