Commit Graph

940 Commits

Author SHA1 Message Date
David Malcolm 0f82e5c9fb Split NEXT_INSN/PREV_INSN into lvalue and rvalue forms
/
2014-08-19  David Malcolm  <dmalcolm@redhat.com>

	* rtx-classes-status.txt: Add SET_NEXT_INSN, SET_PREV_INSN.

gcc/
2014-08-19  David Malcolm  <dmalcolm@redhat.com>

	* rtl.h (PREV_INSN): Split macro in two: the existing one,
	for rvalues, and...
	(SET_PREV_INSN): New macro, for use as an lvalue.
	(NEXT_INSN, SET_NEXT_INSN): Likewise.

	* caller-save.c (save_call_clobbered_regs): Convert lvalue use of
	PREV_INSN/NEXT_INSN into SET_PREV_INSN/SET_NEXT_INSN.
	* cfgrtl.c (try_redirect_by_replacing_jump): Likewise.
	(fixup_abnormal_edges): Likewise.
	(unlink_insn_chain): Likewise.
	(fixup_reorder_chain): Likewise.
	(cfg_layout_delete_block): Likewise.
	(cfg_layout_merge_blocks): Likewise.
	* combine.c (update_cfg_for_uncondjump): Likewise.
	* emit-rtl.c (link_insn_into_chain): Likewise.
	(remove_insn): Likewise.
	(delete_insns_since): Likewise.
	(reorder_insns_nobb): Likewise.
	(emit_insn_after_1): Likewise.
	* final.c (rest_of_clean_state): Likewise.
	(final_scan_insn): Likewise.
	* gcse.c (can_assign_to_reg_without_clobbers_p): Likewise.
	* haifa-sched.c (concat_note_lists): Likewise.
	(remove_notes): Likewise.
	(restore_other_notes): Likewise.
	(move_insn): Likewise.
	(unlink_bb_notes): Likewise.
	(restore_bb_notes): Likewise.
	* jump.c (delete_for_peephole): Likewise.
	* optabs.c (emit_libcall_block_1): Likewise.
	* reorg.c (emit_delay_sequence): Likewise.
	(fill_simple_delay_slots): Likewise.
	* sel-sched-ir.c (sel_move_insn): Likewise.
	(sel_remove_insn): Likewise.
	(get_bb_note_from_pool): Likewise.
	* sel-sched.c (move_nop_to_previous_block): Likewise.

	* config/bfin/bfin.c (reorder_var_tracking_notes): Likewise.
	* config/c6x/c6x.c (gen_one_bundle): Likewise.
	(c6x_gen_bundles): Likewise.
	(hwloop_optimize): Likewise.
	* config/frv/frv.c (frv_function_prologue): Likewise.
	(frv_register_nop): Likewise.
	* config/ia64/ia64.c (ia64_init_dfa_pre_cycle_insn): Likewise.
	(ia64_reorg): Likewise.
	* config/mep/mep.c (mep_reorg_addcombine): Likewise.
	(mep_make_bundle): Likewise.
	(mep_bundle_insns): Likewise.
	* config/picochip/picochip.c (reorder_var_tracking_notes): Likewise.
	* config/tilegx/tilegx.c (reorder_var_tracking_notes): Likewise.
	* config/tilepro/tilepro.c (reorder_var_tracking_notes): Likewise.

From-SVN: r214128
2014-08-19 00:54:22 +00:00
David Malcolm 70e7f57d38 New function: for_each_rtx_in_insn
gcc/
2014-08-18  David Malcolm  <dmalcolm@redhat.com>

	* rtl.h (for_each_rtx_in_insn): New function.
	* rtlanal.c (for_each_rtx_in_insn): Likewise.

From-SVN: r214119
2014-08-18 20:25:45 +00:00
David Malcolm 15f8d3ab4a Introduce rtx_insn subclass of rtx_def
gcc/
2014-08-18  David Malcolm  <dmalcolm@redhat.com>

	* coretypes.h (class rtx_insn): Add forward declaration.

	* rtl.h: Include is-a.h.
	(struct rtx_def): Add dummy "desc" and "tag" GTY options as a
	workaround to ensure gengtype knows inheritance is occurring,
	whilst continuing to use the pre-existing special-casing for
	rtx_def.
	(class rtx_insn): New subclass of rtx_def, adding the
	invariant that we're dealing with something we can sanely use
	INSN_UID, NEXT_INSN, PREV_INSN on.
	(is_a_helper <rtx_insn *>::test): New.
	(is_a_helper <const rtx_insn *>::test): New.

From-SVN: r214118
2014-08-18 20:02:17 +00:00
Kugan Vivekanandarajah 362d42dcc9 calls.c (precompute_arguments): Use new SUBREG_PROMOTED_SET instead of SUBREG_PROMOTED_UNSIGNED_SET.
gcc/
2014-08-08  Kugan Vivekanandarajah  <kuganv@linaro.org>

	* calls.c (precompute_arguments): Use new SUBREG_PROMOTED_SET
	instead of SUBREG_PROMOTED_UNSIGNED_SET.
	(expand_call): Likewise.
	* cfgexpand.c (expand_gimple_stmt_1): Use SUBREG_PROMOTED_SIGN
	to get promoted mode.
	* combine.c (record_promoted_value): Skip > 0 comparison with
	SUBREG_PROMOTED_UNSIGNED_P as it now returns only 0 or 1.
	* expr.c (convert_move): Use SUBREG_CHECK_PROMOTED_SIGN instead
	of SUBREG_PROMOTED_UNSIGNED_P.
	(convert_modes): Likewise.
	(store_expr): Use SUBREG_PROMOTED_SIGN to get promoted mode.
	Use SUBREG_CHECK_PROMOTED_SIGN instead of SUBREG_PROMOTED_UNSIGNED_P.
	(expand_expr_real_1): Use new SUBREG_PROMOTED_SET instead of
	SUBREG_PROMOTED_UNSIGNED_SET.
	* function.c (assign_parm_setup_reg): Use new SUBREG_PROMOTED_SET
	instead of SUBREG_PROMOTED_UNSIGNED_SET.
	* ifcvt.c (noce_emit_cmove): Updated to use SUBREG_PROMOTED_GET and
	SUBREG_PROMOTED_SET.
	* internal-fn.c (ubsan_expand_si_overflow_mul_check): Use
	SUBREG_PROMOTED_SET instead of SUBREG_PROMOTED_UNSIGNED_SET.
	* optabs.c (widen_operand): Use SUBREG_CHECK_PROMOTED_SIGN instead
	of SUBREG_PROMOTED_UNSIGNED_P.
	* rtl.h (SUBREG_PROMOTED_UNSIGNED_SET): Remove.
	(SUBREG_PROMOTED_SET): New define.
	(SUBREG_PROMOTED_GET): Likewise.
	(SUBREG_PROMOTED_SIGN): Likewise.
	(SUBREG_PROMOTED_SIGNED_P): Likewise.
	(SUBREG_CHECK_PROMOTED_SIGN): Likewise.
	(SUBREG_PROMOTED_UNSIGNED_P): Updated.
	* rtlanal.c (unsigned_reg_p): Use new SUBREG_PROMOTED_GET
	instead of SUBREG_PROMOTED_UNSIGNED_GET.
	(nonzero_bits1): Skip > 0 comparison with the results as
	SUBREG_PROMOTED_UNSIGNED_P now returns only 0 or 1.
	(num_sign_bit_copies1): Use SUBREG_PROMOTED_SIGNED_P instead
	of !SUBREG_PROMOTED_UNSIGNED_P.
	* simplify-rtx.c (simplify_unary_operation_1): Use new
	SUBREG_PROMOTED_SIGNED_P instead of !SUBREG_PROMOTED_UNSIGNED_P.
	(simplify_subreg): Use new SUBREG_PROMOTED_SIGNED_P,
	SUBREG_PROMOTED_UNSIGNED_P and SUBREG_PROMOTED_SET instead of
	SUBREG_PROMOTED_UNSIGNED_P and SUBREG_PROMOTED_UNSIGNED_SET.

From-SVN: r213749
2014-08-08 05:24:12 +00:00
Andi Kleen f768061c4c RTL & dwarf2out changes
Convert dwarf2out and rtl.c to the new inchash interface.

gcc/:

2014-07-31  Andi Kleen  <ak@linux.intel.com>

	* Makefile.in (OBJS): Add rtlhash.o
	* dwarf2out.c (addr_table_entry_do_hash): Convert to inchash.
	(loc_checksum): Dito.
	(loc_checksum_ordered): Dito.
	(hash_loc_operands): Dito.
	(hash_locs): Dito.
	(hash_loc_list): Dito.
	* rtl.c (iterative_hash_rtx): Moved to rtlhash.c
	* rtl.h (iterative_hash_rtx): Moved to rtlhash.h
	* rtlhash.c: New file.
	* rtlhash.h: New file.

From-SVN: r213395
2014-08-01 02:51:57 +00:00
Richard Sandiford 093a6c996e rtl.h (tls_referenced_p): Declare.
gcc/
	* rtl.h (tls_referenced_p): Declare.
	* rtlanal.c (tls_referenced_p_1, tls_referenced_p): New functions.
	* config/mips/mips.c (mips_tls_symbol_ref_1): Delete.
	(mips_cannot_force_const_mem): Use tls_referenced_p.
	* config/pa/pa-protos.h (pa_tls_referenced_p): Delete.
	* config/pa/pa.h (CONSTANT_ADDRESS_P): Use tls_referenced_p
	instead of pa_tls_referenced_p.
	* config/pa/pa.c (hppa_legitimize_address, pa_cannot_force_const_mem)
	(pa_emit_move_sequence, pa_emit_move_sequence): Likewise.
	(pa_legitimate_constant_p): Likewise.
	(pa_tls_symbol_ref_1, pa_tls_referenced_p): Delete.
	* config/rs6000/rs6000.c (rs6000_tls_referenced_p): Delete.
	(rs6000_cannot_force_const_mem, rs6000_emit_move)
	(rs6000_address_for_altivec): Use tls_referenced_p instead of
	rs6000_tls_referenced_p.
	(rs6000_tls_symbol_ref_1): Delete.

From-SVN: r213077
2014-07-26 09:47:33 +00:00
Richard Sandiford d4cf94779f rtl.h (target_rtl): Remove lang_dependent_initialized.
gcc/
	* rtl.h (target_rtl): Remove lang_dependent_initialized.
	* toplev.c (initialize_rtl): Don't use it.  Move previously
	"language-dependent" calls to...
	(backend_init): ...here.
	(lang_dependent_init_target): Don't set lang_dependent_initialized.
	Assert that RTL initialization hasn't happend yet.

From-SVN: r213004
2014-07-24 15:18:09 +00:00
Jan Hubicka b9b5f43367 toplev.c (backend_init_target): Move init_emit_regs and init_regs to...
* toplev.c (backend_init_target): Move init_emit_regs and init_regs to...
	(backend_init) ... here; skip ira_init_once and backend_init_target.
	(target_reinit) ... and here; clear this_target_rtl->lang_dependent_initialized.
	(lang_dependent_init_target): Clear this_target_rtl->lang_dependent_initialized;
	break out rtl initialization to ...
	(initialize_rtl): ... here; call also backend_init_target and ira_init_once.
	* toplev.h (initialize_rtl): New function.
	* function.c: Include toplev.h
	(init_function_start): Call initialize_rtl.
	* rtl.h (target_rtl): Add target_specific_initialized,
	lang_dependent_initialized.

From-SVN: r212007
2014-06-26 02:28:37 +00:00
Eric Botcazou ffa4602f4d rtl.h (insn_location): Declare.
* rtl.h (insn_location): Declare.
	* cfgcleanup.c (try_forward_edges): Compare the locus of locations
	with UNKNOWN_LOCATION.
	* emit-rtl.c (insn_location): New function.
	* final.c (notice_source_line): Check that the instruction has a
	location before retrieving it and use insn_location.
	* modulo-sched.c (loop_single_full_bb_p): Likewise.
	* print-rtl.c (print_rtx): Likewise.

From-SVN: r211305
2014-06-06 07:32:25 +00:00
Tom de Vries ed00b1fb97 Fix rtl-check build
2014-05-29  Tom de Vries  <tom@codesourcery.com>

	* rtl.h (BLOCK_SYMBOL_CHECK): Use SYMBOL_REF_FLAGS.

From-SVN: r211057
2014-05-29 16:32:16 +00:00
Richard Sandiford c8912e539b rtl.h (set_for_reg_notes): Declare.
2014-05-26  Richard Sandiford  <rdsandiford@googlemail.com>
            Olivier Hainque  <hainque@adacore.com>

        * rtl.h (set_for_reg_notes): Declare.
        * emit-rtl.c (set_for_reg_notes): New function.
        (set_unique_reg_note): Use it.
        * optabs.c (add_equal_note): Likewise


Co-Authored-By: Olivier Hainque <hainque@adacore.com>

From-SVN: r210998
2014-05-28 08:41:27 +00:00
Richard Sandiford 339ba33b4f reg-notes.def (CROSSING_JUMP): Likewise.
gcc/
	* reg-notes.def (CROSSING_JUMP): Likewise.
	* rtl.h (rtx_def): Update comment for jump flag.
	(CROSSING_JUMP_P): Define.
	* cfgcleanup.c (try_forward_edges, try_optimize_cfg): Use it instead
	of a REG_CROSSING_JUMP note.
	* cfghooks.c (tidy_fallthru_edges): Likewise.
	* cfgrtl.c (fixup_partition_crossing, rtl_verify_edges): Likewise.
	* emit-rtl.c (try_split): Likewise.
	* haifa-sched.c (sched_create_recovery_edges): Likewise.
	* ifcvt.c (find_if_case_1, find_if_case_2): Likewise.
	* jump.c (redirect_jump_2): Likewise.
	* reorg.c (follow_jumps, fill_slots_from_thread): Likewise.
	(relax_delay_slots): Likewise.
	* config/arc/arc.md (jump_i, cbranchsi4_scratch, *bbit): Likewise.
	(bbit_di): Likewise.
	* config/arc/arc.c (arc_reorg, arc_can_follow_jump): Likewise.
	* config/sh/sh.md (jump_compact): Likewise.
	* bb-reorder.c (rotate_loop): Likewise.
	(pass_duplicate_computed_gotos::execute): Likewise.
	(add_reg_crossing_jump_notes): Rename to...
	(update_crossing_jump_flags): ...this.
	(pass_partition_blocks::execute): Update accordingly.

From-SVN: r210603
2014-05-19 06:49:58 +00:00
Trevor Saunders 766090c20f use templates instead of gengtype for typed allocation functions
gcc/ChangeLog:

	* alias.c (record_alias_subset): Adjust.
	* bitmap.c (bitmap_element_allocate): Likewise.
	(bitmap_gc_alloc_stat): Likewise.
	* cfg.c (init_flow): Likewise.
	(alloc_block): Likewise.
	(unchecked_make_edge): Likewise.
	* cfgloop.c (alloc_loop): Likewise.
	(flow_loops_find): Likewise.
	(rescan_loop_exit): Likewise.
	* cfgrtl.c (init_rtl_bb_info): Likewise.
	* cgraph.c (insert_new_cgraph_node_version): Likewise.
	(cgraph_allocate_node): Likewise.
	(cgraph_create_edge_1): Likewise.
	(cgraph_allocate_init_indirect_info): Likewise.
	* cgraphclones.c (cgraph_clone_edge): Likewise.
	* cgraphunit.c (add_asm_node): Likewise.
	(init_lowered_empty_function): Likewise.
	* config/aarch64/aarch64.c (aarch64_init_machine_status):
	Likewise.
	* config/alpha/alpha.c (alpha_init_machine_status): Likewise.
	(alpha_use_linkage): Likewise.
	* config/arc/arc.c (arc_init_machine_status): Likewise.
	* config/arm/arm.c (arm_init_machine_status): Likewise.
	* config/avr/avr.c (avr_init_machine_status): Likewise.
	* config/bfin/bfin.c (bfin_init_machine_status): Likewise.
	* config/c6x/c6x.c (c6x_init_machine_status): Likewise.
	* config/cris/cris.c (cris_init_machine_status): Likewise.
	* config/darwin.c (machopic_indirection_name): Likewise.
	(darwin_build_constant_cfstring): Likewise.
	(darwin_enter_string_into_cfstring_table): Likewise.
	* config/epiphany/epiphany.c (epiphany_init_machine_status):
	* Likewise.
	* config/frv/frv.c (frv_init_machine_status): Likewise.
	* config/i386/i386.c (get_dllimport_decl): Likewise.
	(ix86_init_machine_status): Likewise.
	(assign_386_stack_local): Likewise.
	* config/i386/winnt.c (i386_pe_record_external_function):
	Likewise.
	(i386_pe_maybe_record_exported_symbol): Likewise.
	(i386_pe_record_stub): Likewise.
	* config/ia64/ia64.c (ia64_init_machine_status): Likewise.
	* config/iq2000/iq2000.c (iq2000_init_machine_status): Likewise.
	* config/m32c/m32c.c (m32c_init_machine_status): Likewise.
	(m32c_note_pragma_address): Likewise.
	* config/mep/mep.c (mep_init_machine_status): Likewise.
	(mep_note_pragma_flag): Likewise.
	* config/mips/mips.c (mflip_mips16_use_mips16_p): Likewise.
	(mips16_local_alias): Likewise.
	(mips_init_machine_status): Likewise.
	* config/mmix/mmix.c (mmix_init_machine_status): Likewise.
	* config/moxie/moxie.c (moxie_init_machine_status): Likewise.
	* config/msp430/msp430.c (msp430_init_machine_status): Likewise.
	* config/nds32/nds32.c (nds32_init_machine_status): Likewise.
	* config/nios2/nios2.c (nios2_init_machine_status): Likewise.
	* config/pa/pa.c (pa_init_machine_status): Likewise.
	(pa_get_deferred_plabel): Likewise.
	* config/rl78/rl78.c (rl78_init_machine_status): Likewise.
	* config/rs6000/rs6000.c (builtin_function_type): Likewise.
	(rs6000_init_machine_status): Likewise.
	(output_toc): Likewise.
	* config/s390/s390.c (s390_init_machine_status): Likewise.
	* config/score/score.c (score_output_external): Likewise.
	* config/sparc/sparc.c (sparc_init_machine_status): Likewise.
	* config/spu/spu.c (spu_init_machine_status): Likewise.
	* config/tilegx/tilegx.c (tilegx_init_machine_status): Likewise.
	* config/tilepro/tilepro.c (tilepro_init_machine_status):
	* Likewise.
	* config/xtensa/xtensa.c (xtensa_init_machine_status): Likewise.
	* coverage.c (coverage_end_function): Likewise.
	* dbxout.c (dbxout_init): Likewise.
	* doc/gty.texi: Don't mention variable_size attribute.
	* dwarf2cfi.c (new_cfi): Adjust.
	(new_cfi_row): Likewise.
	(copy_cfi_row): Likewise.
	(create_cie_data): Likewise.
	* dwarf2out.c (dwarf2out_alloc_current_fde): Likewise.
	(new_loc_descr): Likewise.
	(find_AT_string_in_table): Likewise.
	(add_addr_table_entry): Likewise.
	(new_die): Likewise.
	(add_var_loc_to_decl): Likewise.
	(clone_die): Likewise.
	(clone_as_declaration): Likewise.
	(break_out_comdat_types): Likewise.
	(new_loc_list): Likewise.
	(add_loc_descr_to_each): Likewise.
	(add_location_or_const_value_attribute): Likewise.
	(add_linkage_name): Likewise.
	(lookup_filename): Likewise.
	(dwarf2out_var_location): Likewise.
	(new_line_info_table): Likewise.
	(dwarf2out_init): Likewise.
	(mem_loc_descriptor): Likewise.
	(loc_descriptor): Likewise.
	(add_const_value_attribute): Likewise.
	(tree_add_const_value_attribute): Likewise.
	(comp_dir_string): Likewise.
	(dwarf2out_vms_debug_main_pointer): Likewise.
	(string_cst_pool_decl): Likewise.
	* emit-rtl.c (set_mem_attrs): Likewise.
	(get_reg_attrs): Likewise.
	(start_sequence): Likewise.
	(init_emit): Likewise.
	(init_emit_regs): Likewise.
	* except.c (init_eh_for_function): Likewise.
	(gen_eh_region): Likewise.
	(gen_eh_region_catch): Likewise.
	(gen_eh_landing_pad): Likewise.
	(add_call_site): Likewise.
	* function.c (add_frame_space): Likewise.
	(insert_temp_slot_address): Likewise.
	(assign_stack_temp_for_type): Likewise.
	(get_hard_reg_initial_val): Likewise.
	(allocate_struct_function): Likewise.
	(prepare_function_start): Likewise.
	(types_used_by_var_decl_insert): Likewise.
	* gengtype.c (variable_size_p): Remove function.
	(enum alloc_quantity): Remove enum.
	(write_typed_alloc_def): Remove function.
	(write_typed_struct_alloc_def): Likewise.
	(write_typed_typedef_alloc_def): Likewise.
	(write_typed_alloc_defns): Likewise.
	(main): Adjust.
	* ggc-common.c (ggc_cleared_alloc_htab_ignore_args): Adjust.
	(ggc_cleared_alloc_ptr_array_two_args): Likewise.
	* ggc.h (ggc_alloc): new function.
	(ggc_cleared_alloc): Likewise.
	(ggc_vec_alloc): Template on type of vector element, and remove
	element size argument.
	(ggc_cleared_vec_alloc): Likewise.
	* gimple.c (gimple_build_omp_for): Adjust.
	(gimple_copy): Likewise.
	* ipa-cp.c (get_replacement_map): Likewise.
	(find_aggregate_values_for_callers_subset): Likewise.
	(known_aggs_to_agg_replacement_list): Likewise.
	* ipa-devirt.c (get_odr_type): Likewise.
	* ipa-prop.c (ipa_node_duplication_hook): Likewise.
	(read_agg_replacement_chain): Likewise.
	* loop-iv.c (get_simple_loop_desc): Likewise.
	* lto-cgraph.c (input_node_opt_summary): Likewise.
	* lto-section-in.c (lto_new_in_decl_state): Likewise.
	* lto-streamer-in.c (lto_input_eh_catch_list): Likewise.
	(input_eh_region): Likewise.
	(input_eh_lp): Likewise.
	(input_cfg): Likewise.
	* optabs.c (set_optab_libfunc): Likewise.
	(init_tree_optimization_optabs): Likewise.
	(set_conv_libfunc): Likewise.
	* passes.c (do_per_function_toporder): Likewise.
	* rtl.h: Don't use variable_size gty attribute.
	* sese.c (if_region_set_false_region): Adjust.
	* stringpool.c (gt_pch_save_stringpool): Likewise.
	* target-globals.c (save_target_globals): Likewise.
	* toplev.c (general_init): Likewise.
	* trans-mem.c (record_tm_replacement): Likewise.
	(split_bb_make_tm_edge): Likewise.
	* tree-cfg.c (move_sese_region_to_fn): Likewise.
	* tree-data-ref.h (lambda_vector_new): Likewise.
	* tree-eh.c (add_stmt_to_eh_lp_fn): Likewise.
	* tree-iterator.c (tsi_link_before): Likewise.
	(tsi_link_after): Likewise.
	* tree-scalar-evolution.c (new_scev_info_str): Likewise.
	* tree-ssa-loop-niter.c (record_estimate): Likewise.
	* tree-ssa-operands.c (ssa_operand_alloc): Likewise.
	* tree-ssa-operands.h: Don't use variable_size gty attribute.
	* tree-ssa.c (init_tree_ssa): Adjust.
	* tree-ssanames.c (set_range_info): Likewise.
	(get_ptr_info): Likewise.
	(duplicate_ssa_name_ptr_info): Likewise.
	(duplicate_ssa_name_range_info): Likewise.
	* tree-streamer-in.c (unpack_ts_real_cst_value_fields): Likewise.
	(unpack_ts_fixed_cst_value_fields): Likewise.
	* tree.c (build_fixed): Likewise.
	(build_real): Likewise.
	(build_string): Likewise.
	(decl_priority_info): Likewise.
	(decl_debug_expr_insert): Likewise.
	(decl_value_expr_insert): Likewise.
	(decl_debug_args_insert): Likewise.
	(type_hash_add): Likewise.
	(build_omp_clause): Likewise.
	* ubsan.c (decl_for_type_insert): Likewise.
	* varasm.c (get_unnamed_section): Likewise.
	(get_noswitch_section): Likewise.
	(get_section): Likewise.
	(get_block_for_section): Likewise.
	(create_block_symbol): Likewise.
	(build_constant_desc): Likewise.
	(create_constant_pool): Likewise.
	(force_const_mem): Likewise.
	(record_tm_clone_pair): Likewise.
	* varpool.c (varpool_create_empty_node): Likewise.

gcc/c/ChangeLog:

	* c-decl.c (finish_struct): Adjust.
	(finish_enum): Likewise.
	(bind): Adjust.
	(record_inline_static): Likewise.
	(push_scope): Likewise.
	(make_label): Likewise.
	(lookup_label_for_goto): Likewise.
	(finish_struct): Likewise.
	(finish_enum): Likewise.
	(store_parm_decls): Likewise.
	(c_push_function_context): Likewise.
	* c-lang.h: Remove usage of variable_size gty attribute.
	* c-parser.c (c_parse_init): Adjust.
	(c_parse_file): Likewise.

gcc/java/ChangeLog:

	* class.c (add_method_1): Adjust.
	(java_treetreehash_new): Likewise.
	* constants.c (set_constant_entry): Likewise.
	(cpool_for_class): Likewise.
	* decl.c (make_binding_level): Likewise.
	(java_dup_lang_specific_decl): Likewise.
	* expr.c (add_type_assertion): Likewise.
	* java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Likewise.
	(lang_decl): don't use variable_size gty attribute.
	(MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Adjust.
	(lang_type): Don't use variable_size gty attribute.
	* jcf-parse.c (java_parse_file): Adjust.
	(process_zip_dir): Likewise.
	* jcf.h: Remove usage of variable_size gty attribute.
	* jcf-reader.c (jcf_parse_constant_pool): Adjust.
	(jcf_parse_bootstrap_methods): Likewise.

gcc/objc/ChangeLog:

	* objc-act.c (objc_build_string_object): Adjust.
	(continue_class): Likewise.
	* objc-act.h (ALLOC_OBJC_TYPE_LANG_SPECIFIC): Likewise.
	* objc-map.c (objc_map_alloc_ggc): Likewise.
	(objc_map_private_resize): Likewise.
	* objc-next-runtime-abi-02.c (objc_next_runtime_abi_02_init):
	Likewise.
	(hash_name_enter): Likewise.

gcc/cp/ChangeLog:

	* class.c (sorted_fields_type_new): Adjust.
	* cp-cilkplus.c (cilk_install_body_with_frame_cleanup): Likewise.
	* cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise.
	* cp-tree.h: Remove usage of variable_size gty attribute.
	* decl.c (make_label_decl): Adjust.
	(check_goto): Likewise.
	(start_preparsed_function): Likewise.
	(save_function_data): Likewise.
	* lex.c (init_reswords): Likewise.
	(retrofit_lang_decl): Likewise.
	(cxx_dup_lang_specific_decl): Likewise.
	(copy_lang_type): Likewise.
	(cxx_make_type): Likewise.
	* name-lookup.c (binding_entry_make): Likewise.
	(binding_table_construct): Likewise.
	(binding_table_new): Likewise.
	(cxx_binding_make): Likewise.
	(pushdecl_maybe_friend_1): Likewise.
	(begin_scope): Likewise.
	(push_to_top_level): Likewise.
	* parser.c (cp_lexer_alloc): Likewise.
	(cp_lexer_new_from_tokens): Likewise.
	(cp_token_cache_new): Likewise.
	(cp_parser_context_new): Likewise.
	(cp_parser_new): Likewise.
	(cp_parser_nested_name_specifier_opt): Likewise.
	(cp_parser_template_id): Likewise.
	* pt.c (maybe_process_partial_specialization): Likewise.
	(register_specialization): Likewise.
	(add_pending_template): Likewise.
	(lookup_template_class_1): Likewise.
	(push_tinst_level): Likewise.
	* semantics.c (register_constexpr_fundef): Likewise.
	(cxx_eval_call_expression): Likewise.
	* typeck2.c (abstract_virtuals_error_sfinae): Likewise.

gcc/fortran/ChangeLog:

	* f95-lang.c (pushlevel): Adjust.
	* trans-decl.c (gfc_allocate_lang_decl): Adjust.
	(gfc_find_module): Likewise.
	* trans-types.c (gfc_get_nodesc_array_type): Likewise.
	(gfc_get_array_type_bounds): Likewise.
	(gfc_nonrestricted_type): Likewise.
	* trans.h: Don't use variable_size gty attribute.

gcc/ada/ChangeLog:

	* gcc-interface/ada-tree.h: Remove usage of variable_size gty
	annotation.
	* gcc-interface/decl.c (annotate_value): Adjust.
	* gcc-interface/trans.c (Attribute_to_gnu): Likewise.
	(push_range_check_info): Likewise.
	(Loop_Statement_to_gnu): Likewise.
	(Subprogram_Body_to_gnu): Likewise.
	(Compilation_Unit_to_gnu): Likewise.
	(start_stmt_group): Likewise.
	* gcc-interface/utils.c (init_gnat_utils): Likewise.
	(gnat_pushlevel): Likewise.
	(maybe_pad_type): Likewise.

gcc/go/ChangeLog:

	* go-lang.c (struct GTY): Don't use variable_size gty attribute.

gcc/c-family/ChangeLog:

	* c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
	* c-pragma.c (push_alignment): Adjust.
	(handle_pragma_push_options): Likewise.

gcc/lto/ChangeLog:

	* lto-tree.h: Don't use variable_size gty attribute.
	* lto.c (lto_read_in_decl_state): Adjust.
	(create_subid_section_table): Likewise.
	(lto_flatten_files): Likewise.
	(read_cgraph_and_symbols): Likewise.

gcc/objcp/ChangeLog:

	* objcp-decl.h: Adjust.

From-SVN: r210566
2014-05-17 23:07:23 +00:00
Richard Sandiford 23b3372508 emit-rtl.h (replace_equiv_address, [...]): Add an inplace argument.
gcc/
	* emit-rtl.h (replace_equiv_address, replace_equiv_address_nv): Add an
	inplace argument.  Store the new address in the original MEM when true.
	* emit-rtl.c (change_address_1): Likewise.
	(adjust_address_1, adjust_automodify_address_1, offset_address):
	Update accordingly.
	* rtl.h (plus_constant): Add an inplace argument.
	* explow.c (plus_constant): Likewise.  Try to reuse the original PLUS
	when true.  Avoid generating (plus X (const_int 0)).
	* function.c (instantiate_virtual_regs_in_rtx): Adjust the PLUS
	in-place.  Pass true to plus_constant.
	(instantiate_virtual_regs_in_insn): Pass true to replace_equiv_address.

From-SVN: r210543
2014-05-17 07:00:02 +00:00
Richard Sandiford da3cd11361 rtl.def (SYMBOL_REF): Remove middle "0" field.
gcc/
	* rtl.def (SYMBOL_REF): Remove middle "0" field.
	* rtl.h (block_symbol): Reduce number of fields to 2.
	(rtx_def): Add u2.symbol_ref_flags.
	(SYMBOL_REF_FLAGS): Use it.
	(SYMBOL_REF_DATA, SET_SYMBOL_REF_DECL, SYMBOL_REF_DECL)
	(SET_SYMBOL_REF_CONSTANT, SYMBOL_REF_CONSTANT): Lower index.
	* gengtype.c (adjust_field_rtx_def): Remove SYMBOL_REF_FLAGS handling.
	Lower index of SYMBOL_REF_DATA.
	* print-rtl.c (print_rtx): Lower index for SYMBOL_REF_DATA.
	Print SYMBOL_REF_FLAGS at the same time.
	* genattrtab.c (attr_rtx_1): Only initialize 1 "0" SYMBOL_REF field.

From-SVN: r210363
2014-05-13 10:39:16 +00:00
Richard Sandiford fcc74520d0 rtl.def (VAR_LOCATION): Remove "i" field.
gcc/
	* rtl.def (VAR_LOCATION): Remove "i" field.
	* rtl.h (rtx_def): Add u2.var_location_status.
	(PAT_VAR_LOCATION_STATUS): Use it.
	(gen_rtx_VAR_LOCATION): Declare.
	* gengenrtl.c (excluded_rtx): Add VAR_LOCATION.
	* emit-rtl.c (gen_rtx_VAR_LOCATION): New function.
	* var-tracking.c (emit_note_insn_var_location): Remove casts.

From-SVN: r210362
2014-05-13 10:39:08 +00:00
Richard Sandiford ed8921dc73 gcc/
* rtl.def (DEBUG_INSN, INSN, JUMP_INSN, CALL_INSN, JUMP_TABLE_DATA)
	(BARRIER, CODE_LABEL, NOTE): Remove first "i" field.
	* rtl.h (rtx_def): Add insn_uid to u2 field.
	(RTX_FLAG_CHECK8): Delete in favor of...
	(RTL_INSN_CHAIN_FLAG_CHECK): ...this new macro.
	(INSN_DELETED_P): Update accordingly.
	(INSN_UID): Use u2.insn_uid.
	(INSN_CHAIN_CODE_P): Define.
	(PREV_INSN, NEXT_INSN, BLOCK_FOR_INSN, PATTERN, INSN_LOCATION)
	(INSN_CODE, REG_NOTES, CALL_INSN_FUNCTION_USAGE, CODE_LABEL_NUMBER)
	(NOTE_DATA, NOTE_DELETED_LABEL_NAME, NOTE_BLOCK, NOTE_EH_HANDLER)
	(NOTE_BASIC_BLOCK, NOTE_VAR_LOCATION, NOTE_CFI, NOTE_LABEL_NUMBER)
	(NOTE_KIND, LABEL_NAME, LABEL_NUSES, JUMP_LABEL, LABEL_REFS): Lower
	indices accordingly.
	* print-rtl.c (print_rtx): Print INSN_UIDs before the main loop.
	Update indices for insn-chain rtxes.
	* gengtype.c (gen_rtx_next): Adjust test for insn-chain rtxes.
	(adjust_field_rtx_def): Lower '0' indices for all insn-chain rtxes.
	* emit-rtl.c (gen_label_rtx): Update gen_rtx_LABEL call.
	* caller-save.c (init_caller_save): Update gen_rtx_INSN calls.
	* combine.c (try_combine): Likewise.
	* ira.c (setup_prohibited_mode_move_regs): Likewise.

From-SVN: r210360
2014-05-13 10:38:50 +00:00
Richard Sandiford fccc55155d rtl.def (REG): Remove middle field.
gcc/
	* rtl.def (REG): Remove middle field.
	* rtl.h (rtx_def): Add orignal_regno to u2.
	(ORIGINAL_REGNO): Use it instead of field 1.
	(REG_ATTRS): Lower field index accordingly.
	* gengtype.c (adjust_field_rtx_def): Remove handling of
	ORIGINAL_REGNO.  Move REG_ATTRS index down.
	* print-rtl.c (print_rtx): Move ORIGINAL_REGNO handling to the
	code that prints the REGNO.

From-SVN: r210359
2014-05-13 10:38:38 +00:00
Richard Sandiford 13b0c5ac1e rtl.h (rtx_def): Mark u2 as GTY ((skip)).
gcc/
	* rtl.h (rtx_def): Mark u2 as GTY ((skip)).

From-SVN: r210357
2014-05-13 10:38:17 +00:00
Richard Sandiford aa3a12d66e emit-rtl.c (init_derived_machine_modes): New functionm, split out from...
gcc/
	* emit-rtl.c (init_derived_machine_modes): New functionm, split
	out from...
	(init_emit_once): ...here.
	* rtl.h (init_derived_machine_modes): Declare.
	* toplev.c (do_compile): Call it even if no_backend.

From-SVN: r210118
2014-05-06 17:44:15 +00:00
Kenneth Zadeck 807e902eea Merge in wide-int.
From-SVN: r210113
2014-05-06 16:25:05 +00:00
Radovan Obradovic 356bf59349 Add implicit parameter to find_all_hard_reg_sets
2014-04-25  Radovan Obradovic  <robradovic@mips.com>
            Tom de Vries  <tom@codesourcery.com>

	* rtlanal.c (find_all_hard_reg_sets): Add bool implicit parameter and
	handle.
	* rtl.h (find_all_hard_reg_sets): Add bool parameter.
	* haifa-sched.c (recompute_todo_spec, check_clobbered_conditions): Add
	new argument to find_all_hard_reg_sets call.

Co-Authored-By: Tom de Vries <tom@codesourcery.com>

From-SVN: r209798
2014-04-25 11:21:18 +00:00
Richard Biener da4cfeacb0 Makefile.in (OBJS): Remove loop-unswitch.o.
2014-04-23  Richard Biener  <rguenther@suse.de>

	* Makefile.in (OBJS): Remove loop-unswitch.o.
	* loop-unswitch.c: Delete.
	* tree-pass.h (make_pass_rtl_unswitch): Remove.
	* passes.def (pass_rtl_unswitch): Likewise.
	* loop-init.c (gate_rtl_unswitch): Likewise.
	(rtl_unswitch): Likewise.
	(pass_data_rtl_unswitch): Likewise.
	(pass_rtl_unswitch): Likewise.
	(make_pass_rtl_unswitch): Likewise.
	* rtl.h (reversed_condition): Likewise.
	(compare_and_jump_seq): Likewise.
	* loop-iv.c (reversed_condition): Move here from loop-unswitch.c
	and make static.
	* loop-unroll.c (compare_and_jump_seq): Likewise.

From-SVN: r209698
2014-04-23 13:48:12 +00:00
Richard Sandiford f9ae4df84e re PR target/52125 (Problems with LO16 asm operands on MIPS)
gcc/
	PR target/52125
	* rtl.h (get_referenced_operands): Declare.
	* recog.c (get_referenced_operands): New function.
	* config/mips/mips.c (mips_reorg_process_insns): Check which asm
	operands have been referenced when recording LO_SUM references.

gcc/testsuite/
	PR target/52125
	* gcc.dg/pr48774.c: Remove skip for mips_rel.
	* gcc.target/mips/pr52125.c: New test.

From-SVN: r206955
2014-01-23 08:24:38 +00:00
Richard Henderson af6e846774 re PR debug/54694 (internal compiler error: in dwarf2out_frame_debug_expr, at dwarf2out.c:2387)
PR debug/54694

Diagnose frame_pointer_required vs fixed hfp

From-SVN: r206647
2014-01-15 13:41:03 -08:00
Richard Sandiford 23a5b65a92 Update copyright years in gcc/
From-SVN: r206289
2014-01-02 22:23:26 +00:00
Oleg Endo 84562394e2 cgraph.h (cgraph_node_set_iterator, [...]): Remove typedef.
* gcc/cgraph.h (cgraph_node_set_iterator, varpool_node_set_iterator):
	Remove typedef.
	(cgraph_inline_failed_enum, cgraph_inline_failed_t): Remove typedef and
	rename to cgraph_inline_failed_t.
	* gcc/tree-ssa-alias.h (ao_ref_s, ao_ref): Remove typedef and rename
	to ao_ref.
	* gcc/reload.h (reg_equivs_s, reg_equivs_t): Remove typedef and rename
	to reg_equivs_t.
	* gcc/conditions.h (CC_STATUS): Remove typedef.
	* gcc/bitmap.h (bitmap_obstack): Remove typedef.
	(bitmap_element_def, bitmap_element): Remove typedef and rename to
	bitmap_element.
	(bitmap_head_def, bitmap_head): Remove typedef and rename to
	bitmap_head.
	(bitmap_iterator): Remove typedef.
	* gcc/target.h (cumulative_args_t, print_switch_type,
	secondary_reload_info): Remove typedef.
	* gcc/dwarf2out.h (dw_cfi_oprnd_struct, dw_cfi_oprnd): Remove
	dw_cfi_oprnd_struct alias.
	(dw_cfi_struct, dw_cfi_node): Remove typedef and rename to dw_cfi_node.
	(dw_fde_struct, dw_fde_node): Remove typedef and rename to dw_fde_node.
	(cfa_loc, dw_cfa_location): Remove typedef and rename to
	dw_cfa_location.
	(dw_vec_struct, dw_vec_const): Remove typedef and rename to
	dw_vec_const.
	(dw_val_struct, dw_val_node): Remove typedef and rename to dw_val_node.
	(dw_loc_descr_struct, dw_loc_descr_node): Remove typedef and rename to
	dw_loc_descr_node.
	* gcc/params.h (param_info, compiler_param): Remove typedef.
	* gcc/opts.h (cl_deferred_param): Remove typedef.
	* gcc/sreal.h (sreal): Remove typedef.
	* gcc/ddg.h (dep_type, dep_data_type): Remove typedef.
	* gcc/graphite-clast-to-gimple.h (cloog_prog_clast, bb_pbb_def): Remove
	typedef.
	* gcc/lto-streamer.h (lto_decl_stream_e_t, lto_encoder_entry,
	lto_symtab_encoder_iterator, res_pair): Remove typedef.
	* gcc/tree-affine.h (affine_tree_combination, aff_tree): Remove typedef
	and rename to aff_tree.
	* gcc/sched-int.h (region): Remove typedef.
	* gcc/diagnostic.h (diagnostic_info,
	diagnostic_classification_change_t): Remove typedef.
	* gcc/tree-ssa-loop.h (affine_iv_d): Remove typedef and rename to
	affine_iv.
	* gcc/sbitmap.h (sbitmap_iterator): Remove typedef.
	* gcc/ssa-iterators.h (immediate_use_iterator_d, imm_use_iterator):
	Remove typedef and rename to imm_use_iterator.
	(ssa_operand_iterator_d, ssa_op_iter): Remove typedef and rename to
	ssa_op_iter.
	* gcc/ggc-internal.h (ggc_statistics): Remove typedef.
	* gcc/cselib.h (cselib_val_struct, cselib_val): Remove typedef and
	rename to cselib_val.
	* gcc/tree-core.h (alias_pair): Remove typedef.
	(constructor_elt_d, constructor_elt): Remove typedef and rename to
	constructor_elt.
	(ssa_use_operand_d, ssa_use_operand_t): Remove typedef and rename to
	ssa_use_operand_t.
	* gcc/graphite-sese-to-poly.h (base_alias_pair): Remove typedef.
	* gcc/tree-data-ref.h (conflict_function): Remove typedef.
	* gcc/tree-inline.h (copy_body_data): Remove typedef.
	* gcc/ipa-inline.h (condition, size_time_entry, inline_param_summary_t,
	edge_growth_cache_entry): Remove typedef.
	* gcc/regrename.h (operand_rr_info, insn_rr_info): Remove typedef.
	* gcc/gimple-iterator.h (gimple_stmt_iterator_d, gimple_stmt_iterator):
	Remove typedef and rename to gimple_stmt_iterator.
	* gcc/basic-block.h (ce_if_block, ce_if_block_t): Remove typedef and
	rename to ce_if_block.
	(edge_iterator): Remove typedef.
	* gcc/ipa-prop.h (ipa_agg_jf_item, ipa_agg_jf_item_t): Remove typedef
	and rename to ipa_agg_jf_item.
	(ipa_agg_jump_function_t, ipa_param_descriptor_t, ipa_node_params_t,
	ipa_parm_adjustment_t): Remove typedef.
	(ipa_jump_func, ipa_jump_func_t): Remove typedef and rename to
	ipa_jump_func.
	(ipa_edge_args, ipa_edge_args_t): Remove typedef and rename to
	ipa_edge_args.
	* gcc/gcov-io.h (gcov_bucket_type): Remove typedef.
	(gcov_working_set_info, gcov_working_set_t): Remove typedef and rename
	to gcov_working_set_t.
	* gcc/ira-int.h (minmax_set_iterator, ira_allocno_iterator,
	ira_object_iterator, ira_allocno_object_iterator, ira_pref_iterator,
	ira_copy_iterator, ira_object_conflict_iterator): Remove typedef.
	* gcc/tree-iterator.h (tree_stmt_iterator): Remove typedef.
	* gcc/rtl.h (addr_diff_vec_flags, mem_attrs, reg_attrs,
	replace_label_data): Remove typedef.
	(rtunion_def, rtunion): Remove typedef and rename to rtunion.
	* gcc/hard-reg-set.h (hard_reg_set_iterator): Remove typedef.
	* gcc/sel-sched-ir.h (_list_iterator, sel_global_bb_info_def,
	sel_region_bb_info_def, succ_iterator): Remove typedef.
	(deps_where_def, deps_where_t): Remove typedef and rename to
	deps_where_t.
	* gcc/coretypes.h: Adapt forward declarations.
	* gcc/tree-scalar-evolution.h: Likewise.
	* gcc/tree-ssa-address.h: Likewise.
	* gcc/tree-ssa-operands.h: Likewise.
	* gcc/function.h: Likewise.
	* gcc/config/frv/frv-protos.h: Likewise.
	* gcc/targhooks.h: Likewise.
	* gcc/basic_block.h: Likewise.
	* gcc/rtl.def: Adapt documentation.
	* gcc/doc/tm.texi: Likewise.
	* gcc/ipa-cp.c: Adapt uses.
	* gcc/bitmap.c: Likewise.
	* gcc/dwarf2out.c: Likewise.
	* gcc/target.def: Likewise.
	* gcc/ipa-inline-analysis.c: Likewise.
	* gcc/dwarf2cfi.c: Likewise.
	* gcc/tree-ssa-loop-ivopts.c: Likewise.
	* gcc/lto-cgraph.c: Likewise.
	* gcc/config/frv/frv.c: Likewise.
	* gcc/ifcvt.c: Likewise.
	* gcc/ipa-prop.c: Likewise.

From-SVN: r205863
2013-12-10 16:48:44 +00:00
Ilya Enkovich 089d122746 revert: cgraph.h (varpool_node): Add need_bounds_init field.
Reverted:
	2013-11-20  Ilya Enkovich  <ilya.enkovich@intel.com>
	* cgraph.h (varpool_node): Add need_bounds_init field.
	* lto-cgraph.c (lto_output_varpool_node): Output
	need_bounds_init value.
	(input_varpool_node): Read need_bounds_init value.
	* varpool.c (dump_varpool_node): Dump need_bounds_init field.

	Reverted:
	2013-11-20  Ilya Enkovich  <ilya.enkovich@intel.com>
	* dbxout.c (dbxout_type): Ignore POINTER_BOUNDS_TYPE.
	* dwarf2out.c (gen_subprogram_die): Ignore bound args.
	(gen_type_die_with_usage): Skip pointer bounds.
	(dwarf2out_global_decl): Likewise.

	Reverted:
	2013-11-18  Ilya Enkovich  <ilya.enkovich@intel.com>
	* builtin-types.def (BT_FN_PTR_CONST_PTR_VAR): New.
	* chkp-builtins.def (BUILT_IN_CHKP_BIND_BOUNDS): New.
	* cfgexpand.c (expand_call_stmt): Expand BUILT_IN_CHKP_BIND_BOUNDS.
	* gimple.c (gimple_call_get_nobnd_arg_index): Remove.
	* gimple.h (gf_mask): Add GF_CALL_WITH_BOUNDS.
	(gimple_call_with_bounds_p): New.
	(gimple_call_set_with_bounds): New.
	(gimple_call_num_nobnd_args): Remove.
	(gimple_call_nobnd_arg): Remove.
	* tree.h (CALL_WITH_BOUNDS_P): New.
	* rtl.h (CALL_EXPR_WITH_BOUNDS_P): New.

	Reverted:
	2013-11-08  Ilya Enkovich  <ilya.enkovich@intel.com>
	* common.opt (fcheck-pointer-bounds): Move to ...
	* c-family/c.opt: ... here.
	* langhooks-def.h (LANG_HOOKS_CHKP_SUPPORTED): Remove.
	(LANG_HOOKS_INITIALIZER): Remove LANG_HOOKS_CHKP_SUPPORTED.
	* langhooks.h (lang_hooks): Remove chkp_supported field.
	* toplev.c (process_options): Remove chkp_supported check.

	Reverted:
	2013-10-30  Ilya Enkovich  <ilya.enkovich@intel.com>
	* tree-core.h (tree_index): Add TI_POINTER_BOUNDS_TYPE.
	* tree.h (POINTER_BOUNDS_P): New.
	(BOUNDED_TYPE_P): New.
	(BOUNDED_P): New.
	(pointer_bounds_type_node): New.
	* tree.c (build_common_tree_nodes): Initialize
	pointer_bounds_type_node.
	* gimple.h (gimple_call_get_nobnd_arg_index): New.
	(gimple_call_num_nobnd_args): New.
	(gimple_call_nobnd_arg): New.
	(gimple_return_retbnd): New.
	(gimple_return_set_retbnd): New
	* gimple.c (gimple_build_return): Increase number of ops
	for return statement.
	(gimple_call_get_nobnd_arg_index): New.
	* gimple-pretty-print.c (dump_gimple_return): Print second op.

	Reverted:
	2013-10-30  Ilya Enkovich  <ilya.enkovich@intel.com>
	* ipa.c (cgraph_build_static_cdtor_1): Support contructors
	with "chkp ctor" and "bnd_legacy" attributes.
	* gimplify.c (gimplify_init_constructor): Avoid infinite
	loop during gimplification of bounds initializer.

	Reverted:
	2013-10-30  Ilya Enkovich  <ilya.enkovich@intel.com>
	* c-family/c-common.c (handle_bnd_variable_size_attribute): New.
	(handle_bnd_legacy): New.
	(c_common_attribute_table): Add bnd_variable_size and bnd_legacy.
	* doc/extend.texi: Document bnd_variable_size and bnd_legacy
	attributes.

	Reverted:
	2013-10-29  Ilya Enkovich  <ilya.enkovich@intel.com>
	* builtin-types.def (BT_FN_VOID_CONST_PTR): New.
	(BT_FN_PTR_CONST_PTR): New.
	(BT_FN_CONST_PTR_CONST_PTR): New.
	(BT_FN_PTR_CONST_PTR_SIZE): New.
	(BT_FN_PTR_CONST_PTR_CONST_PTR): New.
	(BT_FN_VOID_PTRPTR_CONST_PTR): New.
	(BT_FN_VOID_CONST_PTR_SIZE): New.
	(BT_FN_PTR_CONST_PTR_CONST_PTR_SIZE): New.
	* chkp-builtins.def: New.
	* builtins.def: include chkp-builtins.def.
	(DEF_CHKP_BUILTIN): New.
	* builtins.c (expand_builtin): Support BUILT_IN_CHKP_INIT_PTR_BOUNDS,
	BUILT_IN_CHKP_NULL_PTR_BOUNDS, BUILT_IN_CHKP_COPY_PTR_BOUNDS,
	BUILT_IN_CHKP_CHECK_PTR_LBOUNDS, BUILT_IN_CHKP_CHECK_PTR_UBOUNDS,
	BUILT_IN_CHKP_CHECK_PTR_BOUNDS, BUILT_IN_CHKP_SET_PTR_BOUNDS,
	BUILT_IN_CHKP_NARROW_PTR_BOUNDS, BUILT_IN_CHKP_STORE_PTR_BOUNDS,
	BUILT_IN_CHKP_GET_PTR_LBOUND, BUILT_IN_CHKP_GET_PTR_UBOUND,
	BUILT_IN_CHKP_BNDMK, BUILT_IN_CHKP_BNDSTX, BUILT_IN_CHKP_BNDCL,
	BUILT_IN_CHKP_BNDCU, BUILT_IN_CHKP_BNDLDX, BUILT_IN_CHKP_BNDRET,
	BUILT_IN_CHKP_INTERSECT, BUILT_IN_CHKP_ARG_BND, BUILT_IN_CHKP_NARROW,
	BUILT_IN_CHKP_EXTRACT_LOWER, BUILT_IN_CHKP_EXTRACT_UPPER.
	* common.opt (fcheck-pointer-bounds): New.
	* toplev.c (process_options): Check Pointer Bounds Checker is
	supported.
	* doc/extend.texi: Document Pointer Bounds Checker built-in functions.

	Reverted:
	2013-10-30  Ilya Enkovich  <ilya.enkovich@intel.com>
	* target.def (builtin_chkp_function): New.
	(chkp_bound_type): New.
	(chkp_bound_mode): New.
	(fn_abi_va_list_bounds_size): New.
	(load_bounds_for_arg): New.
	(store_bounds_for_arg): New.
	* targhooks.h (default_load_bounds_for_arg): New.
	(default_store_bounds_for_arg): New.
	(default_fn_abi_va_list_bounds_size): New.
	(default_chkp_bound_type): New.
	(default_chkp_bound_mode): New.
	(default_builtin_chkp_function): New.
	* targhooks.c (default_load_bounds_for_arg): New.
	(default_store_bounds_for_arg): New.
	(default_fn_abi_va_list_bounds_size): New.
	(default_chkp_bound_type): New.
	(default_chkp_bound_mode); New.
	(default_builtin_chkp_function): New.
	* doc/tm.texi.in (TARGET_FN_ABI_VA_LIST_BOUNDS_SIZE): New.
	(TARGET_LOAD_BOUNDS_FOR_ARG): New.
	(TARGET_STORE_BOUNDS_FOR_ARG): New.
	(TARGET_BUILTIN_CHKP_FUNCTION): New.
	(TARGET_CHKP_BOUND_TYPE): New.
	(TARGET_CHKP_BOUND_MODE): New.
	* doc/tm.texi: Regenerated.
	* langhooks.h (lang_hooks): Add chkp_supported field.
	* langhooks-def.h (LANG_HOOKS_CHKP_SUPPORTED): New.
	(LANG_HOOKS_INITIALIZER); Add LANG_HOOKS_CHKP_SUPPORTED.

	Reverted:
	2013-10-24  Ilya Enkovich  <ilya.enkovich@intel.com>
	* config/i386/constraints.md (B): New.
	(Ti): New.
	(Tb): New.
	* config/i386/i386-c.c (ix86_target_macros_internal): Add __MPX__.
	* config/i386/i386-modes.def (BND32): New.
	(BND64): New.
	* config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): New.
	* config/i386/i386.c (isa_opts): Add mmpx.
	(regclass_map): Add bound registers.
	(dbx_register_map): Likewise.
	(dbx64_register_map): Likewise.
	(svr4_dbx_register_map): Likewise.
	(PTA_MPX): New.
	(ix86_option_override_internal): Support MPX ISA.
	(ix86_conditional_register_usage): Support bound registers.
	(print_reg): Likewise.
	(ix86_code_end): Add MPX bnd prefix.
	(output_set_got): Likewise.
	(ix86_output_call_insn): Likewise.
	(ix86_print_operand): Add '!' (MPX bnd) print prefix support.
	(ix86_print_operand_punct_valid_p): Likewise.
	(ix86_print_operand_address): Support UNSPEC_BNDMK_ADDR and
	UNSPEC_BNDMK_ADDR.
	(ix86_class_likely_spilled_p): Add bound regs support.
	(ix86_hard_regno_mode_ok): Likewise.
	(x86_order_regs_for_local_alloc): Likewise.
	(ix86_bnd_prefixed_insn_p): New.
	* config/i386/i386.h (FIRST_PSEUDO_REGISTER): Fix to new value.
	(FIXED_REGISTERS): Add bound registers.
	(CALL_USED_REGISTERS): Likewise.
	(REG_ALLOC_ORDER): Likewise.
	(HARD_REGNO_NREGS): Likewise.
	(TARGET_MPX): New.
	(VALID_BND_REG_MODE): New.
	(FIRST_BND_REG): New.
	(LAST_BND_REG): New.
	(reg_class): Add BND_REGS.
	(REG_CLASS_NAMES): Likewise.
	(REG_CLASS_CONTENTS): Likewise.
	(BND_REGNO_P): New.
	(ANY_BND_REG_P): New.
	(BNDmode): New.
	(HI_REGISTER_NAMES): Add bound registers.
	* config/i386/i386.md (UNSPEC_BNDMK): New.
	(UNSPEC_BNDMK_ADDR): New.
	(UNSPEC_BNDSTX): New.
	(UNSPEC_BNDLDX): New.
	(UNSPEC_BNDLDX_ADDR): New.
	(UNSPEC_BNDCL): New.
	(UNSPEC_BNDCU): New.
	(UNSPEC_BNDCN): New.
	(UNSPEC_MPX_FENCE): New.
	(BND0_REG): New.
	(BND1_REG): New.
	(type): Add mpxmov, mpxmk, mpxchk, mpxld, mpxst.
	(length_immediate): Likewise.
	(prefix_0f): Likewise.
	(memory): Likewise.
	(prefix_rep): Check for bnd prefix.
	(length_nobnd): New.
	(length): Use length_nobnd if specified.
	(BND): New.
	(bnd_ptr): New.
	(BNDCHECK): New.
	(bndcheck): New.
	(*jcc_1): Add bnd prefix and rename length attr to length_nobnd.
	(*jcc_2): Likewise.
	(jump): Likewise.
	(simple_return_internal): Likewise.
	(simple_return_pop_internal): Likewise.
	(*indirect_jump): Add MPX bnd prefix.
	(*tablejump_1): Likewise.
	(simple_return_internal_long): Likewise.
	(simple_return_indirect_internal): Likewise.
	(<mode>_mk): New.
	(*<mode>_mk): New.
	(mov<mode>): New.
	(*mov<mode>_internal_mpx): New.
	(<mode>_<bndcheck>): New.
	(*<mode>_<bndcheck>): New.
	(<mode>_ldx): New.
	(*<mode>_ldx): New.
	(<mode>_stx): New.
	(*<mode>_stx): New.
	* config/i386/predicates.md (lea_address_operand): Rename to...
	(address_no_seg_operand): ... this.
	(address_mpx_no_base_operand): New.
	(address_mpx_no_index_operand): New.
	(bnd_mem_operator): New.
	* config/i386/i386.opt (mmpx): New.
	* doc/invoke.texi: Add documentation for the flags -mmpx, -mno-mpx.
	* doc/rtl.texi Add documentation for BND32mode and BND64mode.

	Reverted:
	2013-10-24  Ilya Enkovich  <ilya.enkovich@intel.com>
	* mode-classes.def (MODE_POINTER_BOUNDS): New.
	* tree.def (POINTER_BOUNDS_TYPE): New.
	* genmodes.c (complete_mode): Support MODE_POINTER_BOUNDS.
	(POINTER_BOUNDS_MODE): New.
	(make_pointer_bounds_mode): New.
	* machmode.h (POINTER_BOUNDS_MODE_P): New.
	* stor-layout.c (int_mode_for_mode): Support MODE_POINTER_BOUNDS.
	(layout_type): Support POINTER_BOUNDS_TYPE.
	* tree-pretty-print.c (dump_generic_node): Support POINTER_BOUNDS_TYPE.
	* tree.c (build_int_cst_wide): Support POINTER_BOUNDS_TYPE.
	(type_contains_placeholder_1): Likewise.
	* tree.h (POINTER_BOUNDS_TYPE_P): New.
	* varasm.c (output_constant): Support POINTER_BOUNDS_TYPE.
	* doc/rtl.texi (MODE_POINTER_BOUNDS): New.

From-SVN: r205522
2013-11-29 12:12:39 +00:00
Ilya Enkovich 01156003a9 builtin-types.def (BT_FN_PTR_CONST_PTR_VAR): New.
* builtin-types.def (BT_FN_PTR_CONST_PTR_VAR): New.
        * chkp-builtins.def (BUILT_IN_CHKP_BIND_BOUNDS): New.
        * cfgexpand.c (expand_call_stmt): Expand BUILT_IN_CHKP_BIND_BOUNDS.
        * gimple.c (gimple_call_get_nobnd_arg_index): Remove.
        * gimple.h (gf_mask): Add GF_CALL_WITH_BOUNDS.
        (gimple_call_with_bounds_p): New.
        (gimple_call_set_with_bounds): New.
        (gimple_call_num_nobnd_args): Remove.
        (gimple_call_nobnd_arg): Remove.
        * tree.h (CALL_WITH_BOUNDS_P): New.
        * rtl.h (CALL_EXPR_WITH_BOUNDS_P): New.

From-SVN: r204947
2013-11-18 12:30:52 +00:00
Andrew MacLeod bdaaa1f177 expr.h: Revert change and include tree-core.h.
* expr.h: Revert change and include tree-core.h.
	* rtl.h: Revert change and don't include tree-core.h.

From-SVN: r204167
2013-10-29 16:37:01 +00:00
Andrew MacLeod 8e9055ae62 tree-outof-ssa.h: Remove include files.
* tree-outof-ssa.h: Remove include files.
	* tree-outof-ssa.c: Add required include files from tree-outof-ssa.h.
	* expr.c: Likewise.
	* tree-ssa-coalesce.c: Likewise.
	* cfgexpand.c: Likewise.
	* tree-ssa-ter.c: Likewise.
	* ipa-prop.h: Remove gimple.h and tree-core.h from include list.
	* lto-streamer.h: Likewise.
	* cgraphbuild.c: Add gimple.h to include list.
	* data-streamer-in.c: Likewise.
	* ipa-cp.c: Likewise.
	* tree-streamer.c: Likewise.
	* lto-compress.c: Likewise.
	* ipa-reference.c: Likewise.
	* data-streamer-out.c: Likewise.
	* lto-cgraph.c: Likewise.
	* cgraphclones.c: Likewise.
	* ipa-utils.c: Likewise.
	* data-streamer.c: Likewise.
	* ipa-split.c: Likewise.
	* lto-section-in.c: Likewise.
	* tree-streamer-out.c: Likewise.
	* ipa-prop.c: Likewise.
	* tree-streamer-in.c: Likewise.
	* symtab.c: Likewise.
	* opts-global.c: Likewise.
	* lto-opts.c: Likewise.
	* lto-section-out.c: Likewise.
	* lto-streamer.c: Likewise.
	* rtl.h: Add tree-core.h to include list.
	* expr.h: Remove tree-core.h from include list.
	* gimple.h: Likewise.
	* ipa-utils.h: Likewise.
	* streamer-hooks.h: Likewise.
	* streamer-hooks.c: Include input.h.

	* lto/lto-object.c: Add gimple.h to include list.
	* lto/lto-partition.c: Likewise.

From-SVN: r204158
2013-10-29 12:55:50 +00:00
Richard Sandiford c328471880 alloc-pool.c, [...]: Add missing whitespace before "(".
gcc/
	* alloc-pool.c, asan.c, auto-inc-dec.c, basic-block.h, bb-reorder.c,
	bitmap.c, bitmap.h, bt-load.c, builtins.c, calls.c, cfgcleanup.c,
	cfgexpand.c, cfghooks.c, cfgloop.c, cfgloopmanip.c, cfgrtl.c, cgraph.c,
	cgraph.h, cgraphbuild.c, cgraphclones.c, cgraphunit.c, collect2.c,
	combine-stack-adj.c, combine.c, compare-elim.c, context.c, context.h,
	cprop.c, cse.c, cselib.c, dbxout.c, dce.c, defaults.h, df-core.c,
	df-problems.c, df-scan.c, df.h, diagnostic.c, double-int.c, dse.c,
	dumpfile.c, dwarf2asm.c, dwarf2cfi.c, dwarf2out.c, emit-rtl.c,
	errors.c, except.c, expmed.c, expr.c, file-find.c, final.c,
	fixed-value.c, fold-const.c, function.c, fwprop.c, gcc-ar.c, gcc.c,
	gcov-io.c, gcov-io.h, gcov.c, gcse.c, genattr-common.c, genattr.c,
	genattrtab.c, genautomata.c, genconfig.c, genemit.c, genextract.c,
	genflags.c, gengenrtl.c, gengtype-state.c, gengtype.c, genmodes.c,
	genopinit.c, genoutput.c, genpeep.c, genpreds.c, genrecog.c,
	gensupport.c, ggc-common.c, ggc-page.c, gimple-fold.c, gimple-low.c,
	gimple-pretty-print.c, gimple-ssa-strength-reduction.c, gimple.c,
	gimple.h, godump.c, graphite-clast-to-gimple.c,
	graphite-optimize-isl.c, graphite-poly.h, graphite-sese-to-poly.c,
	graphite.c, haifa-sched.c, hash-table.c, hash-table.h, hwint.c,
	hwint.h, ifcvt.c, incpath.c, init-regs.c, input.h, intl.c, intl.h,
	ipa-cp.c, ipa-devirt.c, ipa-inline-analysis.c, ipa-inline.c,
	ipa-profile.c, ipa-pure-const.c, ipa-reference.c, ipa-split.c,
	ipa-utils.c, ipa.c, ira-build.c, ira.c, jump.c, loop-doloop.c,
	loop-init.c, loop-invariant.c, loop-iv.c, lower-subreg.c, lto-cgraph.c,
	lto-streamer-in.c, lto-streamer-out.c, lto-wrapper.c, mcf.c,
	mode-switching.c, modulo-sched.c, omp-low.c, optabs.c, opts.c,
	pass_manager.h, passes.c, plugin.c, postreload-gcse.c, postreload.c,
	predict.c, prefix.c, pretty-print.c, print-rtl.c, print-tree.c,
	profile.c, read-md.c, real.c, real.h, recog.c, ree.c, reg-stack.c,
	regcprop.c, reginfo.c, regmove.c, regrename.c, regs.h, regstat.c,
	reload1.c, reorg.c, rtl.c, rtl.h, rtlanal.c, sbitmap.c, sched-rgn.c,
	sdbout.c, sel-sched-ir.c, sel-sched.c, sparseset.c, stack-ptr-mod.c,
	statistics.c, stmt.c, stor-layout.c, store-motion.c, streamer-hooks.h,
	system.h, target-hooks-macros.h, targhooks.c, targhooks.h, toplev.c,
	tracer.c, trans-mem.c, tree-browser.c, tree-call-cdce.c, tree-cfg.c,
	tree-cfgcleanup.c, tree-complex.c, tree-data-ref.c, tree-data-ref.h,
	tree-eh.c, tree-emutls.c, tree-flow.h, tree-if-conv.c, tree-into-ssa.c,
	tree-iterator.c, tree-loop-distribution.c, tree-mudflap.c,
	tree-nested.c, tree-nomudflap.c, tree-nrv.c, tree-object-size.c,
	tree-optimize.c, tree-pass.h, tree-pretty-print.c, tree-profile.c,
	tree-scalar-evolution.c, tree-sra.c, tree-ssa-ccp.c,
	tree-ssa-coalesce.c, tree-ssa-copy.c, tree-ssa-copyrename.c,
	tree-ssa-dce.c, tree-ssa-dom.c, tree-ssa-dse.c, tree-ssa-forwprop.c,
	tree-ssa-ifcombine.c, tree-ssa-live.c, tree-ssa-loop-ch.c,
	tree-ssa-loop-im.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-prefetch.c,
	tree-ssa-loop.c, tree-ssa-math-opts.c, tree-ssa-operands.c,
	tree-ssa-phiopt.c, tree-ssa-phiprop.c, tree-ssa-pre.c,
	tree-ssa-reassoc.c, tree-ssa-sink.c, tree-ssa-strlen.c,
	tree-ssa-structalias.c, tree-ssa-threadedge.c, tree-ssa-threadupdate.c,
	tree-ssa-uncprop.c, tree-ssa-uninit.c, tree-ssa.c, tree-ssanames.c,
	tree-stdarg.c, tree-switch-conversion.c, tree-tailcall.c,
	tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop-manip.c,
	tree-vect-stmts.c, tree-vectorizer.c, tree-vectorizer.h, tree-vrp.c,
	tree.c, tree.h, tsan.c, tsystem.h, value-prof.c, var-tracking.c,
	varasm.c, vec.h, vmsdbgout.c, vtable-verify.c, web.c: Add missing
	whitespace before "(".

From-SVN: r203004
2013-09-28 08:42:34 +00:00
Richard Sandiford e5af9ddd01 rtl.texi (REG_NOTES): Say that int_list can also be used.
gcc/
	* doc/rtl.texi (REG_NOTES): Say that int_list can also be used.
	(REG_BR_PROB): Say that the probability is stored in an int_list.
	* reg-notes.def: Update commentary to mention INT_LIST.
	* rtl.def (EXPR_LIST, INSN_LIST): Capitalize comments.
	(INT_LIST): New rtx.
	* rtl.h (add_int_reg_note, add_shallow_copy_of_reg_note): Declare.
	* rtlanal.c (int_reg_note_p): New function.
	(alloc_reg_note): Assert that the note does not have an int argument.
	(add_int_reg_note, add_shallow_copy_of_reg_note): New functions.
	* combine.c (distribute_notes): Use add_shallow_copy_of_rtx.
	* cse.c (cse_process_notes_1): Expect REG_EQUAL to be an EXPR_LIST
	rather than an INSN_LIST.  Handle INT_LIST.
	* ifcvt.c (cond_exec_process_insns): Take the probability as an int
	rather than an rtx.  Use gen_rtx_INT_LIST to create a REG_BR_PROB note.
	(cond_exec_process_if_block): Use XINT to extract REG_BR_PROB values.
	Manipulate them as ints rather than rtxes.
	* reg-stack.c (subst_asm_stack_regs): Only handle EXPR_LIST notes.
	* regmove.c (copy_src_to_dest): Likewise.
	* sched-vis.c (print_insn_with_notes): Handle INT_LIST.

	* config/i386/winnt.c (i386_pe_seh_unwind_emit): Sink pat assignment
	into the cases that need it.
	* config/arm/arm.c (arm_unwind_emit): Likewise.

	* asan.c (asan_clear_shadow): Use add_int_reg_note for REG_BR_PROB.
	* emit-rtl.c (try_split, emit_copy_of_insn_after): Likewise.
	* loop-doloop.c (add_test, doloop_modify): Likewise.
	* loop-unswitch.c (compare_and_jump_seq): Likewise.
	* optabs.c (emit_cmp_and_jump_insn_1): Likewise.
	* predict.c (combine_predictions_for_insn): Likewise.
	* print-rtl.c (print_rtx): Handle INT_LIST.
	* config/aarch64/aarch64.c (aarch64_emit_unlikely_jump): Likewise.
	* config/alpha/alpha.c (emit_unlikely_jump): Likewise.
	* config/arm/arm.c (emit_unlikely_jump): Likewise.
	* config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise.
	(ix86_split_fp_branch, predict_jump): Likewise.
	* config/rs6000/rs6000.c (emit_unlikely_jump): Likewise.
	* config/sh/sh.c (expand_cbranchsi4): Likewise.
	* config/spu/spu.c (ea_load_store_inline): Likewise.

	* cfgbuild.c (compute_outgoing_frequencies): Use XINT to access the
	value of a REG_BR_PROB note.
	* cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
	(update_br_prob_note, rtl_verify_edges, purge_dead_edges): Likewise.
	* emit-rtl.c (try_split): Likewise.
	* predict.c (br_prob_note_reliable_p): Likewise.
	(invert_br_probabilities, combine_predictions_for_insn): Likewise.
	* reorg.c (mostly_true_jump): Likewise.
	* config/bfin/bfin.c (cbranch_predicted_taken_p): Likewise.
	* config/frv/frv.c (frv_print_operand_jump_hint): Likewise.
	* config/i386/i386.c (ix86_print_operand): Likewise.
	* config/ia64/ia64.c (ia64_print_operand): Likewise.
	* config/mmix/mmix.c (mmix_print_operand): Likewise.
	* config/rs6000/rs6000.c (output_cbranch): Likewise.
	* config/s390/s390.c (s390_expand_tbegin): Likewise.
	* config/sh/sh.c (sh_print_operand, sh_adjust_cost): Likewise.
	* config/sparc/sparc.c (output_cbranch): Likewise.
	* config/spu/spu.c (get_branch_target): Likewise.
	* config/tilegx/tilegx.c (cbranch_predicted_p): Likewise.
	* config/tilepro/tilepro.c (cbranch_predicted_p): Likewise.

From-SVN: r202839
2013-09-23 17:41:02 +00:00
Eric Botcazou 5cf6635b26 rtl.h (update_alignments): Declare.
* rtl.h (update_alignments): Declare.
	* final.c (grow_label_align): New function extracted from...
	(shorten_branches): ...here.  Call it.
	(update_alignments): New function.
	* reorg.c (sibling_labels): New variable.
	(get_label_before): Add SIBLING parameter.  If it is non-zero, push
	the new label along with it onto the sibling_labels vector.
	(fill_simple_delay_slots): Adjust call to get_label_before.
	(fill_slots_from_thread): Likewise.
	(relax_delay_slots): Likewise.
	(make_return_insns): Likewise.
	(dbr_schedule): Invoke update_alignment on the sibling_labels vector.

From-SVN: r201575
2013-08-07 17:17:07 +00:00
Joern Rennecke bd280792f0 re PR rtl-optimization/57425 (RTL alias analysis unprepared to handle stack slot sharing)
PR rtl-optimization/57425
        PR rtl-optimization/57569
        * alias.c (write_dependence_p): Remove parameters mem_mode and
        canon_mem_addr.  Add parameters x_mode, x_addr and x_canonicalized.
        Changed all callers.
        (canon_anti_dependence): Get comments and semantics in sync.
        Add parameter mem_canonicalized.  Changed all callers.
        * rtl.h (canon_anti_dependence): Update prototype.

From-SVN: r200241
2013-06-20 13:43:29 +01:00
Joern Rennecke 393f9fedf3 re PR rtl-optimization/57425 (RTL alias analysis unprepared to handle stack slot sharing)
gcc:
	PR rtl-optimization/57425
	PR rtl-optimization/57569
	* alias.c (write_dependence_p): Add new parameters mem_size,
	canon_mem_addr and mem_canonicalized.  Change type of writep to bool.
	Changed all callers.
	(canon_anti_dependence): New function.
	* cse.c (check_dependence): Use canon_anti_dependence.
	* cselib.c (cselib_invalidate_mem): Likewise.
	* rtl.h (canon_anti_dependence): Declare.
gcc/testsuite:
	PR rtl-optimization/57425
	PR rtl-optimization/57569
	* gcc.dg/torture/pr57425-1.c, gcc.dg/torture/pr57425-2.c: New files.
	* gcc.dg/torture/pr57425-3.c, gcc.dg/torture/pr57569.c: Likewise.
Index: alias.c
===================================================================
--- alias.c	(revision 200126)

From-SVN: r200133
2013-06-16 15:59:41 +01:00
Steven Bosscher 61216c2608 rtl.h (next_label, [...]): Remove prototypes.
* rtl.h (next_label, skip_consecutive_labels, link_cc0_insns):
	Remove prototypes.
	* emit-rtl.c (next_label): Remove unused function.
	(skip_consecutive_labels, link_cc0_insns): Move to ...
	* reorg.c (skip_consecutive_labels, link_cc0_insns): ... here, the
	only place where these functions are used, and make them static.

From-SVN: r198894
2013-05-14 17:20:08 +00:00
Steven Bosscher fb0d5c60f5 mips.c: Include tree-pass.h.
* config/mips/mips.c: Include tree-pass.h.
	(mips_reorg): Split in pre- and post-dbr_schedule parts.
	(mips_machine_reorg2): Move mips_reorg post-dbr_schedule parts here.
	(pass_mips_machine_reorg2): New machine specific pass.
	(insert_pass_mips_machine_reorg2): New pass plugin definition.
	(mips_option_override): Register the new pass.
	* rtl.h (cleanup_barriers): Remove prototype.
	(dbr_schedule): Likewise.
	* jump.c (cleanup_barriers): Make static.
	* reorg.c (dbr_schedule): Likewise.

From-SVN: r198640
2013-05-06 19:02:12 +00:00
Vladimir Makarov 2c62cbaaf1 rtl.h (struct rtx_def): Add comment for field jump.
2013-04-26  Vladimir Makarov  <vmakarov@redhat.com>

	* rtl.h (struct rtx_def): Add comment for field jump.
	(LRA_SUBREG_P): New macro.
	* recog.c (register_operand): Check LRA_SUBREG_P.
	* lra.c (lra): Add note at the end of RTL code. Align non-empty
	stack frame.
	* lra-spills.c (lra_spill): Align stack after spilling pseudos.
	(lra_final_code_change): Skip subreg change for operators.
	* lra-eliminations.c (eliminate_regs_in_insn): Make return earlier
	if there are no operand changes.
	* lra-constraints.c (curr_insn_set): New.
	(match_reload): Set LRA_SUBREG_P.
	(emit_spill_move): Ditto.
	(check_and_process_move): Use curr_insn_set. Process only single
	set insns.  Don't initialize sec_mem_p and change_p.
	(simplify_operand_subreg): Use LRA_SUBREG_P.
	(reg_in_class_p): New function.
	(process_alt_operands): Use it.  Use #if HAVE_ATTR_enabled instead
	of #ifdef.  Add code to remove cycling.
	(process_address): Check EXTRA_CONSTRAINT_STR. Process even if
	non-null disp.  Reload inner instead of disp when base and index
	are null.  Try to put lo_sum into register.
	(EBB_PROBABILITY_CUTOFF): Redefine probability in percents.
	(check_and_process_move): Move code for move cost check to
	simple_move_p.  Remove equiv_substitution.
	(simple_move_p): New function.
	(curr_insn_transform): Initialize sec_mem_p and change_p.  Set up
	curr_insn_set.  Call check_and_process_move only for single set
	insns.  Use the new function.  Move call of check_and_process_move
	after operand equiv substitution and address process.

From-SVN: r198344
2013-04-26 18:11:35 +00:00
Vladimir Makarov 0ae24cc897 revert: rtl.h (struct rtx_def): ...
2013-04-24  Vladimir Makarov  <vmakarov@redhat.com>

	Revert:
	2013-04-24  Vladimir Makarov  <vmakarov@redhat.com>
	* rtl.h (struct rtx_def): ...

From-SVN: r198266
2013-04-24 22:33:06 +00:00
Vladimir Makarov f6ce35ac7c rtl.h (struct rtx_def): Add comment for field jump.
2013-04-24  Vladimir Makarov  <vmakarov@redhat.com>

        * rtl.h (struct rtx_def): Add comment for field jump.
	(LRA_SUBREG_P): New macro.
	* recog.c (register_operand): Check LRA_SUBREG_P.
	* lra.c (lra): Add note at the end of RTL code. Align non-empty
	stack frame.
	* lra-spills.c (lra_spill): Align stack after spilling pseudos.
	(lra_final_code_change): Skip subreg change for operators.
	* lra-eliminations.c (eliminate_regs_in_insn): Make return earlier
	if there are no operand changes.
	* lra-constraints.c (curr_insn_set): New.
	(match_reload): Set LRA_SUBREG_P.
	(emit_spill_move): Ditto.
	(check_and_process_move): Use curr_insn_set. Process only single
	set insns.  Don't initialize sec_mem_p and change_p.
	(simplify_operand_subreg): Use LRA_SUBREG_P.
	(reg_in_class_p): New function.
	(process_alt_operands): Use it.  Use #if HAVE_ATTR_enabled instead
	of #ifdef.  Add code to remove cycling.
	(process_address): Check EXTRA_CONSTRAINT_STR. Process even if
	non-null disp.  Reload inner instead of disp when base and index
	are null.  Try to put lo_sum into register.
	(EBB_PROBABILITY_CUTOFF): Redefine probability in percents.
        (check_and_process_move): Move code for move cost check to
	simple_move_p.  Remove equiv_substitution.
        (simple_move_p): New function.
	(curr_insn_transform): Initialize sec_mem_p and change_p.  Set up
	curr_insn_set.  Call check_and_process_move only for single set
	insns.  Use the new function.  Move call of check_and_process_move
	after operand equiv substitution and address process.

From-SVN: r198252
2013-04-24 15:45:42 +00:00
Bin Cheng ec9202a887 * rtl.h (AUTO_INC_DEC): Fix typo of HAVE_POST_MODIFY_DISP.
From-SVN: r197398
2013-04-03 10:25:08 +00:00
Steven Bosscher 397186076b cfgrtl.c (fixup_reorder_chain): Do not emit barriers to BB_FOOTER.
* cfgrtl.c (fixup_reorder_chain): Do not emit barriers to BB_FOOTER.

	* postreload-gcse.c (bb_has_well_behaved_predecessors): Correct test
	for table jump at the end of a basic block using tablejump_p.
	* targhooks.c (default_invalid_within_doloop): Likewise.
	* config/rs6000/rs6000.c (TARGET_INVALID_WITHIN_DOLOOP): Remove
	target hook implementation that is identical to the default hook.
	(rs6000_invalid_within_doloop): Remove.

	* bb-reorder.c (fix_crossing_unconditional_branches): Remove set but
	unused variable from tablejump_p call.

	* rtl.def (JUMP_TABLE_DATA): New RTX_INSN object.
	* rtl.h (RTX_PREV, RTX_NEXT): Adjust for new JUMP_TABLE_DATA.
	(INSN_DELETED_P): Likewise.
	(emit_jump_table_data): New prototype.
	* gengtype.c (adjust_field_rtx_def): Handle JUMP_TABLE_DATA fields
	after 4th as unused.
	* print-rtl.c (print_rtl): Handle JUMP_TABLE_DATA.
	* sched-vis.c (print_insn): Likewise.
	* emit-rtl.c (active_insn_p): Consider JUMP_TABLE_DATA an active
	insn for compatibility with back ends that use next_active_insn to
	identify jump table data.
	(set_insn_deleted): Remove no longer useful JUMP_TABLE_DATA_P check.
	(remove_insn): Likewise.
	(emit_insn): Do not accept JUMP_TABLE_DATA objects in insn chains
	to be emitted.
	(emit_debug_insn, emit_jump_insn, emit_call_insn, emit_label): Idem.
	(emit_jump_table_data): New function.

	* cfgbuild.c (inside_basic_block_p): A JUMP_INSN is always inside a
	basic block, a JUMP_TABLE_DATA never is.
	(control_flow_insn_p): JUMP_TABLE_DATA is not a control flow insn.
	* cfgrtl.c (duplicate_insn_chain): Split handling of JUMP_TABLE_DATA
	off from code handling real insns.
	* final.c (get_attr_length_1): Simplify for JUMP_INSNs.
	* function.c (instantiate_virtual_regs): Remove JUMP_TABLE_DATA_P
	test, now redundant because JUMP_TABLE_DATA is not an INSN_P insn.
	* gcse.c (insert_insn_end_basic_block): Likewise, JUMP_TABLE_DATA_P
	is not a NONDEBUG_INSN_P.
	* ira-costs.c (scan_one_insn): Likewise.
	* jump.c (mark_all_labels): Likewise.
	(mark_jump_label_1): Likewise.
	* lra-eliminations.c (eliminate_regs_in_insn): Likewise.
	* lra.c (get_insn_freq): Expect all insns reaching here to be in
	a basic block.
	(check_rtl): Remove JUMP_TABLE_DATA_P test, not a NONDEBUG_INSN_P insn.
	* predict.c (expensive_function_p): Use FOR_BB_INSNS.
	* reload1.c (calculate_needs_all_insns): Call set_label_offsets for
	JUMP_TABLE_DATA_P insns.
	(calculate_elim_costs_all_insns): Likewise.
	(set_label_offsets): Recurse on the PATTERN of JUMP_TABLE_DATA insns.
	(elimination_costs_in_insn): Remove redundant JUMP_TABLE_DATA_P test.
	(delete_output_reload): Code style fixups.
	* reorg.c (dbr_schedule): Move JUMP_TABLE_DATA_P up to avoid setting
	insn flags on this non-insn.
	* sched-rgn.c (add_branch_dependences): Treat JUMP_TABLE_DATA insns
	as scheduling barriers, for pre-change compatibility.
	* stmt.c (emit_case_dispatch_table): Emit jump table data not as
	JUMP_INSN objects but instead as JUMP_TABLE_DATA objects.

	* config/alpha/alpha.c (alpha_does_function_need_gp): Remove
	redundant JUMP_TABLE_DATA_P test.
	* config/arm/arm.c (thumb_far_jump_used_p): Likewise.
	* config/frv/frv.c (frv_function_contains_far_jump): Likewise.
	(frv_for_each_packet): Likewise.
	* config/i386/i386.c (min_insn_size): Likewise.
	(ix86_avoid_jump_mispredicts): Likewise.
	* config/m32r/m32r.c (m32r_is_insn): Likewise.
	* config/mep/mep.c (mep_reorg_erepeat): Likewise.
	* config/mips/mips.c (USEFUL_INSN_P): Likewise.
	(mips16_insn_length): Robustify.
	(mips_has_long_branch_p): Remove redundant JUMP_TABLE_DATA_P test.
	(mips16_split_long_branches): Likewise.
	* config/pa/pa.c (pa_combine_instructions): Likewise.
	* config/rs6000/rs6000.c (get_next_active_insn): Treat
	JUMP_TABLE_DATA objects as active insns, like in active_insn_p.
	* config/s390/s390.c (s390_chunkify_start): Treat JUMP_TABLE_DATA
	as contributing to pool range lengths.
	* config/sh/sh.c (find_barrier): Restore check for ADDR_DIFF_VEC.
	Remove redundant JUMP_TABLE_DATA_P test.
	(sh_loop_align): Likewise.
	(split_branches): Likewise.
	(sh_insn_length_adjustment): Likewise.
	* config/spu/spu.c (get_branch_target): Likewise.

From-SVN: r197266
2013-03-30 14:26:42 +00:00
Lawrence Crowl 7b3b6ae441 Add uniform debug dump function names.
Add some overloaded functions that provide uniform debug dump
function names.  These names are:

  debug: the general debug dumper
  debug_verbose: for more details
  debug_raw: for the gory details
  debug_head: for the heads of declarations, e.g. function heads
  debug_body: for the bodies of declarations, e.g. function bodies

Not all types have the last four versions.

The debug functions come in two flavors, those that take pointers
to the type, and those that take references to the type.  The first
handles printing of '<nil>' for null pointers.  The second assumes
a valid reference, and prints the content.


Example uses are as follows:

  cp_token t, *p;
  debug (t);
  debug (p);

From the debugger, use

  call debug (t)


The functions sets implemented are:

debug (only)

    basic_block_def, const bitmap_head_def, cp_binding_level,
    cp_parser, cp_token, data_reference, die_struct, edge_def,
    gimple_statement_d, ira_allocno, ira_allocno_copy, live_range,
    lra_live_range, omega_pb_d, pt_solution, const rtx_def, sreal,
    tree_live_info_d, _var_map,

    vec<cp_token, va_gc>, vec<data_reference_p>, vec<ddr_p>,
    vec<rtx>, vec<tree, va_gc>,

debug and debug_raw

    simple_bitmap_def

debug and debug_verbose

    expr_def, struct loop, vinsn_def

debug, debug_raw, debug_verbose, debug_head, debug_body

    const tree_node


This patch is somewhat different from the original plan at
gcc.gnu.org/wiki/cxx-conversion/debugging-dumps.  The reason
is that gdb has an incomplete implementation of C++ call syntax;
requiring explicit specification of template arguments and explicit
specification of function arguments even when they have default
values.  So, the original plan would have required typing

  call dump <cp_token> (t, 0, 0, stderr)

which is undesireable.  Instead instead of templates, we overload
plain functions.  This adds a small burden of manually adding
the pointer version of dump for each type.  Instead of default
function arguments, we simply assume the default values.  Most of
the underlying dump functions did not use the options and indent
parameters anyway.  Several provide FILE* parameters, but we expect
debugging to use stderr anyway.  So, the explicit specification of
arguments was not as valuable as we thought initially.  Finally,
a change of name from dump to debug reflect the implicit output
to stderr.


Index: gcc/ChangeLog

2013-03-28  Lawrence Crowl  <crowl@google.com>

	* Makefile.in: Add several missing include dependences.
	(DUMPFILE_H): New.
	(test-dump.o): New.  This object is not added to any executable,
	but is present for ad-hoc testing.
	* bitmap.c
	(debug (const bitmap_head_def &)): New.
	(debug (const bitmap_head_def *)): New.
	* bitmap.h
	(extern debug (const bitmap_head_def &)): New.
	(extern debug (const bitmap_head_def *)): New.
	* cfg.c
	(debug (edge_def &)): New.
	(debug (edge_def *)): New.
	* cfghooks.c
	(debug (basic_block_def &)): New.
	(debug (basic_block_def *)): New.
	* dumpfile.h
	(dump_node (const_tree, int, FILE *)): Correct source file.
	* dwarf2out.c
	(debug (die_struct &)): New.
	(debug (die_struct *)): New.
	* dwarf2out.h
	(extern debug (die_struct &)): New.
	(extern debug (die_struct *)): New.
	* gimple-pretty-print.c
	(debug (gimple_statement_d &)): New.
	(debug (gimple_statement_d *)): New.
	* gimple-pretty-print.h
	(extern debug (gimple_statement_d &)): New.
	(extern debug (gimple_statement_d *)): New.
	* ira-build.c
	(debug (ira_allocno_copy &)): New.
	(debug (ira_allocno_copy *)): New.
	(debug (ira_allocno &)): New.
	(debug (ira_allocno *)): New.
	* ira-int.h
	(extern debug (ira_allocno_copy &)): New.
	(extern debug (ira_allocno_copy *)): New.
	(extern debug (ira_allocno &)): New.
	(extern debug (ira_allocno *)): New.
	* ira-lives.c
	(debug (live_range &)): New.
	(debug (live_range *)): New.
	* lra-int.h
	(debug (lra_live_range &)): New.
	(debug (lra_live_range *)): New.
	* lra-lives.c
	(debug (lra_live_range &)): New.
	(debug (lra_live_range *)): New.
	* omega.c
	(debug (omega_pb_d &)): New.
	(debug (omega_pb_d *)): New.
	* omega.h
	(extern debug (omega_pb_d &)): New.
	(extern debug (omega_pb_d *)): New.
	* print-rtl.c
	(debug (const rtx_def &)): New.
	(debug (const rtx_def *)): New.
	* print-tree.c
	(debug_tree (tree): Move within file.
	(debug_raw (const tree_node &)): New.
	(debug_raw (const tree_node *)): New.
	(dump_tree_via_hooks (const tree_node *, int)): New.
	(debug (const tree_node &)): New.
	(debug (const tree_node *)): New.
	(debug_verbose (const tree_node &)): New.
	(debug_verbose (const tree_node *)): New.
	(debug_head (const tree_node &)): New.
	(debug_head (const tree_node *)): New.
	(debug_body (const tree_node &)): New.
	(debug_body (const tree_node *)): New.
	(debug_vec_tree (tree): Move and reimplement in terms of dump.
	(debug (vec<tree, va_gc> &)): New.
	(debug (vec<tree, va_gc> *)): New.
	* rtl.h
	(extern debug (const rtx_def &)): New.
	(extern debug (const rtx_def *)): New.
	* sbitmap.c
	(debug_raw (simple_bitmap_def &)): New.
	(debug_raw (simple_bitmap_def *)): New.
	(debug (simple_bitmap_def &)): New.
	(debug (simple_bitmap_def *)): New.
	* sbitmap.h
	(extern debug (simple_bitmap_def &)): New.
	(extern debug (simple_bitmap_def *)): New.
	(extern debug_raw (simple_bitmap_def &)): New.
	(extern debug_raw (simple_bitmap_def *)): New.
	* sel-sched-dump.c
	(debug (vinsn_def &)): New.
	(debug (vinsn_def *)): New.
	(debug_verbose (vinsn_def &)): New.
	(debug_verbose (vinsn_def *)): New.
	(debug (expr_def &)): New.
	(debug (expr_def *)): New.
	(debug_verbose (expr_def &)): New.
	(debug_verbose (expr_def *)): New.
	(debug (vec<rtx> &)): New.
	(debug (vec<rtx> *)): New.
	* sel-sched-dump.h
	(extern debug (vinsn_def &)): New.
	(extern debug (vinsn_def *)): New.
	(extern debug_verbose (vinsn_def &)): New.
	(extern debug_verbose (vinsn_def *)): New.
	(extern debug (expr_def &)): New.
	(extern debug (expr_def *)): New.
	(extern debug_verbose (expr_def &)): New.
	(extern debug_verbose (expr_def *)): New.
	(extern debug (vec<rtx> &)): New.
	(extern debug (vec<rtx> *)): New.
	* sel-sched-ir.h
	(_list_iter_cond_expr): Make inline instead of static.
	* sreal.c
	(debug (sreal &)): New.
	(debug (sreal *)): New.
	* sreal.h
	(extern debug (sreal &)): New.
	(extern debug (sreal *)): New.
	* tree.h
	(extern debug_raw (const tree_node &)): New.
	(extern debug_raw (const tree_node *)): New.
	(extern debug (const tree_node &)): New.
	(extern debug (const tree_node *)): New.
	(extern debug_verbose (const tree_node &)): New.
	(extern debug_verbose (const tree_node *)): New.
	(extern debug_head (const tree_node &)): New.
	(extern debug_head (const tree_node *)): New.
	(extern debug_body (const tree_node &)): New.
	(extern debug_body (const tree_node *)): New.
	(extern debug (vec<tree, va_gc> &)): New.
	(extern debug (vec<tree, va_gc> *)): New.
	* tree-cfg.c
	(debug (struct loop &)): New.
	(debug (struct loop *)): New.
	(debug_verbose (struct loop &)): New.
	(debug_verbose (struct loop *)): New.
	* tree-dump.c: Add header dependence.
	* tree-flow.h
	(extern debug (struct loop &)): New.
	(extern debug (struct loop *)): New.
	(extern debug_verbose (struct loop &)): New.
	(extern debug_verbose (struct loop *)): New.
	* tree-data-ref.c
	(debug (data_reference &)): New.
	(debug (data_reference *)): New.
	(debug (vec<data_reference_p> &)): New.
	(debug (vec<data_reference_p> *)): New.
	(debug (vec<ddr_p> &)): New.
	(debug (vec<ddr_p> *)): New.
	* tree-data-ref.h
	(extern debug (data_reference &)): New.
	(extern debug (data_reference *)): New.
	(extern debug (vec<data_reference_p> &)): New.
	(extern debug (vec<data_reference_p> *)): New.
	(extern debug (vec<ddr_p> &)): New.
	(extern debug (vec<ddr_p> *)): New.
	* tree-ssa-alias.c
	(debug (pt_solution &)): New.
	(debug (pt_solution *)): New.
	* tree-ssa-alias.h
	(extern debug (pt_solution &)): New.
	(extern debug (pt_solution *)): New.
	* tree-ssa-alias.c
	(debug (_var_map &)): New.
	(debug (_var_map *)): New.
	(debug (tree_live_info_d &)): New.
	(debug (tree_live_info_d *)): New.
	* tree-ssa-alias.h
	(extern debug (_var_map &)): New.
	(extern debug (_var_map *)): New.
	(extern debug (tree_live_info_d &)): New.
	(extern debug (tree_live_info_d *)): New.

Index: gcc/cp/ChangeLog

2013-03-28  Lawrence Crowl  <crowl@google.com>

	* Make-lang.in
	(CXX_PARSER_H): Add header dependence.
	* cp-tree.h
	(extern debug (cp_binding_level &)): New.
	(extern debug (cp_binding_level *)): New.
	* name-lookup.h
	(debug (cp_binding_level &)): New.
	(debug (cp_binding_level *)): New.
	* parser.c
	(debug (cp_parser &)): New.
	(debug (cp_parser *)): New.
	(debug (cp_token &)): New.
	(debug (cp_token *)): New.
	(debug (vec<cp_token, va_gc> &)): New.
	(debug (vec<cp_token, va_gc> *)): New.
	* parser.c: Add header dependence.
	(extern debug (cp_parser &)): New.
	(extern debug (cp_parser *)): New.
	(extern debug (cp_token &)): New.
	(extern debug (cp_token *)): New.
	(extern debug (vec<cp_token, va_gc> &)): New.
	(extern debug (vec<cp_token, va_gc> *)): New.

From-SVN: r197224
2013-03-29 03:42:21 +00:00
Steven Bosscher b64925dc4b avr.c, [...]: Where applicable...
* config/avr/avr.c, config/bfin/bfin.c, config/c6x/c6x.c,
	config/epiphany/epiphany.c, config/frv/frv.c, config/ia64/ia64.c,
	config/iq2000/iq2000.c, config/mcore/mcore.c, config/mep/mep.c,
	config/mmix/mmix.c, config/pa/pa.c, config/rs6000/rs6000.c,
	config/s390/s390.c, config/sparc/sparc.c, config/spu/spu.c,
	config/stormy16/stormy16.c, config/v850/v850.c, config/xtensa/xtensa.c,
	dwarf2out.c, hw-doloop.c, resource.c, rtl.h : Where applicable, use
	the predicates NOTE_P, NONJUMP_INSN_P, JUMP_P, CALL_P, LABEL_P, and
	BARRIER_P instead of GET_CODE.

From-SVN: r197005
2013-03-23 12:11:10 +00:00
Richard Sandiford d1e082c2c2 Update copyright years in gcc/
From-SVN: r195098
2013-01-10 20:38:27 +00:00
Steve Ellcey 2cd45f0e68 re PR target/54061 (gcc.c-torture/compile/mipscop-*.c ICEs with -g)
2012-12-10  Steve Ellcey  <sellcey@mips.com>

	PR target/54061
	rtl.h (IGNORED_DWARF_REGNUM): New.
	* dwarf2out.c (reg_loc_descriptor): Check for IGNORED_DWARF_REGNUM.
	(mem_loc_descriptor): Ditto.
	* config/mips/mips.h (ALL_COP_REG_FIRST): New.
	(ALL_COP_REG_LAST): New.
	(ALL_COP_REG_NUM): Redefine using above macros.
	* config/mips/mips.c (mips_option_override): Set mips_dbx_regno
	coprocessor entries to IGNORED_DWARF_REGNUM.

From-SVN: r194372
2012-12-10 22:19:16 +00:00
Steven Bosscher 2c895bd193 rtl.h (print_insn_with_notes): Remove prototype.
* rtl.h (print_insn_with_notes): Remove prototype.
	(rtl_dump_bb_for_graph): New prototype.
	* sched-vis.c (print_insn_with_notes): Make static again.  Fix
	printing of notes.
	(rtl_dump_bb_for_graph): New function.
	* cfghooks.h (struct cfg_hooks) <dump_bb_for_graph>: New hook.
	(dump_bb_for_graph): New prototype.
	* cfghooks.c (dump_bb_for_graph): New function.
	* tree-cfg.c (gimple_cfg_hooks): Register gimple_dump_bb_for_graph
	as dump_bb_for_graph hook implementation for GIMPLE.
	* cfgrtl.c (rtl_cfg_hooks): Likewise for rtl_dump_bb_for_graph.
	(cfg_layout_rtl_cfg_hooks): Likewise.
	* graph.c (draw_cfg_node): Don't include sbitmap.h, rtl.h, tree.h,
	gimple.h, and gimple-pretty-print.h.
	(draw_cfg_node, draw_cfg_node_succ_edges): Use the uniqe function
	definition number instead of the function declaration UID.
	(print_graph_cfg): Take a struct function instead of a tree.
	Use the dump_bb_for_graph hook to dump the basic block content.
	* graph.h (print_graph_cfg): Update prototype.
	* passes.c (execute_function_dump): Update print_graph_cfg call.
	* Makefile.in (graph.o): Fixup dependencies.

From-SVN: r194157
2012-12-04 18:38:26 +00:00
Steven Bosscher 41222ddf8e rtl.h (print_insn_with_notes): Prototype.
* rtl.h (print_insn_with_notes): Prototype.
	* sched-vis.c (print_insn_with_notes): Export it.

	* gimple-pretty-print.h (gimple_dump_bb_for_graph): Prototype.
	* gimple-pretty-print.c (print_gimple_expr): Flush the buffer.
	(pp_gimple_stmt_1): Don't do it here.
	(gimple_dump_bb_for_graph): New function.
	* tree-pretty-print.c (print_generic_expr): Flush the buffer here.
	(dump_generic_node): Don't flush the buffer here.

	* graph.h (print_rtl_graph_with_bb): Rename to print_graph_cfg.
	* graph.c: Include gimple.h, dumpfile.h, and gimple-pretty-print.h.
	(draw_cfg_node): Handle GIMPLE basic blocks also.
	(print_rtl_graph_with_bb): Rename to print_graph_cfg.
	* passes.c (finish_optimization_passes): Don't finish graph dumps here.
	(execute_function_dump): Use print_graph_cfg. Enable dumping the CFG
	for GIMPLE also.
	(pass_init_dump_file): Wrap in TV_DUMP.  Set up CFG graph dumps.
	(pass_fini_dump_file): Wrap in TV_DUMP.  Finish graph dumps.
	(execute_one_pass): Don't set up graph dumps here.

From-SVN: r194085
2012-12-03 13:16:55 +00:00
Steven Bosscher 7eba871a24 coretypes.h (struct pretty_print_info): Make a coretype.
* coretypes.h (struct pretty_print_info): Make a coretype.
	(typedef pretty_printer): Likewise.
	* pretty-print.h (typedef pretty_printer): Not needed here anymore.
	* pretty-print.c (pp_write_text_as_dot_label_to_stream): New function.
	* rtl.h (str_pattern_slim): New prototype.
	(print_value, print_pattern, print_insn): Adjust prototypes to take
	a pretty-printer rather than a char buffer.
	* sched-vis.c (safe_concat): Remove.
	(print_exp): Print into a pretty-printer.
	(print_value): Likewise.
	(print_pattern): Likewise.
	(print_insn): Likewise.
	(print_insn_with_notes): New static function.
	(init_rtl_slim_pretty_print): New function.
	(dump_value_slim): Simplify.  Print into and flush a pretty-printer.
	(dump_insn_slim): Likewise.
	(dump_rtl_slim): Likewise.
	(str_pattern_slim): New function.
	* haifa-sched.c (model_recompute): Use str_pattern_slim instead of
	static buffers.
	(model_record_pressures): Likewise.
	(schedule_insn): Likewise.
	* sel-sched-dump.c (dump_insn_rtx_1): Likewise.
	(sel_prepare_string_for_dot_label): Refer to graph.c CFG dumper code.
	* graph.c: Include pretty-print.h.
	(init_graph_slim_pretty_print): New function.
	(print_escaped_line): Removed here, and reincarnated as
	pp_write_text_as_dot_label_to_stream.
	(draw_cfg_node): Print into a pretty printer.
	(draw_cfg_node_succ_edges): Likewise.
	(print_rtl_graph_with_bb): Likewise.
	* Makefile.in (graph.o): Fix dependencies.
	(tree-optimize.o, toplev.o, sched-vis.o): Likewise.

From-SVN: r193990
2012-11-30 09:46:02 +00:00