* gcc.dg/guality/guality.h: Include stdint.h. Drop unnecessary
unistd.h, sys/types.h and sys/wait.h.
(gualchk_t): New.
(GUALCVT): New.
(GUALCHKXPR, GUALCHKVAL, GUALCHKFLA): Use it.
(GUALITY_GDB_REDIRECT): New.
(GUALITY_GDB_ARGS): Use it.
From-SVN: r151434
* toplev.c (process_options): Move setter of flag_var_tracking
before other tests that depend on it. Move down setter of
flag_rename_registers. Don't enable var-tracking-assignments
by default if selective scheduling is enabled. Warn if both
are enabled.
From-SVN: r151433
* var-tracking.c (dv_is_decl_p): Adjust NULL behavior to match
comment. Use switch statement to catch overlaps between rtx
and tree codes. Accept FUNCTION_DECLs in addition to those in...
(IS_DECL_CODE): ... here. Remove.
(check_value_is_not_decl): Remove.
(dv_from_decl, dv_from_value): Check after conversion.
From-SVN: r151432
2009-09-04 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/41112
* tree-sra.c (build_ref_for_offset_1): Signal that we cannot
handle variable-bounded arrays.
(expr_with_var_bounded_array_refs_p): New function.
(analyze_access_subtree): Call expr_with_var_bounded_array_refs_p.
* testsuite/gnat.dg/array8.adb: New test.
From-SVN: r151420
2009-09-04 Andreas Krebbel <krebbel1@de.ibm.com>
* config/s390/s390.md ("*fmadd<mode>", "*fmsub<mode>"): Enable mem
RTXs in the predicate for operand 1.
From-SVN: r151416
* gcc.dg/guality/guality.exp: Only run guality tests if a trivial
testcase using guality.h compiles and links and if a global variable
can be verified by gdb.
From-SVN: r151410
2009-09-03 Daniel Gutson <dgutson@codesourcery.com>
* config/arm/arm.md (UNSPEC_RBIT): New constant.
(rbitsi2): New insn.
(ctzsi2): New expand.
* config/arm/arm.h (CTZ_DEFINED_VALUE_AT_ZERO): New macro.
testsuite/
* gcc.target/arm/ctz.c: New test case.
From-SVN: r151402
PR debug/41236
* dwarf2out.c (loc_descriptor): Don't use SUBREG_REG macro on
SIGN_EXTEND or ZERO_EXTEND. Don't assume there is a REG inside of
it or SUBREG.
From-SVN: r151385
PR debug/41238
* function.c (assign_parm_find_stack_rtl): Don't set mem attributes on
the stack slot if it is passed by invisible reference.
* var-tracking.c (vt_add_function_parameters): Handle arguments passed by
invisible reference.
From-SVN: r151384
gcc/
* config/bfin/linux.h (TARGET_SUPPORTS_SYNC_CALLS): Define to 1.
* config/bfin/uclinux.h (TARGET_SUPPORTS_SYNC_CALLS): Define to 1.
* config/bfin/bfin.h (TARGET_SUPPORTS_SYNC_CALLS): Provide default of
0.
* config/bfin/sync.md: New file.
* config/bfin/bfin.md: Include it.
(UNSPEC_ATOMIC): New.
(UNSPEC_ONES): Provide a unique number.
From Jie Zhang <jie.zhang@analog.com>:
* config/bfin/bfin.c (ret_regs): New.
(must_save_fp_p): Don't return true because of frame_pointer_needed.
(must_save_rets_p): New.
(n_regs_saved_by_prologue): Use must_save_rets_p instead of
current_function_is_leaf.
(do_link): Likewise.
(do_unlink): Likewise.
(expand_interrupt_handler_prologue): Use ret_regs array.
(expand_interrupt_handler_epilogue): Use ret_regs array and
pass return register to gen_return_internal.
(bfin_expand_epilogue): Pass return register to
gen_return_internal.
(bfin_expand_call): Explicitly clobber RETS.
* config/bfin/bfin.h (FUNCTION_RETURN_REGISTERS): Define.
* config/bfin/bfin.md (call_symbol_fdpic, call_value_symbol_fdpic,
call_insn_fdpic, call_value_insn_fdpic, call_symbol,
call_value_symbol, call_insn, call_value_insn): Explicitly clobber
RETS.
(return_internal): Take a reg rtx rather than the register number.
gcc/testsuite/
* lib/target-supports.exp (check_effective_target_sync_int_long):
Supported on Blackfin Linux targets.
From-SVN: r151381
2009-09-03 H.J. Lu <hongjiu.lu@intel.com>
* tree-parloops.c (parallelize_loops): Cast to HOST_WIDE_INT
when comparing against estimated_loop_iterations_int return.
From-SVN: r151378
ChangeLog:
* configure.ac (--with-build-config): New. Set BUILD_CONFIG.
Default to bootstrap-debug only if compare-debug works.
* configure: Rebuilt.
* Makefile.tpl: Make BUILD_CONFIG configure-configurable.
* Makefile.in: Rebuilt.
contrib/ChangeLog:
* bootstrap-debug-big.mk (STAGE2_CFLAGS): Drop -gtoggle.
* bootstrap-debug-lean.mk: Update comments.
(STAGE2_CFLAGS): Likewise.
(do-compare): Don't override.
gcc/ChangeLog:
* doc/invoke.texi (BUILD_CONFIG): Document --with-build-config.
(bootstrap-debug): Explain conditions in which it becomes default.
(bootstrap-debug-big): Rather than duplicate bootstrap-debug,
make it add to it.
From-SVN: r151367
libstdc++-v3/:
* configure.ac: Replace AC_CONFIG_COMMANDS([default])
instantiation with additional commands issued for each Makefile
in glibcxx_SUBDIRS, so `./config.status subdir/Makefile' also
runs these commands.
Add a separate AC_CONFIG_COMMANDS([generate-headers]) for
running `make' in include, passing `pch_build=' to `make'.
* configure: Regenerate.
From-SVN: r151352
* expr.h (emit_storent_insn, expand_expr_real_1,
expand_expr_real_2): Declare.
* expr.c (emit_storent_insn, expand_expr_real_1,
expand_expr_real_2): Export.
(store_expr): Setting and evaluating dont_return_target is
useless.
(expand_expr_real_1, <case GOTO_EXPR, RETURN_EXPR, SWITCH_EXPR,
LABEL_EXPR and ASM_EXPR>): Move to gcc_unreachable.
* except.c (expand_resx_expr): Rename to ...
(expand_resx_stmt): ... this. Rewrite to take gimple statement.
* except.h (expand_resx_stmt): Declare.
* stmt.c: Add include gimple.h
(expand_asm_expr): Rename to ...
(expand_asm_stmt): ... this. Rewrite to take gimple statement.
(expand_case): Rewrite to take gimple statement.
* tree.h (expand_asm_stmt): Declare.
(expand_case): Change prototype.
* Makefile.in (stmt.o): Depend on gimple.h.
* builtins.c (expand_builtin_synchronize): Build gimple asm
statement, not an ASM_EXPR.
* cfgexpand.c (gimple_cond_pred_to_tree, set_expr_location_r,
gimple_to_tree, release_stmt_tree): Remove.
(expand_gimple_cond): Don't call gimple_cond_pred_to_tree or
ggc_free, but hold comparison code and operands separately.
Call jumpif_1 and jumpifnot_1 instead of jumpif and jumpifnot.
(expand_call_stmt, expand_gimple_stmt_1,
expand_gimple_stmt): New helpers.
(expand_gimple_tailcall): Don't call gimple_to_tree, expand_expr_stmt,
release_stmt_tree. Call expand_gimple_stmt instead.
(expand_gimple_basic_block): Ditto.
* calls.c (emit_call_1): Don't look at EH regions here, make
fntree parameter useless.
(expand_call): New local rettype for TREE_TYPE(exp), use it
throughout. Remove local p, use addr instead.
Don't look at EH regions here.
From-SVN: r151350
2009-09-02 Vladimir Makarov <vmakarov@redhat.com>
* doc/invoke.texi (-fsched-pressure): Document it.
(-fsched-reg-pressure-heuristic): Remove it.
* reload.c (ira.h): Include.
(find_reloads): Add choosing reload on number of small spilled
classes.
* haifa-sched.c (ira.h): Include.
(sched_pressure_p, sched_regno_cover_class, curr_reg_pressure,
saved_reg_pressure, curr_reg_live, saved_reg_live,
region_ref_regs): New variables.
(sched_init_region_reg_pressure_info, mark_regno_birth_or_death,
initiate_reg_pressure_info, setup_ref_regs,
initiate_bb_reg_pressure_info, save_reg_pressure,
restore_reg_pressure, dying_use_p, print_curr_reg_pressure): New
functions.
(setup_insn_reg_pressure_info): New function.
(rank_for_schedule): Add pressure checking and insn issue time.
Remove comparison of insn reg weights.
(ready_sort): Set insn reg pressure info.
(update_register_pressure, setup_insn_max_reg_pressure,
update_reg_and_insn_max_reg_pressure,
sched_setup_bb_reg_pressure_info): New functions.
(schedule_insn): Add code for printing and updating reg pressure
info.
(find_set_reg_weight, find_insn_reg_weight): Remove.
(ok_for_early_queue_removal): Do nothing if pressure_only_p.
(debug_ready_list): Print reg pressure info.
(schedule_block): Ditto. Check insn issue time.
(sched_init): Set up sched_pressure_p. Allocate and set up some
reg pressure related info.
(sched_finish): Free some reg pressure related info.
(fix_tick_ready): Make insn always ready if pressure_p.
(init_h_i_d): Don't call find_insn_reg_weight.
(haifa_finish_h_i_d): Free insn reg pressure info.
* ira-int.h (ira_hard_regno_cover_class, ira_reg_class_nregs,
ira_memory_move_cost, ira_class_hard_regs,
ira_class_hard_regs_num, ira_no_alloc_regs,
ira_available_class_regs, ira_reg_class_cover_size,
ira_reg_class_cover, ira_class_translate): Move to ira.h.
* ira-lives.c (single_reg_class): Check mode to find how many
registers are necessary for operand.
(ira_implicitly_set_insn_hard_regs): New.
* common.opt (fsched-pressure): New options.
(fsched-reg-pressure-heuristic): Remove.
* ira.c (setup_eliminable_regset): Rename to
ira_setup_eliminable_regset. Make it external.
(expand_reg_info): Pass cover class to setup_reg_classes.
(ira): Call resize_reg_info instead of allocate_reg_info.
* sched-deps.c: Include ira.h.
(implicit_reg_pending_clobbers, implicit_reg_pending_uses): New.
(create_insn_reg_use, create_insn_reg_set, setup_insn_reg_uses,
reg_pressure_info, insn_use_p, mark_insn_pseudo_birth,
mark_insn_hard_regno_birth, mark_insn_reg_birth,
mark_pseudo_death, mark_hard_regno_death, mark_reg_death,
mark_insn_reg_store, mark_insn_reg_clobber,
setup_insn_reg_pressure_info): New.
(sched_analyze_1): Update implicit_reg_pending_uses.
(sched_analyze_insn): Find implicit sets, uses, clobbers of regs.
Use them to create dependencies. Set insn reg uses and pressure
info. Process reg_pending_uses in one place.
(free_deps): Free implicit sets.
(remove_from_deps): Remove implicit sets if necessary. Check
implicit sets when clearing reg_last_in_use.
(init_deps_global): Clear implicit_reg_pending_clobbers and
implicit_reg_pending_uses.
* ira.h (ira_hard_regno_cover_class, ira_reg_class_nregs,
ira_memory_move_cost, ira_class_hard_regs,
ira_class_hard_regs_num, ira_no_alloc_regs,
ira_available_class_regs, ira_reg_class_cover_size,
ira_reg_class_cover, ira_class_translate): Move from ira-int.h.
(ira_setup_eliminable_regset, ira_set_pseudo_classes,
ira_implicitly_set_insn_hard_regs): New prototypes.
* ira-costs.c (pseudo_classes_defined_p, allocno_p,
cost_elements_num): New variables.
(allocno_costs, total_costs): Rename to costs and
total_allocno_costs.
(COSTS_OF_ALLOCNO): Rename to COSTS.
(allocno_pref): Rename to pref.
(allocno_pref_buffer): Rename to pref_buffer.
(common_classes): Rename to regno_cover_class.
(COST_INDEX): New.
(record_reg_classes): Set allocno attributes only if allocno_p.
(record_address_regs): Ditto. Use COST_INDEX instead of
ALLOCNO_NUM.
(scan_one_insn): Use COST_INDEX and COSTS instead of ALLOCNO_NUM
and COSTS_OF_ALLOCNO.
(print_costs): Rename to print_allocno_costs.
(print_pseudo_costs): New.
(process_bb_node_for_costs): Split into 2 functions with new
function process_bb_for_costs. Pass BB to process_bb_for_costs.
(find_allocno_class_costs): Rename to find_costs_and_classes. Add
new parameter dump_file. Use cost_elements_num instead of
ira_allocnos_num. Make one iteration if preferred classes were
already calculated for scheduler. Make 2 versions of code
depending on allocno_p.
(setup_allocno_cover_class_and_costs): Check allocno_p. Use
regno_cover_class and COSTS instead of common_classes and
COSTS_OF_ALLOCNO.
(init_costs, finish_costs): New.
(ira_costs): Set up allocno_p and cost_elements_num. Call
init_costs and finish_costs.
(ira_set_pseudo_classes): New.
* rtl.h (allocate_reg_info): Remove.
(resize_reg_info): Change return type.
(reg_cover_class): New.
(setup_reg_classes): Add new parameter.
* sched-int.h (struct deps_reg): New member implicit_sets.
(sched_pressure_p, sched_regno_cover_class): New external
definitions.
(INCREASE_BITS): New macro.
(struct reg_pressure_data, struct reg_use_data): New.
(struct _haifa_insn_data): Remove reg_weight. Add members
reg_pressure, reg_use_list, reg_set_list, and
reg_pressure_excess_cost_change.
(struct deps): New member implicit_sets.
(pressure_p): New variable.
(COVER_CLASS_BITS, INCREASE_BITS): New macros.
(struct reg_pressure_data, struct reg_use_data): New.
(INSN_REG_WEIGHT): Remove.
(INSN_REG_PRESSURE, INSN_MAX_REG_PRESSURE, INSN_REG_USE_LIST,
INSN_REG_SET_LIST, INSN_REG_PRESSURE_EXCESS_COST_CHANGE): New
macros.
(sched_init_region_reg_pressure_info,
sched_setup_bb_reg_pressure_info): New prototypes.
* reginfo.c (struct reg_pref): New member coverclass.
(reg_cover_class): New function.
(reginfo_init, pass_reginfo_init): Move after free_reg_info.
(reg_info_size): New variable.
(allocate_reg_info): Make static. Setup reg_info_size.
(resize_reg_info): Use reg_info_size. Return flag of resizing.
(setup_reg_classes): Add a new parameter. Setup cover class too.
* Makefile.in (reload.o, haifa-sched.o, sched-deps.o): Add ira.h to the
dependencies.
* sched-rgn.c (deps_join): Set up implicit_sets.
(schedule_region): Set up region and basic blocks pressure
relative info.
* passes.c (init_optimization_passes): Move
pass_subregs_of_mode_init before pass_sched.
From-SVN: r151348
2009-09-02 Martin Jambor <mjambor@suse.cz>
* tree-sra.c (struct access): New field grp_hint.
(dump_access): Dump grp_hint.
(sort_and_splice_var_accesses): Set grp_hint if a group is read
multiple times.
(analyze_access_subtree): Only scalarize accesses with grp_hint set or
those which have been specifically read and somehow written to.
(propagate_subacesses_accross_link): Set grp_hint of right child and
also possibly of the left child.
* testsuite/gcc.dg/tree-ssa/sra-8.c: New testcase.
* testsuite/gcc.dg/memcpy-1.c: Add . to match pattern.
* testsuite/gcc.dg/uninit-I.c: XFAIL warning test.
* testsuite/g++.dg/warn/unit-1.C: XFAIL warning test.
From-SVN: r151345