Commit Graph

100 Commits

Author SHA1 Message Date
Daniel Berlin 6fb5fa3cbc Merge dataflow branch into mainline
From-SVN: r125624
2007-06-11 18:02:15 +00:00
Jan Hubicka a38e7aa544 gengtype.c (adjust_field_rtx_def): Use NOTE_KIND instead of NOTE_LINE_NUMBER...
* gengtype.c (adjust_field_rtx_def): Use NOTE_KIND instead of
	NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible.
	* ddg.c (create_ddg): LIkewise.
	* final.c (final): Remove hunk moving line numbernotes around since
	they are no longer present at this stage.
	(final_scan_insn): Use NOTE_KIND instead of
	NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible.
	(output_asm_label): Likewise.
	* reorg.c (dbr_schedule): Likewise.
	* haifa-sched.c (unlink_other_notes): Likewise.
	* mode-switching.c (optimize_mode_switching): Likewise.
	* graph.c (start_bb): Likewise.
	* rtl.def (NOTE): Update description.
	* jump.c (squeeze_notes): Delete.
	(mark_jump_label): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use
	NOTE_INSN_BASIC_BLOCK_P when possible.
	* ifcvt.c (dead_or_predicable): Remove call of squeeze_notes.
	* dwarf2out.c (gen_label_die): Use NOTE_KIND instead of
        NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible.
	(dwarf2out_var_location): Likewise.
	* cfgbuild.c (make_edges): Likewise.
	(find_basic_blocks_1): Likewise.
	* function.c (reorder_blocks_1): Likewise.
	(epilogue_done): Likewise.
	(reposition_prologue_and_epilogue_notes): Likewise.
	* print-rtl.c (print_rtx): Likewise; drop code for printing line number
	notes.
	(print_rtl): Likewise.
	(print_rtl_single): Likewise.
	* gcse.c (insert_insn_start_bb): Likewise.
	* alias.c (init_alias_analysis): Likewise.
	* calls.c (fixup_tail_calls): Likewise.
	* except.c (sjlj_emit_function_enter): Likewise.
	* emit-rtl.c (add_insn_after): Likeiwse.
	(emit_label_before): Likewise.
	(emit_label_after): Likewise.
	(emit_note_before, emit_note_after, emit_note): Update
	parameter to be enum insn_note; do not deal with source
	files.
	* cfgcleanup.c (merge_blocks_move_predecessor_nojumps):
	Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P
	when possible.
	(merge_blocks_move_successor_nojumps): Simplify now when
	we don't have BLOCK notes.
	(try_optimize_cfg): Likewise.
	* cfglayout.c (skip_insns_after_block): Likewise.
	(record_effective_endpoints): Likewise.
	(duplicate_insn_chain): Likewise.
	* varasm.c (output_constant_pool_1): Likewise.
	* sched-deps.c (sched_analyze): Likewise.
	* rtl.c (NOTE_INSN_MAX_isnt_negative_adjust_NOTE_INSN_BIAS):
	Exterminate.
	(note_insn_name): Simplify now when NOTE_INSN_BIAS is gone.
	* rtl.h (NOTE_SOURCE_LOCATION, NOTE_EXPANDED_LOCATION): Exterminate.
	(SET_INSN_DELETED): Simplify.
	(NOTE_LINE_NUMBER): Exterminate.
	(NOTE_LINE_KIND): New.
	(NOTE_INSN_BASIC_BLOCK_P): Update.
	(enum insn_note): Simplify.
	(GET_NOTE_INSN_NAME) Simplify.
	(emit_note_before, emit_note_after, emit_note): Update prototype.
	(squeeze_notes): Remove.
	* sched-int.h (NOTE_NOT_BB_P): Update.
	* resource.c (mark_target_live_regs): Update.
	* sched-rgn.c (debug_dependencies): Update.
	* sched-vis.c (print_insn): Update.
	* config/alpha/alpha.c (alpha_handle_trap_shadows): Update.
	* config/i386/i386.c (ix86_output_function_epilogue): Update.
	* config/sh/sh.c (sh_adjust_unroll_max): Function dead since gcc 4.0.0.
	(TARGET_ADJUST_UNROLL_MAX): Likewise.
	(split_branches): Update.
	(sh_optimize_target_register_callee_saved): Remove hunk dead since gcc
	4.0.0.
	(sh_adjust_unroll_max): Exterminate.
	* config/c4x/c4x.c (c4x_reorg): Use SET_INSN_DELETED.
	* config/m68hc11/m68hc11.c (m68hc11_check_z_replacement): Likewise.
	(m68hc11_reorg): Likewise.
	* config/ia64/ia64.c (emit_insn_group_barriers): Update.
	(emit_predicate_relation_info): Update.
	(process_for_unwind_directive): Update.
	* config/rs6000/rs6000.c (rs6000_output_function_epilogue): Update.
	(output_call): Update.
	* config/pa/pa.c (output_lbranch): Update.
	(output_millicode_call): Update.
	(output_call): Update.
	(pa_combine_instructions): Update.
	* config/mips/mips.c (mips16_gp_pseudo_reg): Update.
	* config/bfin/bfin.c (gen_one_bundle): Update.
	* cfgrtl.c (can_delete_note_p): Update.
	(delete_insn): Update.
	(rtl_merge_blocks): Update.
	(commit_one_edge_insertion): Update.
	(rtl_verify_flow_info): Update.
	* stmt.c (expand_case): Do not call squeeze_notes.

From-SVN: r124895
2007-05-21 06:19:50 +00:00
Zdenek Dvorak 9e2f83a5e8 tree-ssa-loop-niter.c (record_estimate): Use GGC_NEW to allocate struct nb_iter_bound.
* tree-ssa-loop-niter.c (record_estimate): Use GGC_NEW to allocate
	struct nb_iter_bound.
	(free_numbers_of_iterations_estimates_loop): Use ggc_free.
	* gengtype.c (open_base_files): Add cfhloop.h to the list of includes.
	* cfgloopmanip.c (place_new_loop): Vector larray is gc-allocated.
	* tree-scalar-evolution.c: Include gt-tree-scalar-evolution.h.
	(struct scev_info_str, scalar_evolution_info): Add GTY markers.
	(new_scev_info_str): Use GGC_NEW to allocate struct scev_info_str.
	(del_scev_info): Use ggc_free.
	(scev_initialize): Allocate scalar_evolution_info in gc memory.
	* loop-init.c: Include ggc.h.
	(loop_optimizer_init): Use GGC_CNEW to allocate struct loops.
	(loop_optimizer_finalize): Use ggc_free.
	* tree-ssa-loop.c (pass_tree_unswitch, pass_vectorize,
	pass_linear_transfom, pass_empty_loop, pass_complete_unroll,
	pass_iv_optimize): Add TODO_ggc_collect.
	* function.h (struct function): Remove skip marker from x_current_loops.
	* cfgloop.c: Include ggc.h.
	(flow_loops_free, flow_loop_free): Free the loop descriptions in gc
	memory.
	(establish_preds): Vector superloops is gc allocated.
	(alloc_loop): Allocate loop using GGC_CNEW.  Allocate head of
	loop->exits list.
	(flow_loops_find): Vector larray is gc allocated.
	(loop_exit_free): Use ggc_free.
	(rescan_loop_exit): Use GGC_NEW to allocate struct loop_exit.  Reflect
	that head of exits list is now not a part of struct loop.
	(record_loop_exits): Allocate exits table in gc memory.
	(get_loop_exit_edges, verify_loop_structure, single_exit): Reflect that
	head of exits list is now not a part of struct loop.
	* cfgloop.h (struct lpt_decision, struct nb_iter_bound,
	struct loop_exit): Add GTY marker.
	(struct loop): Add GTY marker.  Make superloops vector gc allocated.
	Add skip marker to aux field.  Make head of exits list a separate
	object.
	(struct loops): Add GTY marker.  Make larray vector gc allocated.
	Add param marker to exits table.
	(get_loops): Type changed.
	* Makefile.in (tree-scalar-evolution.o): Add gt-tree-scalar-evolution.h
	dependency.
	(cfgloop.o, loop-init.o): Add ggc.h dependency.
	(GTFILES): Add cfgloop.h and tree-scalar-evolution.c.
	* basic-block.h (struct basic_block_def): Remove skip marker from
	loop_father field.

From-SVN: r124727
2007-05-14 21:58:42 +00:00
Brooks Moses df58283300 re PR bootstrap/31776 (Bootstrap fails with "error: conflicting types for strsignal")
PR bootstrap/31776
* system.h: Remove inclusion of double-int.h
* tree.h: Include double-int.h
* gengtype.c: Likewise
* cfgloop.h: Likewise
* Makefile.in: Adjust dependencies on double-int.h

From-SVN: r124373
2007-05-02 23:14:52 -07:00
Zack Weinberg 311e3ff0b6 gengtype.c (oprintf): Mostly revert changes from 2007-03-26...
* gengtype.c (oprintf): Mostly revert changes from 2007-03-26;
	add comment explaining why vsnprintf cannot be used.

From-SVN: r123332
2007-03-29 14:59:52 +00:00
Zack Weinberg 01d419aec1 gengtype-parse.c: New file.
* gengtype-parse.c: New file.
	* gengtype-yacc.y: Delete.
	* gengtype-lex.l: Don't include gengtype-yacc.h.
	Define YY_DECL and yyterminate appropriately for recursive
	descent parser.  yylval is now a string out-parameter to yylex.
	(HWS, EOID): New shorthand.
	(IWORD): Add a couple more types.
	(yylex): Add a setup stanza.  Remove the complex rules for
	detecting GTY'ed types and typedefs; replace with simple
	keyword detectors.  Adjust everything for the changed
	definition of yylval.  Ignore all pp-directives, not just #define.
	(yyerror): Delete.
	(parse_file): Rename yybegin; do not call yyparse.
	(yyend): New.
	* gengtype.c (xasprintf): Export again.
	(this_file): New.  Use everywhere __FILE__ was being used.
	(get_lang_bitmap): Special case types defined in gengtype.c.
	(do_typedef, new_structure): Suppress definition of certain types.
	(new_structure): Improve diagnostics of duplicate definitions.
	Make sure location_s is associated with input.h.
	(nreverse_pairs, define_location_structures): New functions.
	(main): Improve tagging of kludge types.  Remove old kludges
	for input.h types; use define_location_structures.
	* gengtype.h: Update prototypes.  Define token codes here.
	* Makefile.in: Remove all references to gengtype-yacc.
	Add rules for gengtype-parse.o.  Adjust rules for gengtype-lex.o
	and gengtype.
	* bitmap.h (struct bitmap_head_def): Coalesce definitions,
	add GTY((skip)) to the field that's only conditionally there.
	* doc/install.texi: Document that Bison is no longer required
	unless building treelang.

From-SVN: r123235
2007-03-26 21:18:43 +00:00
Zack Weinberg 11a675992a gengtype.c: Don't include gtyp-gen.h.
* gengtype.c: Don't include gtyp-gen.h.
	(srcdir): Declare here.
	(base_files, lang_dir_names): Allocate dynamically.
	(gt_files, num_gt_files, num_lang_dirs): New globals.
	(measure_input_list, read_input_line, read_input_list)
	(set_lang_bitmap): New functions.
	(get_base_file_bitmap): Rename get_lang_bitmap and drastically
	simplify, relying on read_input_list to set up the bitmaps.
	(main): Arguments are no longer unused.  Check for correct number
	of command line arguments, set srcdir and srcdir_len, then call
	read_input_list, before doing anything else.  No need to worry
	about duplicates in main loop.
	* configure.ac: Simplify the calculation of all_gtfiles.
	Put language tags in there.  Don't set or substitute
	all_gtfiles_files_langs or all_gtfiles_files_frags.
	* Makefile.in: Revamp the way gengtype is invoked, now that it
	takes a file on its command line with a much simpler format.
	Remove or replace with gtyp-input.list all references to gtyp-gen.h.
	(GTFILES): Remove duplicates and C source files.
	* c-config-lang.in, cp/config-lang.in, objc/config-lang.in
	* objcp/config-lang.in: Add c-pragma.h to gtfiles.
	* configure: Regenerate.

From-SVN: r123234
2007-03-26 21:07:27 +00:00
Zack Weinberg 065ae61175 gengtype.h: Remove all type definitions to gengtype.c...
* gengtype.h: Remove all type definitions to gengtype.c; leave
	only definitions of options_p, type_p, and pair_p as opaque
	pointers.  Update prototypes.
	* gengtype.c: Many type definitions moved here from gengtype.h.
	Consolidate type definitions at the top of the file.
	(xvasprintf): Delete.
	(xasprintf): Make static.
	(create_nested_pointer_option): Add 'next' parameter.
	(create_field_all, create_field_at): New functions.
	(create_field): Now a thin wrapper around create_field_all.
	(create_optional_field): Rename create_optional_field_ and add
	line argument.  Original name is now a macro which supplies
	__LINE__.
	(oprintf): Use vsnprintf directly.
	(close_output_files): Use fatal rather than perror/exit.
	(note_def_vec, note_def_vec_alloc): Use create_field_at.
	(main): Set progname.  Don't use exit.
	* gengtype-yacc.y (struct_fields): Use create_field_at.
	(option, optionseqopt): Delete.
	(optionseq): Consolidate productions from option here so we
	can use the first argument to create_option.

From-SVN: r123233
2007-03-26 21:04:59 +00:00
Zack Weinberg 17defa6a13 gengtype-lex.l: Distinguish unions from structures in the token type.
* gengtype-lex.l: Distinguish unions from structures in the
	token type.  Don't call find_structure; return the tag as a string.
	* gengtype-yacc.y: Add new token types ENT_TYPEDEF_UNION and ENT_UNION.
	Type of these, ENT_TYPEDEF_STRUCT, and ENT_STRUCT is string.
	Reorganize typedef_struct production accordingly.
	Use create_nested_ptr_option.
	* gengtype.c (create_nested_ptr_option): New function.
	* gengtype.h: Declare it.

From-SVN: r123232
2007-03-26 21:00:20 +00:00
Zack Weinberg 95161faf6d gengtype.h (struct type): Replace 'sc' with boolean, scalar_is_char.
* gengtype.h (struct type): Replace 'sc' with boolean, scalar_is_char.
	(string_type): Don't declare.
	(do_scalar_typedef): Declare.
	(create_scalar_type): Update prototype.
	* gengtype.c (string_type): Make static.
	(scalar_nonchar, scalar_char): New.
	(do_scalar_typedef): Export.  Always use scalar_nonchar for the type.
	(resolve_typedef): Use scalar_nonchar for error recovery.
	(create_scalar_type): Remove name_len field.  Return scalar_char
	or scalar_nonchar as appropriate.
	(adjust_field_type): Look at scalar_is_char boolean to decide whether
	to use string_type.
	(throughout): Use scalar_nonchar instead of calling create_scalar_type,
	whenever possible.
	(main): Initialize scalar_char and scalar_nonchar before calling
	gen_rtx_next.
	* gengtype-lex.l: Adjust for removal of second argument to
	create_scalar_type.  Use yylval.s instead of yylval.t when
	returning SCALAR.
	* gengtype-yacc.y: Type of SCALAR is string.  Call
	create_scalar_type from type:SCALAR rule.  Adjust for removal of
	second argument to create_scalar_type.

From-SVN: r123231
2007-03-26 20:55:10 +00:00
Zack Weinberg 4a399aef3a vec.h: Remove all #if IN_GENGTYPE blocks.
* vec.h: Remove all #if IN_GENGTYPE blocks.
	Add comment saying that changes may require adjustments to gengtype.
	* gengtype.c: Don't include coretypes.h or tm.h.
	Add comment to inclusion of errors.h.
	(note_def_vec, note_def_vec_alloc): New functions.
	* gengtype.h: Declare new functions.
	* gengtype-lex.l: Don't include coretypes.h.
	(YY_INPUT, macro_input, push_macro_expansion, mangle_macro_name):
	Delete.
	(update_lineno): Remove unnecessary prototype.
	(DEF_VEC_* rules): Simplify using note_def_vec / note_def_vec_alloc.
	(VEC rule): Just return VEC_TOKEN.
	* gengtype-yacc.y (VEC_TOKEN): New token type.
	(type): Add a production for VEC(a,b).
	* Makefile.in: Update dependencies.

From-SVN: r123229
2007-03-26 20:49:17 +00:00
Zack Weinberg cff4720f62 gengtype-lex.l: Remove all rules and states relating to yacc input files.
* gengtype-lex.l: Remove all rules and states relating to yacc
	input files.
	* gengtype-yacc.y: Similarly.
	* gengtype.c (note_yacc_type): Delete function.
	* gengtype.h: Update prototypes.

From-SVN: r123226
2007-03-26 20:45:01 +00:00
Sandra Loosemore 5039610b96 tree.h (enum tree_code_class): Add tcc_vl_exp.
2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
	    Brooks Moses  <brooks.moses@codesourcery.com>
	    Lee Millward  <lee.millward@codesourcery.com>

	* tree.h (enum tree_code_class): Add tcc_vl_exp.
	(VL_EXP_CLASS_P): New.
	(TREE_OPERAND_CHECK): Use TREE_OPERAND_LENGTH instead of
	TREE_CODE_LENGTH.
	(TREE_OPERAND_CHECK_CODE): Likewise.
	(GIMPLE_STMT_OPERAND_CHECK): Likewise.
	(TREE_RTL_OPERAND_CHECK): Likewise.
	(tree_operand_check_failed): Make second parameter the whole tree
	instead of its code.  Fixed callers.
	(VL_EXP_CHECK): New.
	(TREE_OPERAND_LENGTH): New.
	(VL_EXP_OPERAND_LENGTH): New.
	(CALL_EXPR_FN): New.
	(CALL_EXPR_STATIC_CHAIN): New.
	(CALL_EXPR_ARGS): New.
	(CALL_EXPR_ARG): New.
	(call_expr_nargs): New.
	(CALL_EXPR_ARGP): New.
	(build_nt_call_list): Declare.
	(build_vl_exp_stat): Declare.
	(build_vl_exp): New.
	(build_call_list): Declare.
	(build_call_nary): Declare.
	(build_call_valist): Declare.
	(build_call_array): Declare.
	(call_expr_arg): Declare.
	(call_expr_argp): Declare.
	(call_expr_arglist): Declare.
	(fold_build_call_list): Declare.
	(fold_build_call_list_initializer): Declare.
	(fold_call_expr): Declare to replace fold_builtin.
	(fold_builtin_fputs): Update to agree with modified definition.
	(fold_builtin_strcpy): Likewise.
	(fold_builtin_strncpy): Likewise.
	(fold_builtin_memory_chk): Likewise.
	(fold_builtin_stxcpy_chk): Likewise.
	(fold_builtin_strncpy_chk): Likewise.
	(fold_builtin_next_arg): Likewise.
	(fold_build_call_expr): Declare.
	(fold_builtin_call_list): Declare.
	(fold_builtin_call_valist): Declare.
	(build_call_expr): Declare.
	(validate_arglist): Update to agree with modified definition.
	(tree_operand_length): New.
	(call_expr_arg_iterator): New.
	(init_call_expr_arg_iterator): New.
	(next_call_expr_arg): New.
	(first_call_expr_arg): New.
	(more_call_expr_args_p): New.
	(FOR_EACH_CALL_EXPR_ARG): New.

	* tree.c (tree_code_class_string): Add entries for tcc_vl_exp
	and tcc_gimple_stmt.
	(tree_code_size): Update documentation.  Use sizeof (tree) rather
	than sizeof (char *).
	(tree_size): Likewise.  Add case for tcc_vl_exp.
	(tree_node_structure): Add case for tcc_vl_exp.
	(contains_placeholder_p): Likewise.
	(substitute_in_expr): Likewise.
	(substitute_placeholder_in_expr): Likewise.
	(stabilize_reference_1): Likewise.
	(build3_stat): Remove logic for CALL_EXPRs.  Replace with assertion
	to diagnose breakage of this interface for constructing CALL_EXPRs.
	(build_nt): Add similar assertion here.
	(build_nt_call_list): New.
	(simple_cst_equal) <CALL_EXPR>: Rewrite to use new accessors.
	(iterative_hash_expr): Use TREE_OPERAND_LENGTH instead of
	TREE_CODE_LENGTH.
	(get_callee_fndecl): Use new CALL_EXPR accessors.
	(tree_operand_check_failed): Change parameters to pass entire node
	instead of its code, so that we can call TREE_OPERAND_LENGTH on it.
	(process_call_operands): New.
	(build_vl_exp_stat): New.
	(build_call_list): New.
	(build_call_nary): New.
	(build_call_valist): New.
	(build_call_array): New.
	(walk_tree): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH.
	(call_expr_arglist): New.

	* tree.def (CALL_EXPR): Change representation of CALL_EXPRs to use
	tcc_vl_exp instead of a fixed-size tcc_expression.

	* doc/c-tree.texi (CALL_EXPR): Document new representation and
	accessors for CALL_EXPRs.
	(AGGR_INIT_EXPR): Likewise.

2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
	    Brooks Moses  <brooks.moses@codesourcery.com>
	    Lee Millward  <lee.millward@codesourcery.com>

	* builtins.c (c_strlen): Return NULL_TREE instead of 0.
	(expand_builtin_nonlocal_goto): Change parameter to be entire
	CALL_EXPR instead of an arglist.  Use new CALL_EXPR accessors.
	(expand_builtin_prefetch): Likewise.
	(expand_builtin_classify_type): Likewise.
	(mathfn_built_in): Return NULL_TREE instead of 0.
	(expand_errno_check): Use new CALL_EXPR accessors.
	(expand_builtin_mathfn): Use new CALL_EXPR accessors and constructors.
	Return NULL_RTX instead of 0.
	(expand_builtin_mathfn_2): Likewise.
	(expand_builtin_mathfn_3): Likewise.
	(expand_builtin_interclass_mathfn): Likewise.
	(expand_builtin_sincos): Likewise.
	(expand_builtin_cexpi): Likewise.
	(expand_builtin_int_roundingfn): Likewise.
	(expand_builtin_int_roundingfn_2): Likewise.
	(expand_builtin_pow): Likewise.
	(expand_builtin_powi): Likewise.
	(expand_builtin_strlen): Pass entire CALL_EXPR as parameter instead
	of arglist, fixing callers appropriately.  Use new CALL_EXPR
	accessors and constructors.  Return NULL_RTX instead of 0.
	(expand_builtin_strstr): Likewise.
	(expand_builtin_strchr): Likewise.
	(expand_builtin_strrchr): Likewise.
	(expand_builtin_strpbrk): Likewise.
	(expand_builtin_memcpy): Likewise.
	(expand_builtin_mempcpy): Likewise.
	(expand_builtin_mempcpy_args): New.
	(expand_builtin_memmove): Similarly to expand_builtin_mempcpy.
	(expand_builtin_memmove_args): New.
	(expand_builtin_bcopy): Similarly to expand_builtin_mempcpy.
	(expand_movstr): Likewise.
	(expand_builtin_strcpy): Likewise.
	(expand_builtin_strcpy_args): New.
	(expand_builtin_stpcpy): Similarly to expand_builtin_strcpy.
	(expand_builtin_strncpy): Likewise.
	(expand_builtin_memset): Likewise.
	(expand_builtin_memset_args): New.
	(expand_builtin_bzero): Similarly to expand_builtin_memset.
	(expand_builtin_memcmp): Likewise.
	(expand_builtin_strcmp): Likewise.
	(expand_builtin_strncmp): Likewise.
	(expand_builtin_strcat): Likewise.
	(expand_builtin_strncat): Likewise.
	(expand_builtin_strspn): Likewise.
	(expand_builtin_strcspn): Likewise.
	(expand_builtin_args_info): Likewise.
	(expand_builtin_va_start): Likewise.
	(gimplify_va_arg_expr): Likewise.
	(expand_builtin_va_end): Likewise.
	(expand_builtin_va_copy): Likewise.
	(expand_builtin_frame_address): Likewise.
	(expand_builtin_alloca): Likewise.
	(expand_builtin_bswap): Likewise.
	(expand_builtin_unop): Likewise.
	(expand_builtin_fputs): Likewise.
	(expand_builtin_expect): Likewise.
	(expand_builtin_fabs): Likewise.
	(expand_builtin_copysign): Likewise.
	(expand_builtin_printf): Likewise.
	(expand_builtin_fprintf): Likewise.
	(expand_builtin_sprintf): Likewise.
	(expand_builtin_init_trampoline): Likewise.
	(expand_builtin_signbit): Likewise.
	(expand_builtin_fork_or_exec): Likewise.
	(expand_builtin_sync_operation): Likewise.
	(expand_builtin_compare_and_swap): Likewise.
	(expand_builtin_lock_test_and_set): Likewise.
	(expand_builtin_lock_release): Likewise.
	(expand_builtin): Likewise.
	(builtin_mathfn_code): Likewise.

	(fold_builtin_constant_p): Pass call arguments individually instead
	of as an arglist, fixing callers appropriately.  Use new CALL_EXPR
	accessors and constructors.  Return NULL_TREE instead of 0.
	(fold_builtin_expect): Likewise.
	(fold_builtin_classify_type): Likewise.
	(fold_builtin_strlen): Likewise.
	(fold_builtin_nan): Likewise.
	(integer_valued_real_p): Likewise.
	(fold_trunc_transparent_mathfn): Likewise.
	(fold_fixed_mathfn): Likewise.
	(fold_builtin_cabs): Likewise.
	(fold_builtin_sqrt): Likewise.
	(fold_builtin_cbrt): Likewise.
	(fold_builtin_cos): Likewise.
	(fold_builtin_cosh): Likewise.
	(fold_builtin_tan): Likewise.
	(fold_builtin_sincos): Likewise.
	(fold_builtin_cexp): Likewise.
	(fold_builtin_trunc): Likewise.
	(fold_builtin_floor): Likewise.
	(fold_builtin_ceil): Likewise.
	(fold_builtin_round): Likewise.
	(fold_builtin_int_roundingfn): Likewise.
	(fold_builtin_bitop): Likewise.
	(fold_builtin_bswap): Likewise.
	(fold_builtin_logarithm): Likewise.
	(fold_builtin_hypot): Likewise.
	(fold_builtin_pow): Likewise.
	(fold_builtin_powi): Likewise.
	(fold_builtin_exponent): Likewise.
	(fold_builtin_memset): Likewise.
	(fold_builtin_bzero): Likewise.
	(fold_builtin_memory_op): Likewise.
	(fold_builtin_bcopy): Deleted; call site changed to invoke
	fold_builtin_memory_op directly.
	(fold_builtin_strcpy): Similarly as for fold_builtin_memory_op.
	(fold_builtin_strncpy): Likewise.
	(fold_builtin_memcmp): Likewise.
	(fold_builtin_strcmp): Likewise.
	(fold_builtin_strncmp): Likewise.
	(fold_builtin_signbit): Likewise.
	(fold_builtin_copysign): Likewise.
	(fold_builtin_isascii): Likewise.
	(fold_builtin_toascii): Likewise.
	(fold_builtin_isdigit): Likewise.
	(fold_builtin_fabs): Likewise.
	(fold_builtin_abs): Likewise.
	(fold_builtin_fmin_fmax): Likewise.
	(fold_builtin_carg): Likewise.
	(fold_builtin_classify): Likewise.
	(fold_builtin_unordered_cmp): Likewise.

	(fold_builtin_0, fold_builtin_2, fold_builtin_3, fold_builtin_4):
	New functions split out from fold_builtin_1.
	(fold_builtin_n): New.
	(fold_builtin_varargs): New.
	(fold_builtin): Deleted.  Most callers changed to use fold_call_expr
	instead.
	(fold_call_expr): New.
	(build_function_call_expr): Rewrite to use new helper function.
	(fold_builtin_call_list): New.
	(build_call_expr): New.
	(fold_builtin_call_valist): New.
	(rewrite_call_expr): New.
	(validate_arg): New.
	(validate_arglist): Change parameter to be entire CALL_EXPR instead
	of an arglist.  Change return type to bool.  Use new CALL_EXPR
	accessors.

	(fold_builtin_strstr):  Pass call arguments individually instead
	of as an arglist, fixing callers appropriately.  Use new CALL_EXPR
	accessors and constructors.  Return NULL_TREE instead of 0.
	(fold_builtin_strchr): Likewise.
	(fold_builtin_strrchr): Likewise.
	(fold_builtin_strpbrk): Likewise.
	(fold_builtin_strcat): Likewise.
	(fold_builtin_strncat): Likewise.
	(fold_builtin_strspn): Likewise.
	(fold_builtin_strcspn): Likewise.
	(fold_builtin_fputs): Likewise.
	(fold_builtin_next_arg): Likewise.
	(fold_builtin_sprintf): Likewise.

	(expand_builtin_object_size): Use new CALL_EXPR accessors.  Use
	NULL_RTX instead of 0.
	(expand_builtin_memory_chk): Likewise.
	(maybe_emit_chk_warning): Likewise.
	(maybe_emit_sprintf_chk_warning): Likewise.

	(fold_builtin_object_size): Pass call arguments individually instead
	of as an arglist, fixing callers appropriately.  Use new CALL_EXPR
	accessors and constructors.  Return NULL_TREE instead of 0.
	(fold_builtin_memory_chk): Likewise.
	(fold_builtin_stxcpy_chk): Likewise.
	(fold_builtin_strncpy_chk): Likewise.
	(fold_builtin_strcat_chk): Likewise.
	(fold_builtin_strcat_chk): Likewise.
	(fold_builtin_strncat_chk): Likewise.
	(fold_builtin_sprintf_chk): Likewise.
	(fold_builtin_snprintf_chk): Likewise.
	(fold_builtin_printf): Likewise.
	(fold_builtin_vprintf): Likewise.

	* fold-const.c (negate_expr_p): Use new CALL_EXPR accessors and
	constructors.
	(operand_equal_p): Add separate tcc_vl_exp/CALL_EXPR case.
	(make_range): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH.
	(extract_muldiv_1): Add VL_EXP_CLASS_P case.
	(fold_mathfn_compare): Use new CALL_EXPR accessors and constructors.
	(fold_unary): Likewise.
	(fold_binary): Likewise.
	(fold_ternary): Remove CALL_EXPR case, since they are no longer
	ternary expressions.
	(fold): Add logic for tcc_vl_exp.
	(fold_checksum_tree):  Make it know about tcc_vl_exp.  Use
	TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH.
	(fold_build3_stat): Add assertion to flag broken interface for
	constructing CALL_EXPRs.
	(fold_build_call_list): New.
	(fold_build_call_list_initializer): New.
	(tree_expr_nonnegative_p): Use new CALL_EXPR accessors and
	constructors.
	(fold_strip_sign_ops): Likewise.

2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
	    Brooks Moses  <brooks.moses@codesourcery.com>
	    Lee Millward  <lee.millward@codesourcery.com>

	* tree-dump.c (dequeue_and_dump) <CALL_EXPR>: Use new CALL_EXPR
	accessors and dump arguments explicitly.

	* tree-pretty-print.c (do_niy): Use TREE_OPERAND_LENGTH instead of
	TREE_CODE_LENGTH.
	(dump_generic_node): Use new CALL_EXPR accessors and walk arguments
	explicitly.
	(print_call_name): Use new CALL_EXPR accessors.

	* print-tree.c (print_node): Add case tcc_vl_exp.  Print
	CALL_EXPR arguments explicitly instead of as a list.  Use
	TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH.

	* tree-vrp.c (stmt_interesting_for_vrp): Use new CALL_EXPR accessors.
	(vrp_visit_stmt): Likewise.

	* tree-ssa-loop-im.c (outermost_invariant_loop_expr):  Make it
	know about tcc_vl_exp.  Use TREE_OPERAND_LENGTH instead of
	TREE_CODE_LENGTH.
	(force_move_till_expr): Likewise.

	* targhooks.c (default_external_stack_protect_fail): Use
	build_call_expr instead of build_function_call_expr.
	(default_hidden_stack_protect_fail): Likewise.

	* tree-complex.c (expand_complex_libcall): Use build_call_expr to
	build the call.

	* cgraphbuild.c (build_cgraph_edges): Use new CALL_EXPR accessors
	and walk arguments explicitly.

	* tree-ssa-loop-niter.c (simplify_replace_tree): Use
	TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH.
	(expand_simple_operations): Likewise.
	(infer_loop_bounds_from_array): Use new CALL_EXPR accessors.

	* gengtype.c (adjust_field_tree_exp): Use TREE_OPERAND_LENGTH instead
	of TREE_CODE_LENGTH.
	(walk_type): Tweak walking of arrays not to blow up on CALL_EXPRs.

	* optabs.c (expand_widen_pattern-expr): Use TREE_OPERAND_LENGTH
	instead of TREE_CODE_LENGTH.

	* value_prof.c (tree_ic): Use new CALL_EXPR accessors.
	(tree_ic_transform): Likewise.
	(interesting_stringop_to_profile_p): Pass entire CALL_EXPR as
	parameter instead of arglist.  Fix callers.
	(tree_stringop_fixed_value): Use new CALL_EXPR accessors.
	(tree_stringops_transform): Likewise.
	(tree_indirect_call_to_profile): Likewise.
	(tree_stringops_values_to_profile): Likewise.

	* tree-tailcall.c (find_tail_calls): Use new CALL_EXPR iterator.
	(eliminate_tail_call): Likewise.

	* ipa-cp.c (ipcp_update_callgraph): Use new CALL_EXPR accessors.

	* tree-scalar-evolution.c (chrec_contains_symbols_defined_in_loop):
	Use TREE_OPERAND_LENGTH and generalize to handle any number of
	operands.
	(instantiate_parameters_1): Can't handle tcc_vl_exp here.

	* omp-low.c (build_omp_barrier): Use build_call_expr.
	(lower_rec_input_clauses): Likewise.
	(lower_reduction_clauses): Likewise.
	(expand_parallel_call): Likewise.
	(maybe_catch_exception): Likewise.
	(expand_omp_for_generic): Likewise.
	(expand_omp_for_static_nochunk): Likewise.
	(expand_omp_sections): Likewise.
	(lower_omp_single_simple): Likewise.
	(lower_omp_single_copy): Likewise.
	(lower_omp_master): Likewise.
	(lower_omp_ordered): Likewise.
	(lower_omp_critical): Likewise.

	* ipa-reference.c (check-call): Use new CALL_EXPR iterator.
	(scan_for_static_refs): Create tcc_vl_exp case for CALL_EXPR.

	* tree-gimple.c (is_gimple_call_addr): Fix doc.
	(recalculate_side_effects): Use TREE_OPERAND_LENGTH instead of
	TREE_CODE_LENGTH.  Add tcc_vl_exp case.

	* tree-chrec.c (chrec_contains_symbols): Use TREE_OPERAND_LENGTH
	and generalize to handle any number of operands.
	(chrec_contains_undetermined): Likewise.
	(tree_contains_chrecs): Likewise.
	(evolution_function_is_invariant_rec_p): Use TREE_OPERAND_LENGTH.

	* cgraphunit.c (update_call_expr): Use new CALL_EXPR accessors.

	* tree-ssa-ccp.c (ccp_fold): Use new CALL_EXPR accessors.  Use
	fold_call_expr instead of fold_builtin.
	(ccp_fold_builtin): Likewise.  Update calls into builtins.c to
	match declarations there.
	(fold_stmt): Use new CALL_EXPR constructor and accessors.  Doc
	updates.

	* tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Use
	TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH.

	* ipa-pure-const.c (check_call): Use new CALL_EXPR accessors.
	(scan_function): Add case tcc_vl_exp for CALL_EXPR.

	* tree-stdarg.c (execute_optimize_stdarg): Use new CALL_EXPR
	accessors.

	* tree-ssa-math-opts.c (execute_cse_sincos_1): Use build_call_expr.
	(execute_cse_sincos): Use new CALL_EXPR accessors.

	* tree-ssa-alias.c (find_used_portions): Use new CALL_EXPR iterator.

	* gimple-low.c (lower_function_body): Use build_call_expr.
	(lower_builtin_setjmp): Likewise.

	* expr.c (emit_block_move_via_libcall): Use build_call_expr.
	(set_storage_via_libcall): Likewise.
	(safe_from_p): Add tcc_vl_exp case.  Use TREE_OPERAND_LENGTH
	instead of TREE_CODE_LENGTH.
	(expand_expr_real_1): Use new CALL_EXPR accessors.

	* tree-browser.c (store_child_info): Use TREE_OPERAND_LENGTH and
	generalize to handle any number of operands.
	(TB_parent_eq): Likewise.

	* predict.c (expr_expected_value): Use new CALL_EXPR accessors.
	(strip_builtin_expect): Likewise.

	* function.c (gimplify_parameters): Use build_call_expr.

	* tree-vectorizer.c (vect_is_simple_reduction): Use TREE_OPERAND_LENGTH
	instead of TREE_CODE_LENGTH.

	* ipa-type-escape.c (check_call): Use new CALL_EXPR iterators.
	(scan_for_refs): Add case tcc_vl_exp for CALL_EXPR.

	* tree-data-ref.c (get_references_in_stmt): Use new CALL_EXPR
	iterators.

	* gimplify.c (build_stack_save_restore): Use build_call_expr.
	(gimplify_decl_expr): Likewise.
	(gimplify_call_expr): Use fold_call_expr instead of fold_builtin.
	Use new CALL_EXPR iterators.
	(gimplify_modify_expr_to_memcpy): Use build_call_expr.
	(gimplify_modify_expr_to_memset): Likewise.
	(gimplify_variable_sized_compare): Likewise.
	(gimplify_omp_atomic_fetch_op): Likewise.
	(gimplify_omp_atomic_pipeline): Likewise.
	(gimplify_omp_atomic_mutex): Likewise.
	(gimplify_function_tree): Likewise.

	* calls.c (alloca_call_p): Use new CALL_EXPR accessors.
	(call_expr_flags): Likewise.
	(expand_call): Likewise.

	* except.c (expand_builtin_eh_return_data_regno): Pass entire
	CALL_EXPR as parameter instead of arglist.  Use new CALL_EXPR 
        accessors.

	* coverage.c (create_coverage): Use build_call_expr.

	* tree-ssa-pre.c (expression_node_pool, list_node_pool): Delete.
	(temp_call_expr_obstack): New.
	(pool_copy_list): Delete.
	(temp_copy_call_expr): New.
	(phi_translate): Add case tcc_vl_exp for CALL_EXPR.  Use new
	CALL_EXPR accessors.  Get rid of special goo for copying argument
	lists and use temp_copy_call_expr instead.
	(valid_in_sets): Add case tcc_vl_exp for CALL_EXPR.  Use new
	CALL_EXPR accessors.
	(create_expression_by_pieces): Likewise.  Use build_call_array
	to construct the result instead of fold_build3.
	(create_value_expr_from): Add tcc_vl_exp.  Delete special goo for
	dealing with argument lists.
	(init_pre): Remove references to expression_node_pool and
	list_node_pool.  Init temp_call_expr_obstack instead.
	(fini_pre): Remove references to expression_node_pool and
	list_node_pool.

	* tree-sra.c (sra_walk_call_expr): Use new CALL_EXPR accessors
	and walk arguments explicitly instead of as a list.

	* tree-mudflap.c (mf_build_check_statement_for): Use build_call_expr.
	(mx_register_decls): Likewise.
	(mudflap_register_call): Likewise.
	(mudflap_finish_file): Likewise.

	* ipa-prop.c (ipa_callsite_compute_count): Use new CALL_EXPR accessors.
	(ipa_callsite_compute_param): Likewise.

	* tree-vect-patterns.c (vect_recog_pow_pattern): Use new CALL_EXPR
	accessors and constructor.

	* tree-nested.c (convert_nl_goto_reference): Use new CALL_EXPR
	accessors and constructor.
	(convert_tramp_reference): Likewise. 
	(convert_call_expr): Likewise.
	(finalize_nesting_tree_1): Likewise.

	* tree-ssa.c (tree_ssa_useless_type_conversion): Use new CALL_EXPR
	accessors.

	* tree-ssa-loop-prefetch.c (issue_prefetch_ref): Use build_call_expr.

	* tree-inline.c (initialize_inlined_parameters): Pass entire
	CALL_EXPR as parameter instead of arglist.  Use new CALL_EXPR
	accessors.
	(estimate_num_insns_1): Use new CALL_EXPR accessors.
	(expand_call_inline): Tidy up call to initialize_inlined_parameters.

	* tree-vect-transform.c (vect_create_epilog_for_reduction):  Use
	TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH.
	(vectorizable_reduction): Likewise.
	(vectorizable_call): Use new CALL_EXPR iterators.
	(vectorizable_conversion): Use build_call_expr.
	(vectorizable_operation): Use TREE_OPERAND_LENGTH.
	(vect_gen_widened_results_half): Use build_call_expr.
	(vect_setup_realignment): Likewise.
	(vectorizable_live_operation): Use TREE_OPERAND_LENGTH.

	* tree-object-size.c (alloc_object_size): Use new CALL_EXPR accessors.
	(pass_through_call): Likewise.
	(compute_object_sizes): Likewise.  Use fold_call_expr instead of
	fold_builtin.

	* tree-profile.c (tree_gen_interval_profiler): Use build_call_expr.
	(tree_gen_pow2_profiler): Likewise.
	(tree_gen_one_value_profiler): Likewise.
	(tree_gen_ic_func_profiler): Likewise.
	(tree_gen_average_profiler): Likewise.
	(tree_gen_ior_profiler): Likewise.

	* tree-ssa-structalias.c (get_constraint_for): Add case tcc_vl_exp.
	(find_func_aliases): Use new CALL_EXPR accessors.  Add case
	tcc_vl_exp.  Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH.

	* tree-ssa-reassoc.c (get_rank): Use TREE_OPERAND_LENGTH instead
	of TREE_CODE_LENGTH.

	* stmt.c (warn_if_unused_value): Use TREE_OPERAND_LENGTH instead
	of TREE_CODE_LENGTH.

	* convert.c (convert_to_real): Use new CALL_EXPR accessors and
	constructor.
	(convert_to_integer): Likewise.

	* tree-ssa-operands.c (get_call_expr_operands): Use new CALL_EXPR
	accessors.

2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
	    Brooks Moses  <brooks.moses@codesourcery.com>
	    Lee Millward  <lee.millward@codesourcery.com>

	* config/alpha/alpha.c (alpha_expand_builtin): Use new CALL_EXPR
	accessors.
	* config/frv/frv.c (frv_expand_builtin): Likewise.
	* config/s390/s390.c (s390_expand_builtin): Likewise.

	* config/sparc/sparc.c (sparc_gimplify_va_arg): Use build_call_expr.
	(sparc_expand_builtin): Use new CALL_EXPR accessors.

	* config/i386/i386.c (ix86_function_ok_for_sibcall): Likewise.
	(ix86_expand_binop_builtin): Pass entire CALL_EXPR as parameter
	instead of arglist.  Use new CALL_EXPR accessors on it.  Fix callers.
	(ix86_expand_store_builtin): Likewise.
	(ix86_expand_unop_builtin): Likewise.
	(ix86_expand_unop1_builtin): Likewise.
	(ix86_expand_sse_compare): Likewise.
	(ix86_expand_sse_comi): Likewise.
	(ix86_expand_vec_init_builtin): Likewise.
	(ix86_expand_vec_ext_builtin): Likewise.
	(ix86_expand_vec_set_builtin): Likewise.
	(ix86_expand_builtin): Use new CALL_EXPR accessors.

	* config/sh/sh.c (sh_expand_builtin): Use new CALL_EXPR accessors.
	* config/c4x/c4x.c (c4x_expand_builtin): Likewise.

	* config/iq2000/iq2000.c (expand_one_builtin): Pass entire CALL_EXPR
	instead of arglist.  Use new CALL_EXPR accessors.  Fix callers.
	(iq2000_expand_builtin): Use new CALL_EXPR accessors.

	* config/rs6000/rs6000-c.c (altivec_build_resolved_builtin): Use
	build_call_expr.
	* config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Likewise.
	(rs6000_expand_unop_builtin): Pass entire CALL_EXPR instead of
	arglist.  Use new CALL_EXPR accessors.  Fix callers.
	(altivec_expand_abs_builtin): Likewise.
	(rs6000_expand_binop_builtin): Likewise.
	(altivec_expand_predicate_builtin): Likewise.
	(altivec_expand_lv_builtin): Likewise.
	(spe_expand_stv_builtin): Likewise.
	(altivec_expand_stv_builtin): Likewise.
	(rs6000_expand_ternop_builtin): Likewise.
	(altivec_expand_ld_builtin): Use new CALL_EXPR accessors.
	(altivec_expand_st_builtin): Likewise.
	(altivec_expand_dst_builtin): Likewise.
	(altivec_expand_vec_init_builtin): Pass entire CALL_EXPR instead of
	arglist.  Use new CALL_EXPR accessors.  Fix callers.
	(altivec_expand_vec_set_builtin): Likewise.
	(altivec_expand_vec_ext_builtin): Likewise.
	(altivec_expand_builtin): Use new CALL_EXPR accessors.
	(spe_expand_builtin): Likewise.
	(spe_expand_predicate_builtin): Pass entire CALL_EXPR instead of
	arglist.  Use new CALL_EXPR accessors.  Fix callers.
	(spe_expand_evsel_builtin): Likewise.
	(rs6000_expand_builtin): Use new CALL_EXPR accessors.  VCFUX and
	FCFSX cases must construct whole new CALL_EXPR, not just arglist.

	* config/arm/arm.c (arm_expand_binop_builtin): Pass entire CALL_EXPR
	instead of arglist.  Use new CALL_EXPR accessors.  Fix callers.
	(arm_expand_unop_builtin): Likewise.
	(arm_expand_builtin): Use new CALL_EXPR accessors.

	* config/mips/mips.c (mips_expand_builtin):  Use new CALL_EXPR
	accessors.

	* config/bfin/bfin.c (bfin_expand_binop_builtin): Pass entire CALL_EXPR
	instead of arglist.  Use new CALL_EXPR accessors.  Fix callers.
	(bfin_expand_unop_builtin): Likewise.
	(bfin_expand_builtin): Use new CALL_EXPR accessors.

2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
	    Brooks Moses  <brooks.moses@codesourcery.com>
	    Lee Millward  <lee.millward@codesourcery.com>

	* c-semantics.c (build_stmt): Add internal diagnostic check.

	* c-pretty-print.c (pp_c_postfix_expression): Use new CALL_EXPR
	accessors.  Print arguments explicitly instead of as a list.

	* c-typeck.c (build_function_call): Use new CALL_EXPR constructors.

	* c-omp.c (c_finish_omp_barrier): Use build_call_expr.
	(c_finish_omp_flish): Likewise.

	* c-common.c (verify_tree): Use new CALL_EXPR accessors.  Traverse
	arguments explicitly instead of as a list.  Use TREE_OPERAND_LENGTH
	instead of TREE_CODE_LENGTH.
	(check_function_arguments_recurse): Use new CALL_EXPR accessors.
	(c_warn_unused_result): Likewise.

2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
	    Brooks Moses  <brooks.moses@codesourcery.com>
	    Lee Millward  <lee.millward@codesourcery.com>

	* cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
	Change class to tcc_vl_exp.

	* call.c (build_call): Use build_call_list instead 
	of build3. 
	(build_over_call): Likewise.
	(build_new_method_call): Use build_min_non_dep_call_list 
	instead of build_min_non_dep.

	* error.c (dump_call_expr_args): New function.
	(dump_aggr_init_expr_args): New function.
	(dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them. 
	Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.

	* cvt.c (convert_to_void): Use build_call_array instead
	of build3; use new AGGR_INIT_EXPR accessor macros.

	* mangle.c (write_expression): Use TREE_OPERAND_LENGTH
	instead of TREE_CODE_LENGTH.

	* dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
	AGGR_INIT_EXPR accessor macros.

	* cp-gimplify.c (cp_gimplify_init_expr): Use 
	AGGR_INIT_EXPR_SLOT to set the slot operand.

	* cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
	(AGGR_INIT_EXPR_SLOT): New macro.
	(AGGR_INIT_EXPR_ARG): New macro.
	(aggr_init_expr_nargs): New macro.
	(AGGR_INIT_EXPR_ARGP): New macro.
	(aggr_init_expr_arg_iterator): New.
	(init_aggr_init_expr_arg_iterator): New.
	(next_aggr_init_expr_arg): New.
	(first_aggr_init_expr_arg): New.
	(more_aggr_init_expr_args_p): New.
	(FOR_EACH_AGGR_INIT_EXPR_ARG): New.
	(stabilize_aggr_init): New declaration.
	(build_min_non_dep_call_list): Likewise.

	* tree.c (process_aggr_init_operands): New function.
	(build_aggr_init_array) New function.
	(build_cplus_new): Update to use new CALL_EXPR and
	AGGR_INIT_EXPR accessor macros. Replace use of build3 with
	build_aggr_init_array.
	(build_min_non_dep_call_list) New function.
	(build_min_nt): Assert input code parameter is not a variable
	length expression class.
	(build_min, build_min_non_dep): Likewise.
	(cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
	to check for equality instead of recursing. Handle tcc_vl_exp
	tree code classes.
	(stabilize_call): Update to only handle CALL_EXPRs, not 
	AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
	(stabilize_aggr_init): New function.
	(stabilize_init): Use it.

	* cxx-pretty-print.c (pp_cxx_postfix_expression)
	<AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
	AGGR_INIT_EXPR accessor macros and argument iterators.
	
	* pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
	build_vl_exp. Iterate through the operands, recursively 
	processing each one.
	(tsubst_copy_and_build) <CALL_EXPR>: Update to use new
	CALL_EXPR accessor macros.
	(value_dependent_expression_p) <default>: Handle tcc_vl_exp
	tree code classes. Use TREE_OPERAND_LENGTH instead of 
	TREE_CODE_LENGTH.

	* semantics.c (finish_call_expr): Use build_nt_call_list
	instead of build_nt.
	(simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR 
	accessor macros. Use build_call_array to construct the 
	CALL_EXPR node instead of build3
	
	* decl2.c (build_offset_ref_call_from_tree): Use 
	build_nt_call_list and build_min_non_dep_call_list instead
	of build_min_nt and build_min_non_dep.

	* parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
	Use build_nt_call_list instead of build_min_nt.

2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
	    Brooks Moses  <brooks.moses@codesourcery.com>
	    Lee Millward  <lee.millward@codesourcery.com>

	* java-tree.h (BUILD_MONITOR_ENTER): Use build_call_nary instead
	of build3.
	(BUILD_MONITOR_EXIT): Likewise.

	* java-gimplify.c (java_gimplify_component_ref): Use build_call_expr.
	(java_gimplify_modify_expr): Likewise.

	* class.c (cache_this_class_ref): Use build_call_expr.
	(build_static_field_ref): Likewise.
	(emit_indirect_register_classes): Likewise.
	(emit_register_classes): Likewise.

	* resource.c (write_resource_constructor): Use build_call_expr.

	* builtins.c (builtin_creator_function): Change interpretation of
	the second parameter to be the whole CALL_EXPR instead of the arglist.
	(max_builtin): Tweak parameter list.  Use new CALL_EXPR accessors.
	(min_builtin): Likewise.
	(abs_builtin): Likewise.
	(java_build_function_call_expr): Likewise.
	(convert_real): Likewise.
	(UNMARSHAL3): Likewise.
	(UNMARSHAL4): Likewise.
	(UNMARSHAL5): Likewise.
	(build_arglist_for_builtin): Delete.  Fix callers to use
	build_call_expr instead.
	(putObject_builtin): Tweak parameter list.  Use new CALL_EXPR
	accessors.
	(compareAndSwapInt_builtin): Likewise.
	(compareAndSwapLong_builtin): Likewise.
	(compareAndSwapObject_builtin): Likewise.
	(putVolatile_builtin): Likewise.
	(getVolatile_builtin): Likewise.
	(VMSupportsCS8_builtin): Likewise.
	(check_for_builtin): Pass entire CALL_EXPR to builtin expander
	instead of arglist.

	* expr.c (build_java_athrow): Use build_call_nary instead of build3.
	(build_java_throw_out_of_bounds_exception): Likewise.
	(java_check_reference): Likewise.
	(build_java_arraystore_check): Likewise.
	(build_newarray): Likewise.
	(build_anewarray): Likewise.
	(expand_java_multinewarray): Use build_call_list instead of build3.
	(build_java_monitor): Use build_call_nary instead of build3.
	(java_create_object): Likewise.
	(expand_java_NEW): Likewise.
	(build_instanceof): Likewise.
	(expand_java_CHECKCAST): Likewise.
	(build_java_soft_divmod): Likewise.
	(build_java_binop): Likewise.
	(build_field_ref): Likewise.
	(build_class_init): Likewise.
	(rewrite_arglist_getcaller): Use build_call_expr.
	(build_invokeinterface):  Use build_call_nary instead of build3.
	(expand_invoke): Use build_call_list instead of build3.
	(build_jni_stub): Use build_call_nary, build_call_list, or
	build_call_expr instead	of build3.
	(expand_java_field_op): Use build_call_expr instead of build3.
	(force_evaluation_order): Use new CALL_EXPR accessors.

	* lang.c (java_get_callee_fndecl): Use new CALL_EXPR accessors.

2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
	    Brooks Moses  <brooks.moses@codesourcery.com>
	    Lee Millward  <lee.millward@codesourcery.com>

	* objc-act.c (receiver_is_class_object): Use new CALL_EXPR accessors.
	(objc_get_callee_fndecl): Likewise.

2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
	    Brooks Moses  <brooks.moses@codesourcery.com>
	    Lee Millward  <lee.millward@codesourcery.com>

	* trans-expr.c (gfc_conv_power_op): Use build_call_expr.
	(gfc_conv_string_tmp): Likewise.
	(gfc_conv_concat_op): Likewise.
	(gfc_build_compare_string): Likewise.
	(gfc_conv_function_call): Use build_call_list instead of build3.

	* trans-array.c (gfc_trans_allocate_array_storage): Use
	build_call_expr.
	(gfc_grow_array): Likewise.
	(gfc_trans_array_ctor_element): Likewise.
	(gfc_trans_array_constructor_value): Likewise.
	(gfc_array_allocate): Likewise.
	(gfc_array_deallocate): Likewise.
	(gfc_trans_auto_array_allocation): Likewise.
	(gfc_trans_dummy_array_bias): Likewise.
	(gfc_conv_array_parameter): Likewise.
	(gfc_trans_dealloc_allocated): Likewise.
	(gfc_duplicate_allocatable): Likewise.

	* trans-openmp.c (gfc_trans_omp_barrier): Use build_call_expr.
	(gfc_trans_omp_flush): Likewise.

	* trans-stmt.c (gfc_conv_elementel_dependencies): Use build_call_expr.
	(gfc_trans_pause): Likewise.
	(gfc_trans_stop): Likewise.
	(gfc_trans_character_select): Likewise.
	(gfc_do_allocate): Likewise.
	(gfc_trans_assign_need_temp): Likewise.
	(gfc_trans_pointer_assign_need_temp): Likewise.
	(gfc_trans_forall_1): Likewise.
	(gfc_trans_where_2): Likewise.
	(gfc_trans_allocate): Likewise.
	(gfc_trans_deallocate): Likewise.

	* trans.c (gfc_trans_runtime_check): Use build_call_expr.

	* trans-io.c (gfc_trans_open): Use build_call_expr.
	(gfc_trans_close): Likewise.
	(build_filepos): Likewise.
	(gfc_trans_inquire): Likewise.
	(NML_FIRST_ARG): Delete.
	(NML_ADD_ARG): Delete.
	(transfer_namelist_element): Use build_call_expr.
	(build_dt): Likewise.
	(gfc_trans_dt_end): Likewise.
	(transfer_expr): Likewise.
	(transfer_array-desc): Likewise.

	* trans-decl.c (gfc_generate_function_code): Use build_call_expr.
	(gfc_generate_constructors): Likewise.

	* trans-intrinsic.c (gfc_conv_intrinsic_ctime): Use build_call_expr.
	(gfc_conv_intrinsic_fdate): Likewise.
	(gfc_conv_intrinsic_ttynam): Likewise.
	(gfc_conv_intrinsic_array_transfer): Likewise.
	(gfc_conv_associated): Likewise.
	(gfc_conv_intrinsic_si_kind): Likewise.
	(gfc_conv_intrinsic_trim): Likewise.
	(gfc_conv_intrinsic_repeat: Likewise.
	(gfc_conv_intrinsic_iargc): Likewise.

Co-Authored-By: Brooks Moses <brooks.moses@codesourcery.com>
Co-Authored-By: Lee Millward <lee.millward@codesourcery.com>

From-SVN: r122018
2007-02-15 18:50:49 -05:00
Roger Sayle 62e5bf5d42 alias.c (init_alias_analysis): Correct whitespace.
* alias.c (init_alias_analysis): Correct whitespace.
	* bb-reorder.c (fix_edges_for_rarely_executed_code,
	partition_hot_cold_basic_blocks): Likewise.
	* builtins.c (expand_builtin_printf, expand_builtin_fprintf,
	expand_builtin_sprintf, fold_builtin_carg, fold_builtin_sprintf,
	maybe_emit_sprintf_chk_warning, fold_builtin_sprintf_chk,
	fold_builtin_snprintf_chk, fold_builtin_printf,
	fold_builtin_fprintf, do_mpfr_ckconv, do_mpfr_arg1, do_mpfr_arg2,
	do_mpfr_arg3, do_mpfr_sincos): Likewise.
	* cfgcleanup.c (cleanup_cfg): Likewise.
	* cfgexpand.c (tree_expand_cfg): Likewise.
	* fold-const.c (fold_binary) <RDIV_EXPR>: Likewise.
	* function.c (get_next_funcdef_no): Likewise.
	* gengtype.c (main): Likewise.
	* genmodes.c (main): Likewise.
	* gcse.c (bypass_conditional_jumps, print_ldst_list): Likewise.
	* haifa-sched.c (schedule_block, extend_h_i_d): Likewise.
	* ifcvt.c (noce_emit_move_insn): Likewise.
	* modulo-sched.c (generate_prolog_epilog, sms_schedule_by_order):
	Likewise.
	* stor-layout.c (get_best_mode): Likewise.
	* tree-ssa-loop-niter.c (get_val_for): Likewise.
	* tree-ssa-structalias.c (get_varinfo, get_varinfo_fc,
	scc_visit, do_ds_constraint, do_complex_constraint, label_visit,
	perform_var_substitution, solve_graph): Likewise.
	* tree-vrp.c (vrp_finalize): Likewise.

From-SVN: r121470
2007-02-01 20:32:20 +00:00
Basile Starynkevitch 8d6419b217 gty.texi (Options): Document the mark_hook option to GTY.
2007-01-19  Basile Starynkevitch  <basile@starynkevitch.net>

	* gcc/doc/gty.texi (Options): Document the mark_hook option to
	GTY.
	* gcc/gengtype.c (write_types_data, write_func_for_structure,
	write_types, ggc_wtd, pch_wtd): Added skip_hooks to
	write_types_data, ggc_wtd, pch_wtd for mark_hook.
	(walk_type, write_func_for_structure): Generate the mark_hook if
	needed.

	* MAINTAINERS: added myself (Basile Starynkevitch) to write after
	approval.

From-SVN: r120973
2007-01-19 17:56:18 +00:00
Steven Bosscher aeceeb06a1 cfgcleanup.c (cleanup_cfg): Detect cfglayout mode and set the CLEANUP_CFGLAYOUT flag when in cfglayout mode.
* cfgcleanup.c (cleanup_cfg): Detect cfglayout mode and set
	the CLEANUP_CFGLAYOUT flag when in cfglayout mode.

	* Makefile.c (GTFILES): Add cfglayout.h.
	* gengtype.c (open_base_files): Likewise.
	* cfglayout.c (cfg_layout_function_footer,
	cfg_layout_function_header) Reindent to make gengtype happy.
	* cfglayout.h (cfg_layout_function_footer,
	cfg_layout_function_header): Add GTY(()) marker.

	* ifcvt.c (noce_try_sign_mask): Make sure INSN_B is non-null.

From-SVN: r120893
2007-01-18 08:17:06 +00:00
Zack Weinberg 5932ca9d11 gengtype.c (process_gc_options): Remove unnecessary forward decl.
* gengtype.c (process_gc_options): Remove unnecessary forward decl.
	Add another out parameter, "skip".
	(set_gc_used_type): Adjust calls to process_gc_options.  If a field
	is tagged "skip", do not mark its type used.

From-SVN: r119034
2006-11-21 00:16:45 +00:00
Jan Hubicka ef950eba66 extended.texi (__builtin_expect): We no longer require second argument to be constant.
* extended.texi (__builtin_expect): We no longer require second argument
	to be constant.
	* gengtype.c (adjust_field_rtx_def): Drop NOTE_INSN_EXPECTED_VALUE.
	* builtins.c (expand_builtin_expect): Simplify.
	(expand_builtin_expect_jump): Kill.
	* final.c (final_scan_insn): Do not skip the removed notes.
	* insn-notes.def (LOOP_BEG, LOOP_END, REPEATED_LINE_NUMBER,
	EXPECTED_VALUE): Remove.
	* dojump.c (do_jump): Do not care about __builtin_expect.
	* predict.c (expected_value_to_br_prob): Kill.
	* function.c (expand_function_end): Do not expand
	NOTE_INSN_REPEATED_LINE_NUMBER.
	* print-rtl.c (print_rtx): Do not pretty print the removed notes.
	* expect.c (sjlj_emit_function_enter): Emit directly branch probability.
	* cfgexpand.c (add_reg_br_prob_note): Export.
	* cfgcleanup.c (rest_of_handle_jump2): Do not call
	expected_value_to_br_prob.
	* cfglayout.c (duplicate_insn_chain): Do not deal with removed notes.
	* rtl.h (add_reg_br_prob_note): Declare.

From-SVN: r118696
2006-11-11 16:54:57 +00:00
Richard Sandiford 3fa9c136c3 tm.texi: Refer to SYMBOL_REF_HAS_BLOCK_INFO_P instead of SYMBOL_REF_IN_BLOCK_P.
* doc/tm.texi: Refer to SYMBOL_REF_HAS_BLOCK_INFO_P instead of
	SYMBOL_REF_IN_BLOCK_P.
	* doc/rtl.texi: Likewise.  Refer to SYMBOL_FLAG_HAS_BLOCK_INFO instead
	of SYMBOL_FLAG_IN_BLOCK.
	* gengtype.c (adjust_field_rtx_def): Use SYMBOL_REF_HAS_BLOCK_INFO_P
	instead of SYMBOL_REF_IN_BLOCK_P.
	* explow.c (use_anchored_address): Likewise.
	* rtl.c (rtx_size): Likewise.
	* varasm.c (create_block_symbol): Set SYMBOL_FLAG_HAS_BLOCK_INFO
	instead of SYMBOL_FLAG_IN_BLOCK.
	(make_decl_rtl): Use SYMBOL_REF_HAS_BLOCK_INFO_P instead of
	SYMBOL_REF_IN_BLOCK_P.
	(assemble_variable): Likewise.
	(output_constant_def_contents): Likewise.
	(output_constant_pool): Likewise.
	(default_encode_section_info): Preserve SYMBOL_FLAG_HAS_BLOCK_INFO
	instead of SYMBOL_FLAG_IN_BLOCK.
	* rtl.h (block_symbol): Refer to SYMBOL_REF_HAS_BLOCK_INFO_P instead of
	SYMBOL_REF_IN_BLOCK_P.
	(SYMBOL_REF_BLOCK): Likewise.
	(SYMBOL_REF_OFFSET): Likewise.
	(BLOCK_SYMBOL_CHECK): Use SYMBOL_REF_HAS_BLOCK_INFO_P instead of
	SYMBOL_REF_IN_BLOCK_P.
	(SYMBOL_FLAG_IN_BLOCK): Replace with...
	(SYMBOL_FLAG_HAS_BLOCK_INFO): ...this.
	(SYMBOL_REF_IN_BLOCK_P): Replace with...
	(SYMBOL_REF_HAS_BLOCK_INFO_P): ...this.

From-SVN: r111675
2006-03-03 09:11:58 +00:00
Zdenek Dvorak f82783bdda gengtype.c (main): Handle double_int type.
* gengtype.c (main): Handle double_int type.
	* tree.h (struct tree_int_cst): Make type of int_cst double_int.
	* double-int.c: New file.
	* double-int.h: New file.
	* system.h: Include doubleint.h.
	* Makefile.in (SYSTEM_H): Include double-int.h.
	(double-int.o): Add.

From-SVN: r111663
2006-03-03 00:38:20 +00:00
Richard Sandiford aacd3885eb re PR target/9703 ([arm] Accessing data through constant pool more times could be solved in less instructions)
* cselib.c (cselib_init): Change RTX_SIZE to RTX_CODE_SIZE.
	* emit-rtl.c (copy_rtx_if_shared_1): Use shallow_copy_rtx.
	(copy_insn_1): Likewise.  Don't copy each field individually.
	Reindent.
	* read-rtl.c (apply_macro_to_rtx): Use RTX_CODE_SIZE instead
	of RTX_SIZE.
	* reload1.c (eliminate_regs): Use shallow_copy_rtx.
	* rtl.c (rtx_size): Rename variable to...
	(rtx_code_size): ...this.
	(rtx_size): New function.
	(rtx_alloc_stat): Use RTX_CODE_SIZE instead of RTX_SIZE.
	(copy_rtx): Use shallow_copy_rtx.  Don't copy each field individually.
	Reindent.
	(shallow_copy_rtx_stat): Use rtx_size instead of RTX_SIZE.
	* rtl.h (rtx_code_size): New variable.
	(rtx_size): Change from a variable to a function.
	(RTX_SIZE): Rename to...
	(RTX_CODE_SIZE): ...this.

	PR target/9703
	PR tree-optimization/17106
	* doc/tm.texi (TARGET_USE_BLOCKS_FOR_CONSTANT_P): Document.
	(Anchored Addresses): New section.
	* doc/invoke.texi (-fsection-anchors): Document.
	* doc/rtl.texi (SYMBOL_REF_IN_BLOCK_P, SYMBOL_FLAG_IN_BLOCK): Likewise.
	(SYMBOL_REF_ANCHOR_P, SYMBOL_FLAG_ANCHOR): Likewise.
	(SYMBOL_REF_BLOCK, SYMBOL_REF_BLOCK_OFFSET): Likewise.
	* hooks.c (hook_bool_mode_rtx_false): New function.
	* hooks.h (hook_bool_mode_rtx_false): Declare.
	* gengtype.c (create_optional_field): New function.
	(adjust_field_rtx_def): Add the "block_sym" field for SYMBOL_REFs when
	SYMBOL_REF_IN_BLOCK_P is true.
	* target.h (output_anchor, use_blocks_for_constant_p): New hooks.
	(min_anchor_offset, max_anchor_offset): Likewise.
	(use_anchors_for_symbol_p): New hook.
	* toplev.c (compile_file): Call output_object_blocks.
	(target_supports_section_anchors_p): New function.
	(process_options): Check that -fsection-anchors is only used on
	targets that support it and when -funit-at-a-time is in effect.
	* tree-ssa-loop-ivopts.c (prepare_decl_rtl): Only create DECL_RTL
	if the decl doesn't have one.
	* dwarf2out.c: Remove instantiations of VEC(rtx,gc).
	* expr.c (emit_move_multi_word, emit_move_insn): Pass the result
	of force_const_mem through use_anchored_address.
	(expand_expr_constant): New function.
	(expand_expr_addr_expr_1): Call it.  Use the same modifier when
	calling expand_expr for INDIRECT_REF.
	(expand_expr_real_1): Pass DECL_RTL through use_anchored_address
	for all modifiers except EXPAND_INITIALIZER.  Use expand_expr_constant.
	* expr.h (use_anchored_address): Declare.
	* loop-unroll.c: Don't declare rtx vectors here.
	* explow.c: Include output.h.
	(validize_mem): Call use_anchored_address.
	(use_anchored_address): New function.
	* common.opt (-fsection-anchors): New switch.
	* varasm.c (object_block_htab, anchor_labelno): New variables.
	(hash_section, object_block_entry_eq, object_block_entry_hash)
	(use_object_blocks_p, get_block_for_section, create_block_symbol)
	(use_blocks_for_decl_p, change_symbol_section): New functions.
	(get_variable_section): New function, split out from assemble_variable.
	(make_decl_rtl): Create a block symbol if use_object_blocks_p and
	use_blocks_for_decl_p say so.  Use change_symbol_section if the
	symbol has already been created.
	(assemble_variable_contents): New function, split out from...
	(assemble_variable): ...here.  Don't output any code for
	block symbols; just pass them to place_block_symbol.
	Use get_variable_section and assemble_variable_contents.
	(get_constant_alignment, get_constant_section, get_constant_size): New
	functions, split from output_constant_def_contents.
	(build_constant_desc): Create a block symbol if use_object_blocks_p
	says so.  Or into SYMBOL_REF_FLAGS.
	(assemble_constant_contents): New function, split from...
	(output_constant_def_contents): ...here.  Don't output any code
	for block symbols; just pass them to place_section_symbol.
	Use get_constant_section and get_constant_alignment.
	(force_const_mem): Create a block symbol if use_object_blocks_p and
	use_blocks_for_constant_p say so.  Or into SYMBOL_REF_FLAGS.
	(output_constant_pool_1): Add an explicit alignment argument.
	Don't switch sections here.
	(output_constant_pool): Adjust call to output_constant_pool_1.
	Switch sections here instead.  Don't output anything for block symbols;
	just pass them to place_block_symbol.
	(init_varasm_once): Initialize object_block_htab.
	(default_encode_section_info): Keep the old SYMBOL_FLAG_IN_BLOCK.
	(default_asm_output_anchor, default_use_aenchors_for_symbol_p)
	(place_block_symbol, get_section_anchor, output_object_block)
	(output_object_block_htab, output_object_blocks): New functions.
	* target-def.h (TARGET_ASM_OUTPUT_ANCHOR): New macro.
	(TARGET_ASM_OUT): Include it.
	(TARGET_USE_BLOCKS_FOR_CONSTANT_P): New macro.
	(TARGET_MIN_ANCHOR_OFFSET, TARGET_MAX_ANCHOR_OFFSET): New macros.
	(TARGET_USE_ANCHORS_FOR_SYMBOL_P): New macro.
	(TARGET_INITIALIZER): Include them.
	* rtl.c (rtl_check_failed_block_symbol): New function.
	* rtl.h: Include vec.h.  Declare heap and gc rtx vectors.
	(block_symbol, object_block): New structures.
	(rtx_def): Add a block_symbol field to the union.
	(BLOCK_SYMBOL_CHECK): New macro.
	(rtl_check_failed_block_symbol): Declare.
	(SYMBOL_FLAG_IN_BLOCK, SYMBOL_FLAG_ANCHOR): New SYMBOL_REF flags.
	(SYMBOL_REF_IN_BLOCK_P, SYMBOL_REF_ANCHOR_P): New predicates.
	(SYMBOL_FLAG_MACH_DEP_SHIFT): Bump by 2.
	(SYMBOL_REF_BLOCK, SYMBOL_REF_BLOCK_OFFSET): New accessors.
	* output.h (output_section_symbols): Declare.
	(object_block): Name structure.
	(place_section_symbol, get_section_anchor, default_asm_output_anchor)
	(default_use_anchors_for_symbol_p): Declare.
	* Makefile.in (RTL_BASE_H): Add vec.h.
	(explow.o): Depend on output.h.
	* config/rs6000/rs6000.c (TARGET_MIN_ANCHOR_OFFSET): Override default.
	(TARGET_MAX_ANCHOR_OFFSET): Likewise.
	(TARGET_USE_BLOCKS_FOR_CONSTANT_P): Likewise.
	(rs6000_use_blocks_for_constant_p): New function.

From-SVN: r111254
2006-02-18 22:06:53 +00:00
Richard Sandiford c185c79706 rtl.texi (SYMBOL_REF_CONSTANT, [...]): Document.
* doc/rtl.texi (SYMBOL_REF_CONSTANT, SYMBOL_REF_DATA): Document.
	* gengtype.c (adjust_field_rtx_def): Garbage-collect field 2 of
	a SYMBOL_REF as either a tree or a constant_descriptor_rtx,
	depending on the value of CONSTANT_POOL_ADDRESS_P.
	* optabs.c (init_one_libfunc): Nullify SYMBOL_REF_DATA rather than
	SYMBOL_REF_DECL.
	* varasm.c (make_decl_rtl, build_constant_desc): Set SYMBOL_REF_DATA
	rather than SYMBOL_REF_DECL.
	(rtx_constant_pool): Remove const_rtx_sym_htab.
	(const_desc_rtx_sym_hash, const_desc_rtx_sym_eq): Delete.
	(init_varasm_status): Don't initialize const_rtx_sym_htab.
	(force_const_mem): Point SYMBOL_REF_DATA to the constant pool entry.
	Remove handling of const_rtx_sym_htab.
	(find_pool_constant): Delete.
	(get_pool_constant, get_pool_constant_mark): Use SYMBOL_REF_CONSTANT
	rather than find_pool_constant.
	(get_pool_constant_for_function): Delete.
	(get_pool_mode, mark_constant): Use SYMBOL_REF_CONSTANT rather than
	find_pool_constant. 
	* rtl.h (rtunion_def): Add rt_constant and rt_ptr fields.
	(X0CONSTANT, X0PTR, SYMBOL_REF_DATA): New macros.
	(SYMBOL_REF_DECL): Return NULL if CONSTANT_POOL_ADDRESS_P.
	(SYMBOL_REF_CONSTANT): New macro.
	(get_pool_constant_for_function): Delete.
	* config/i386/winnt.c (i386_pe_mark_dllexport): Set SYMBOL_REF_DATA
	rather than SYMBOL_REF_DECL.
	(i386_pe_mark_dllimport): Likewise.
	* config/rs6000/rs6000.c (rs6000_emit_move): Copy SYMBOL_REF_DATA
	rather than SYMBOL_REF_DECL.
	* config/darwin.c (machopic_indirect_data_reference): Likewise.
	(machopic_indirect_call_target): Likewise.

From-SVN: r110210
2006-01-25 09:10:56 +00:00
Richard Sandiford 0f01f026dc gengtype.c (new_structure): Return the structure.
* gengtype.c (new_structure): Return the structure.
	(create_option): Add an extra "next" argument.
	(create_field): New function.
	(adjust_field_rtx_def): Use create_option and create_field.
	Remove a now-unnecessary call to find_structure.
	(adjust_field_tree_def): Likewise.
	(note_yacc_type): Remove an unnecessary call to find_structure.
	* gengtype.h (new_structure): Return the structure.
	(create_option): Add an extra argument.
	* gengtype-yacc.y (type): Remove unnecessary calls to find_structure.
	(option): Adjust calls to create_option.

From-SVN: r110108
2006-01-23 07:50:42 +00:00
Richard Sandiford d6b5193bfc alpha.c (alpha_start_function): Use switch_to_section.
* config/alpha/alpha.c (alpha_start_function): Use switch_to_section.
	(alpha_elf_select_rtx_section): Return the selected section rather
	than emitting assembly code.
	(alpha_write_linkage): Emit a ".link" directive directly and then
	set in_section to NULL.
	(vms_asm_out_constructor): Use switch_to_section.
	(vms_asm_out_destructor): Likewise.
	(unicosmk_output_common): Set in_section to NULL instead of calling
	the dummy common_section function.
	(unicosmk_text_section): Delete in favor of...
	(unicosmk_output_text_section_asm_op): ...this new function.
	(unicosmk_data_section): Delete in favor of...
	(unicosmk_output_data_section_asm_op): ...this new function.
	(unicosmk_init_sections): New function.
	(unicosmk_output_deferred_case_vectors): Use switch_to_section.
	(unicosmk_output_ssib): Set in_section to NULL instead of calling
	the dummy ssib_section function.
	(unicosmk_section_buf): Delete.
	* config/alpha/alpha-protos.h (unicosmk_text_section): Delete.
	(unicosmk_data_section): Delete.
	* config/alpha/elf.h (ASM_OUTPUT_ALIGNED_LOCAL): Use switch_to_section.
	(EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, sbss_section, sdata_section)
	(SECTION_FUNCTION_TEMPLATE): Delete.
	* config/alpha/unicosmk.h (TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP)
	(READONLY_DATA_SECTION, EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS)
	(common_section, COMMON_SECTION, ssib_section, SSIB_SECTION): Delete.
	(ASM_OUTPUT_ALIGNED_LOCAL): Use switch_to_section.
	(TARGET_ASM_INIT_SECTIONS): Define.
	* config/alpha/vms.h (LINK_SECTION_ASM_OP, LITERALS_SECTION_ASM_OP)
	(EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete.
	(link_section, literals_section): Delete.
	(ASM_OUTPUT_DEF): Emit the ".literal" directive directly and then
	set in_section to NULL.

	* config/arm/aof.h (TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP): Delete.
	(EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, ZERO_INIT_SECTION): Delete.
	(COMMON_SECTION): Delete.
	(TARGET_ASM_INIT_SECTIONS): Define.
	(ASM_OUTPUT_COMMON): Set in_section to NULL rather than calling
	the dummy common_section function.
	* config/arm/aout.h (ASM_OUTPUT_ALIGNED_LOCAL): Use switch_to_section.
	* config/arm/arm.c (get_jump_table_size): Use pointer comparison
	between readonly_data_section and text_section to check whether
	read-only data is being put in the text section.
	(arm_output_function_epilogue): Use switch_to_section.
	(arm_elf_asm_constructor): Likewise.
	(thumb_call_via_reg): Replace call to in_text_section with
	a comparison between in_section and text_section.
	(arm_file_end): Use switch_to_section.
	(aof_text_section): Delete in favor of...
	(aof_output_text_section_asm_op): ...this new function.
	(aof_data_section): Delete in favor of...
	(aof_output_data_section_asm_op): ...this new function.
	(aof_asm_init_sections): New function.
	(zero_init_section): Moved from config/arm/aof.h.
	(aof_dump_imports, aof_file_start): Use switch_to_section.
	* config/arm/arm.h (thumb_call_via_label): Update comment.
	* config/arm/arm-protos.h (aof_text_section, aof_data_section): Delete.
	(common_section): Delete.
	* config/arm/pe.h (ASM_DECLARE_FUNCTION_NAME): Use switch_to_section.
	(ASM_DECLARE_OBJECT_NAME): Update the type of save_section.  Use the
	global switch_to_section function instead of the old port-local one.
	(EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, DRECTVE_SECTION_FUNCTION)
	(SWITCH_TO_SECTION_FUNCTION): Delete.
	(drectve_section): Redefine as a macro.
	* config/arm/unknown-elf.h (ASM_OUTPUT_ALIGNED_BSS):
	(ASM_OUTPUT_ALIGNED_DECL_LOCAL): Use get_named_section and
	switch_to_section.

	* config/avr/avr.c (progmem_section): New variable.
	(avr_output_progmem_section_asm_op): New function.
	(avr_asm_init_sections): New function.
	(avr_output_addr_vec_elt): Use switch_to_section.
	* config/avr/avr.h (progmem_section): Declare.
	(EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete.
	(READONLY_DATA_SECTION): Delete.
	(TARGET_ASM_INIT_SECTIONS): Define.
	(ASM_OUTPUT_CASE_LABEL): Use switch_to_section.
	* config/avr/avr-protos.h (progmem_section): Delete.

	* config/bfin/bfin.h (ASM_OUTPUT_LOCAL): Use switch_to_section.

	* config/c4x/c4x.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS)
	(INIT_SECTION_FUNCTION, FINI_SECTION_FUNCTION): Delete.

	* config/darwin-sections.def: New file.
	* config/darwin.c: Define all sections in darwin-sections.def.
	(output_objc_section_asm_op, darwin_init_sections): New functions.
	(machopic_output_indirection): Use switch_to_section.
	(machopic_select_section): Return the selected section rather than
	emitting assembly code.  Replace the static function table with
	inline conditional expressions.  Update the tests of last_text_section
	and move them into the FUNCTION_DECL block.
	(machopic_select_rtx_section): Return the selected section rather than
	emitting assembly code.
	(machopic_asm_out_constructor, machopic_asm_out_destructor)
	(darwin_file_end): Use switch_to_section.
	* config/darwin.h: Use darwin-sections.def to declare sections.
	(INIT_SECTION_ASM_OP): Remove empty definition.
	(HAS_INIT_SECTION): Define this instead.
	(SECTION_FUNCTION, EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete.
	(READONLY_DATA_SECTION, TARGET_ASM_EXCEPTION_SECTION): Delete.
	(TARGET_ASM_EH_FRAME_SECTION): Delete.
	(TARGET_ASM_INIT_SECTIONS): Define.
	* config/darwin-protos.h (darwin_init_sections): Declare.
	(machopic_picsymbol_stub_section, machopic_picsymbol_stub1_section)
	(machopic_symbol_stub_section, machopic_symbol_stub1_section): Delete.
	(machopic_lazy_symbol_ptr_section, machopic_nl_symbol_ptr_section)
	(constructor_section, destructor_section, mod_init_section): Delete.
	(mod_term_section): Delete.
	(darwin_exception_section, darwin_eh_frame_section): Delete.
	(machopic_select_section): Return a section.
	(machopic_select_rtx_section): Likewise.
	(text_coal_section, text_unlikely_section, text_unlikely_coal_section)
	(const_section, const_coal_section, const_data_section): Delete.
	(const_data_coal_section, data_coal_section, cstring_section): Delete.
	(literal4_section, literal8_section, constructor_section): Delete.
	(mod_init_section, mod_term_section, destructor_section): Delete.
	(objc_class_section, objc_meta_class_section, objc_category_section)
	(objc_class_vars_section, objc_instance_vars_section): Delete.
	(objc_cls_meth_section, objc_inst_meth_section): Delete.
	(objc_cat_cls_meth_section, objc_cat_inst_meth_section): Delete.
	(objc_selector_refs_section, objc_selector_fixup_section): Delete.
	(objc_symbols_section, objc_module_info_section): Delete.
	(objc_image_info_section, objc_protocol_section): Delete.
	(objc_string_object_section, objc_constant_string_object_section)
	(objc_class_names_section, objc_meth_var_names_section): Delete.
	(objc_meth_var_types_section, objc_cls_refs_section): Delete.
	(machopic_lazy_symbol_ptr_section, machopic_nl_symbol_ptr_section)
	(machopic_symbol_stub_section, machopic_picsymbol_stub_section)
	(darwin_exception_section, darwin_eh_frame_section): Delete.
	* config/t-darwin (darwin.o): Depend on config/darwin-sections.def.

	* config/frv/frv.c (frv_asm_out_constructor): Use switch_to_section.
	(frv_asm_out_destructor): Likewise.
	* config/frv/frv.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete.
	(SDATA_SECTION_FUNCTION, FIXUP_SECTION_FUNCTION): Delete.
	(ASM_OUTPUT_ALIGNED_DECL_LOCAL): Use switch_to_section and
	get_named_section.
	(ASM_OUTPUT_CASE_LABEL): Use switch_to_section.
	* config/frv/frv-protos.h (fixup_section, sdata_section, sbss_section)
	(data_section): Delete.

	* config/i386/cygming.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS)
	(DRECTVE_SECTION_FUNCTION): Delete.
	(drectve_section): Redefine as a macro that sets in_section after
	emitting the directive.
	(SWITCH_TO_SECTION_FUNCTION): Delete.
	* config/i386/darwin.h (ASM_OUTPUT_ALIGN): Replace call to
	in_text_section with comparison between in_section and text_section.
	* config/i386/i386.c (x86_64_elf_select_section): Return the section
	rather than emitting assembly code.  Use get_named_section.
	(x86_output_aligned_bss, ix86_file_end): Use switch_to_section and
	get_named_section.
	(machopic_output_stub): Use switch_to_section.
	* config/i386/nwld.c (nwld_named_section_asm_out_constructor)
	(nwld_named_section_asm_out_destructor): Use get_section and
	switch_to_section.

	* config/ia64/ia64.c (ia64_select_rtx_section): Return the section
	rather than emitting assembly code.
	(ia64_rwreloc_select_section): Likewise.
	(ia64_rwreloc_select_rtx_section): Likewise.
	* config/ia64/ia64-protos.h (sdata_section, sbss_section): Delete.
	* config/ia64/sysv4.h (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Use
	switch_to_section.
	(EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete.
	(SDATA_SECTION_FUNCTION, SBSS_SECTION_FUNCTION): Delete.

	* config/iq2000/iq2000.c (iq2000_select_rtx_section): Return the
	section rather than emitting assembly code.
	(iq2000_select_section): Likewise.
	* config/iq2000/iq2000.h (rdata_section, sdata_section): Delete.
	(sbss_section): Delete.

	* config/m32r/m32r.h (ASM_OUTPUT_ALIGNED_BSS): Use switch_to_section
	and get_named_section.
	* config/m32r/m32r-protos.h (sbss_section, sdata_section): Delete.

	* config/mcore/mcore-elf.h (EXPORTS_SECTION_ASM_OP): Delete.
	(SUBTARGET_EXTRA_SECTIONS, SUBTARGET_EXTRA_SECTION_FUNCTIONS): Delete.
	(EXPORT_SECTION_FUNCTION, SUBTARGET_SWITCH_SECTIONS): Delete.
	(MCORE_EXPORT_NAME): Emit the exports directive directly, then set
	in_section to NULL.
	(ASM_DECLARE_FUNCTION_NAME): Use switch_to_section.
	(ASM_DECLARE_OBJECT_NAME): Update the type of save_section.  Use the
	global switch_to_section function instead of the old port-local one.
	* config/mcore/mcore.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS)
	(SWITCH_SECTION_FUNCTION): Delete.
	* config/mcore/mcore-pe.h (SUBTARGET_SWITCH_SECTIONS): Delete.
	(DRECTVE_SECTION_ASM_OP, SUBTARGET_EXTRA_SECTIONS): Delete.
	(SUBTARGET_EXTRA_SECTION_FUNCTIONS, DRECTVE_SECTION_FUNCTION): Delete.
	(MCORE_EXPORT_NAME): Emit ".section .drectve" directly, then set
	in_section to NULL.
	(ASM_DECLARE_OBJECT_NAME): Update the type of save_section.  Use the
	global switch_to_section function instead of the old port-local one.
	(ASM_DECLARE_FUNCTION_NAME): Use switch_to_section.

	* config/mips/mips.c (mips_file_start): Update comment.
	(mips_output_aligned_bss): Use switch_to_section and get_named_section.
	(mips_output_aligned_decl_common): Use switch_to_section.
	(mips_select_rtx_section): Return the section rather than emitting
	assembly code.  Use get_named_section.
	(mips_function_rodata_section: Likewise get_section.
	(build_mips16_function_stub): Use switch_to_section.
	* config/mips/mips.h (ASM_OUTPUT_IDENT): Use switch_to_section.
	(SDATA_SECTION_ASM_OP): Delete.
	* config/mips/vxworks.h (EXTRA_SECTIONS): Delete.
	(EXTRA_SECTION_FUNCTIONS): Delete.

	* config/mmix/mmix.c (mmix_file_start, mmix_file_end)
	(mmix_asm_output_aligned_local): Use switch_to_section.

	* config/pa/pa.c (som_readonly_data_section, som_one_only_data_section)
	(som_one_only_readonly_data_section): New variables.
	(pa_output_function_epilogue): Set in_section to NULL instead of
	calling forget_section.
	(output_deferred_plabels): Use select_section.
	(pa_asm_output_mi_thunk): Likewise.  Set in_section to NULL instead
	of calling forget_section.
	(pa_asm_output_aligned_bss, pa_asm_output_aligned_common)
	(pa_asm_output_aligned_local): Use select_section.
	(som_text_section_asm_op): Delete in favor of...
	(som_output_text_section_asm_op): ...this new function.
	(pa_som_asm_init_sections): New function.
	(pa_select_section): Return the section rather than emitting
	assembly code.
	* config/pa/pa.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete.
	(SOM_READONLY_DATA_SECTION_FUNCTION): Delete.
	(SOM_ONE_ONLY_READONLY_DATA_SECTION_FUNCTION): Delete.
	(SOM_ONE_ONLY_DATA_SECTION_FUNCTION, FORGET_SECTION_FUNCTION): Delete.
	* config/pa/pa-protos.h (som_text_section_asm_op): Delete.
	(som_readonly_data_section, som_one_only_readonly_data_section)
	(som_one_only_data_section, forget_section): Delete.
	* config/pa/som.h (TEXT_SECTION_ASM_OP): Delete.
	(TARGET_ASM_INIT_SECTIONS): Define.
	(READONLY_DATA_SECTION, TARGET_ASM_EXCEPTION_SECTION): Delete.

	* config/rs6000/rs6000.c (read_only_data_section): New variable.
	(private_data_section, read_only_private_data_section): New variables.
	(sdata2_section, toc_section): New variables.
	(rs6000_file_start): Use switch_to_section.
	(rs6000_assemble_integer): Use comparisons against in_section
	instead of calling in_toc_section and in_text_section.  Use
	unlikely_text_section_p.
	(rs6000_elf_output_toc_section_asm_op): New function, derived
	from the old rs6000/sysv4.h toc_section function.
	(rs6000_elf_asm_init_sections): New function.
	(rs6000_elf_select_rtx_section, rs6000_elf_select_section): Return
	the section rather than emitting assembly code.
	(machopic_output_stub): Use switch_to_section.
	(toc_section): Delete dummy function.
	(rs6000_elf_asm_out_constructor, rs6000_elf_asm_out_destructor): Use
	switch_to_section and get_section.
	(rs6000_xcoff_output_readonly_section_asm_op): New function.
	(rs6000_xcoff_output_readwrite_section_asm_op): New function.
	(rs6000_xcoff_output_toc_section_asm_op): New function, derived from
	the old rs6000/xcoff.h toc_section function.
	(rs6000_xcoff_asm_init_sections): New function.
	(rs6000_xcoff_select_section, rs6000_xcoff_select_rtx_section): Return
	the section rather than emitting assembly code.
	(rs6000_xcoff_file_start): Use switch_to_section.
	(rs6000_xcoff_file_end): Likewise.
	* config/rs6000/rs6000-protos.h (toc_section, sdata_section): Delete.
	(sdata2_section, sbss_section, private_data_section): Delete.
	(read_only_data_section, read_only_private_data_section): Delete.
	* config/rs6000/sysv4.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS)
	(TOC_SECTION_FUNCTION, SDATA_SECTION_FUNCTION, SDATA2_SECTION_FUNCTION)
	(SBSS_SECTION_FUNCTION, INIT_SECTION_FUNCTION): Delete.
	(FINI_SECTION_FUNCTION): Delete.
	(TARGET_ASM_INIT_SECTIONS): Define.
	(ASM_OUTPUT_ALIGNED_LOCAL): Use switch_to_section.
	* config/rs6000/xcoff.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS)
	(READ_ONLY_DATA_SECTION_FUNCTION, PRIVATE_DATA_SECTION_FUNCTION)
	(READ_ONLY_PRIVATE_DATA_SECTION_FUNCTION, TOC_SECTION_FUNCTION)
	(READONLY_DATA_SECTION): Delete.
	(TARGET_ASM_INIT_SECTIONS): Define.
	(ASM_DECLARE_FUNCTION_NAME): Use switch_to_section.  Set in_section
	to NULL rather than no_section.
	(TARGET_ASM_EXCEPTION_SECTION): Delete.

	* config/sh/sh.c (sh_file_start): Use switch_to_section.

	* config/sparc/sparc.c (emit_pic_helper): Use switch_to_section.
	(sparc_output_deferred_case_vectors): Likewise.  Remove argument
	from call to current_function_section.

	* config/stormy16/stormy16.c: Include ggc.h and gt-storm16.h.
	(bss100_section): New variable.
	(xstormy16_asm_output_aligned_common): Use switch_to_section.
	(xstormy16_asm_init_sections): New function.
	(xstormy16_asm_out_destructor, xstormy16_asm_out_constructor): Use
	switch_to_section and get_section.
	(xstormy16_output_addr_vec): Use switch_to_section.  Remove argument
	from calls to current_function_section.
	* config/stormy16/stormy16.h (EXTRA_SECTIONS): Delete.
	(XSTORMY16_SECTION_FUNCTION, EXTRA_SECTION_FUNCTIONS): Delete.
	(TARGET_ASM_INIT_SECTIONS): Define.
	* config/stormy16/stormy16-protos.h (bss100_section): Delete.

	* config/svr3.h (ASM_OUTPUT_LOCAL): Use switch_to_section.
	(EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, INIT_SECTION_FUNCTION)
	(FINI_SECTION_FUNCTION): Delete.

	* config/v850/v850.c: Include gt-v850.h.
	(rosdata_section, rozdata_section, tdata_section, zdata_section)
	(zbss_section): New variables.
	(v850_output_aligned_bss): Use switch_to_section.
	(v850_asm_init_sections): New function.
	(v850_select_section): Return the section rather than emitting
	assembly code.
	* config/v850/v850.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS)
	(ZDATA_SECTION_ASM_OP, ZBSS_SECTION_ASM_OP, TDATA_SECTION_ASM_OP)
	(ROSDATA_SECTION_ASM_OP, ROZDATA_SECTION_ASM_OP): Delete.
	(TARGET_ASM_INIT_SECTIONS): Define.
	* config/v850/v850-protos.h (sdata_section, rosdata_section): Delete.
	(sbss_section, tdata_section, zdata_section, rozdata_section): Delete.
	(zbss_section): Delete.

	* config/vax/vaxv.h (ASM_OUTPUT_LOCAL): Use switch_to_section.

	* config/vx-common.h (vxworks_exception_section): Delete.
	(TARGET_ASM_EXCEPTION_SECTION): Delete.

	* config/xtensa/xtensa.c (xtensa_select_rtx_section): Return the
	section rather than emitting assembly code.
	* config/xtensa/xtensa.h (ASM_OUTPUT_POOL_PROLOGUE): Use
	switch_to_section.

	* Makefile.in (GTFILES): Add $(srcdir)/output.h.
	* coretypes.h (section): New union and typedef.
	* dbxout.c (FORCE_TEXT): Use switch_to_section.  Remove argument
	from call to current_function_section.
	(dbxout_function_end, dbxout_init, dbxout_source_file, dbxout_finish)
	(dbxout_symbol_location): Use switch_to_section.
	* dwarf2out.c (named_section_eh_frame_section): Delete, moving
	most of the code into...
	(default_eh_frame_section): ...here.  Return a section.
	(collect2_eh_frame_section): Delete, moving most of the code into..
	(switch_to_eh_frame_section): ...this new function.
	(debug_info_section, debug_abbrev_section, debug_aranges_section)
	(debug_macinfo_section, debug_line_section, debug_loc_section)
	(debug_pubnames_section, debug_str_section, debug_ranges_section): New
	variables.
	(output_call_frame_info): Call switch_to_eh_frame_section instead of
	eh_frame_section.  Use switch_to_section and get_section.
	(dwarf2out_begin_prologue): Use switch_to_section.
	(AT_string_form): Check the flags in debug_str_section instead of
	DEBUG_STR_SECTION_FLAGS.
	(output_comp_unit): Use switch_to_section, get_section, and
	debug_info_section.
	(output_line_info, secname_for_decl): Use unlikely_text_section_p.
	(dwarf2out_begin_block): Use switch_to_section.  Remove argument
	from call to current_function_section.
	(dwarf2out_var_location): Use unlikely_text_section_p.
	(dwarf2out_source_line): Use switch_to_section.  Remove argument
	from call to current_function_section.
	(dwarf2out_start_source_file, dwarf2out_end_source_file)
	(dwarf2out_define, dwarf2out_undef: Use switch_to_section and
	debug_macinfo_section.
	(dwarf2out_init): Initialize the new section variables.  Use them
	instead of calls to named_section_flags.  Use switch_to_section.
	(output_indirect_string): Use switch_to_section and debug_str_section.
	(dwarf2out_finish): Use switch_to_section and the new section
	variables.
	* except.c (default_exception_section): Return the section instead
	of emitting assembly code.
	(output_function_exception_table): Use the global exception_section
	variable instead of the target hook.  Use switch_to_section.  Remove
	argument from call to current_function_section.
	* final.c (HAVE_READONLY_DATA_SECTION): Delete.
	(shorten_branches): Use pointer comparisons to detect whether the
	text section is the same as readonly_data_section.
	(profile_function): Use switch_to_section.  Remove argument from
	call to current_function_section.
	(final_scan_insn): Likewise.  Update use of last_text_section.
	* gengtype.c (open_base_files): Add an include of output.h.
	* output.h (text_section, data_section, readonly_data_section)
	(ctors_section, dtors_section, bss_section, init_section)
	(fini_section, sdata_section): Turn into section pointers.
	(in_text_section, in_unlikely_text_section, exports_section)
	(drectve_section, named_section, mergeable_string_section)
	(last_text_section_name): Delete.
	(default_exception_section, default_eh_frame_section): Return sections.
	(SECTION_DECLARED, SECTION_NAMED): New macros.
	(SECTION_MACH_DEP): Bump value.
	(section_common, named_section, unnamed_section): New structures.
	(unnamed_section_callback): New typedef.
	(section): New union.
	(sbss_section, exception_section, eh_frame_section): New variables.
	(in_section, last_text_section): Turn into section pointers.
	(get_unnamed_section, get_section, get_named_section): New functions.
	(mergeable_constant_section, function_section): Return a section.
	(unlikely_text_section): Likewise.
	(current_function_section): Likewise.  Remove the decl argument.
	(unlikely_text_section_p, switch_to_section): New functions.
	(output_section_asm_op): New function.
	(set_named_section_flags, named_section_flags, named_section_real)
	(named_section_first_declaration): Delete.
	(default_select_section, default_elf_select_section): Return a section.
	(default_elf_select_section_1, default_function_rodata_section)
	(default_no_function_rodata_section, default_select_rtx_section)
	(default_elf_select_rtx_section): Likewise.
	* rtl.h (in_data_section): Delete.
	* sdbout.c (sdbout_one_type): Use switch_to_section.
	* system.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Poison.
	(READONLY_DATA_SECTION, TARGET_ASM_EXCEPTION_SECTION): Poison.
	(TARGET_ASM_EH_FRAME_SECTION): Poison.
	* target-def.h (TARGET_ASM_INIT_SECTIONS): New macro.
	(TARGET_ASM_EXCEPTION_SECTION, TARGET_ASM_EH_FRAME_SECTION): Delete.
	(TARGET_ASM_OUT): Update after above changes.
	* target.h (init_sections): New hook.
	(exception_section, eh_frame_section): Delete.
	(select_section, select_rtx_section, function_rodata_section): Return
	a section rather than emitting assembly code.
	* varasm.c (text_section, data_section, readonly_data_section)
	(ctors_section, dtors_section, bss_section, init_section)
	(fini_section): Turn into section pointers.
	(sdata_section, sbss_section, exception_section): New variables.
	(eh_frame_section): New variable.
	(in_section): Make global and turn into a section pointer.
	(last_text_section): Turn into a section pointer.
	(unnamed_sections): New variable.
	(in_named_name, last_text_section_name): Delete.
	(EXTRA_SECTION_FUNCTIONS): Delete.
	(in_named_entry): Delete.
	(section_htab): New variable, replacing...
	(in_named_htab): ...this deleted variable.
	(section_entry_eq, section_entry_hash): New functions, based on...
	(in_named_entry_eq, in_named_entry_hash): ...these deleted functions.
	(get_unnamed_section, get_section): New functions.
	(unlikely_text_section): Return a section instead of emitting
	assembly code.
	(in_text_section, in_unlikely_text_section, in_data_section): Delete.
	(get_named_section_flags, named_section_first_declaration): Delete.
	(unlikely_text_section_p): New function.
	(named_section_real, named_section): Delete.
	(get_named_section): New function.
	(asm_output_bss, asm_output_aligned_bss): Use switch_to_section.
	(function_section): Return a section rather than emitting
	assembly code.
	(current_function_section): Likewise.  Remove argument.  Use
	last_text_section if nonnull, otherwise use function_section.
	(default_function_rodata_section): Return a section rather than
	emitting assembly code.  Use get_section.
	(default_no_function_rodata_section): Return a section rather than
	emitting assembly code.
	(variable_section): Use switch_to_section and get_named_section.
	(mergeable_string_section): Return a section rather than emitting
	assembly code.  Use get_section.  Make static.  Don't take special
	countermeasures for empty strings.
	(mergeable_constant_section): Return a section rather than emitting
	assembly code.  Use get_section.
	(default_named_section_asm_out_destructor): Use switch_to_section
	and get_section.
	(default_dtor_section_asm_out_destructor): Use switch_to_section.
	(default_named_section_asm_out_constructor): Use switch_to_section
	and get_section.
	(default_ctor_section_asm_out_constructor): Use switch_to_section.
	(assemble_start_function): Likewise.  Set last_text_section to
	NULL rather than no_section.  Change the type of save_section.
	(assemble_zeros, assemble_variable): Use the section flags to detect
	whether or not a section is text.
	(assemble_static_space): Use switch_to_section.
	(assemble_trampoline_template): Likewise.
	(output_constant_def_contents): Use switch_to_section and
	get_named_section.
	(output_constant_pool_1): Use switch_to_section.  Use the section
	flags to see whether sections contain mergeable data.
	(init_varasm_once): Initialize section_htab instead of in_named_htab.
	Initialize new section variables.  Call TARGET_ASM_INIT_SECTIONS.
	(default_elf_asm_named_section): Use SECTION_DECLARED to detect
	whether a section has already been declared.
	(default_select_section, default_elf_select_section): Return a
	section rather than emitting assembly code.
	(default_elf_select_section_1): Likewise.  Use bss_section for
	SECCAT_BSS if nonnull.  Use get_named_section.
	(default_select_rtx_section): Return a section rather than
	emitting assembly code.
	(default_elf_select_rtx_section): Likewise.  Use get_named_section.
	(file_end_indicate_exec_stack): Use switch_to_section and get_section.
	(output_section_asm_op, switch_to_section): New functions.
	* vmsdbgout.c (vmsdbgout_finish): Use switch_to_section and
	get_named_section.

	* doc/tm.texi: Expand the introduction to the sections documentation.
	(TRAMPOLINE_SECTION): Document new interface.
	(SDATA_SECTION_ASM_OP): Document new macro.
	(READONLY_DATA_SECTION): Delete.
	(SDATA_SECTION_ASM_OP): Document new macro.
	(EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete.
	(TARGET_ASM_INIT_SECTIONS): Document new hook.
	(TARGET_ASM_SELECT_SECTION, TARGET_ASM_FUNCTION_RODATA_SECTION)
	(TARGET_ASM_SELECT_RTX_SECTION): Adjust for new interface.
	(TARGET_EXCEPTION_SECTION, TARGET_EH_FRAME_SECTION): Delete.

gcc/java/
	* class.c (build_utf8_ref, emit_register_classes): Use
	switch_to_section and get_section.

From-SVN: r108152
2005-12-07 07:53:14 +00:00
Kelley Cook 356f9ab377 gengtype.c: Update FSF address in copyright header.
2005-06-25  Kelley Cook  <kcook@gcc.gnu.org>

	* gengtype.c: Update FSF address in copyright header.
	(create_file): Update FSF in outputed copyright header.

From-SVN: r101311
2005-06-25 00:55:40 +00:00
Geoffrey Keating 0518582d92 gengtype.c (adjust_field_rtx_def): Don't add a skip to basic_block types.
* gengtype.c (adjust_field_rtx_def): Don't add a skip to
	basic_block types.

From-SVN: r101099
2005-06-16 22:12:24 +00:00
Ziemowit Laski 6e95543072 Yet more Objective-C++...
* c-common.h (objc_finish_try_stmt): Add.
        (objc_build_synchronized): Add.
        (objc_generate_write_barrier): Add.
        * stub-objc.c (objc_build_synchronized): Add return value.
        (objc_finish_try_stmt): Likewise.
        (objc_generate_write_barrier): Add.

        * c-common.h (objc_rewrite_function_call): Add.
        * c-typeck.c (build_function_call): Allow objc to rewrite
        FUNCTION_DECLs.
        (build_modify_expr): Allow objc to generate write barriers.
        * c.opt (Wassign-intercept): Add.
        (Wstrict-selector-match): Add.
        (fobjc-call-cxx-cdtors): Add.
        (fobjc-direct-dispatch): Add.
        (fobjc-gc): Add.
        * dbxout.c (get_lang_number): Add Objective-C++ support.
        * doc/invoke.texi (-fobjc-call-cxx-cdtors): Likewise.
        (-Wstrict-selector-match): Likewise.
        (-fobjc-direct-dispatch): Likewise.
        (-Wassign-intercept): Likewise.
        (Overall Options): Likewise.
        * gengtype.c (get_output_file_with_visibility): Likewise.
        * stub-objc.c (objc_rewrite_function_call): Add.
        * config/darwin.h (ASM_OUTPUT_LABELREF): Improved quoting support.

        * c-common.c (flag_objc_exceptions): Remove.
        (flag_objc_sjlj_exceptions): Remove.
        * c-decl.c (objc_mark_locals_volatile): Don't change decls
        that are already ok.
        * c-opts.c (c_common_handle_option, case
        OPT_fobjc_exceptions): Remove.
        (case OPT_fobjc_sjlj_exceptions): Remove
        * c.opt (fobjc-call-cxx-cdtors): Have opt create the flag.
        (fobjc-exceptions): Likewise.
        (fobjc-sjlj-exceptions): Likewise.
        * config/rs6000/darwin.h (OFFS_MSGSEND_FAST): Add.
        (OFFS_ASSIGNIVAR_FAST): Add.

From-SVN: r99858
2005-05-17 20:11:44 +00:00
Jan Hubicka b4660e5a25 Makefile.in (tree-eh.o): Kill gt-tree-eh.h dependency.
* Makefile.in (tree-eh.o: Kill gt-tree-eh.h dependency.
	(GTFILES): add except.h.
	* except.c (eh_status): Add throw_stmt_table.
	(set_eh_throw_stmt_table, get_eh_throw_stmt_table): New functions.
	* except.h (add_stmt_to_eh_region_fn, remove_stmt_from_eh_region_fn,
	lookup_stmt_eh_region_fn): Declare.
	(throw_stmt_node): New structure.
	(set_eh_throw_stmt_table, get_eh_throw_stmt_table): New.
	* gengtype.c (open_base_files): Add except.h to inlines.
	* tree-eh.c (throw_stmt_node): Kill.
	(record_stmt_eh_region): Update.
	(add_stmt_to_eh_region_fn): Break out from ...
	(add_stmt_to_eh_region): ... here.
	(remove_stmt_from_eh_region_fn): Break out from ...
	(remove_stmt_from_eh_region): ... here.
	(lookup_stmt_eh_region_fn): Break out from ...
	(lookup_stmt_eh_region): ... here.
	(honor_protect_cleanup_actions): Use build_resx.
	(lower_try_finally_onedest): Likewise.
	(lower_try_finally_copy): Likewise.
	(lower_try_finally_switch): Likewise.
	(lower_eh_constructs): Update eh table construction.
	* tree.c (build_resx): New.
	* tree.h (build_resx): Declare.

From-SVN: r99585
2005-05-11 16:25:30 +00:00
Richard Henderson 2d82317df0 gengtype.c (write_func_for_structure): Split out ...
* gengtype.c (write_func_for_structure): Split out ...
        (output_type_enum): ... new function.  Fix thinko accessing
        TYPE_PARAM_STRUCT data.

Co-Authored-By: Daniel Jacobowitz <dan@codesourcery.com>

From-SVN: r99020
2005-04-29 14:42:27 -07:00
Daniel Jacobowitz 08cee789cd ggc-zone.c: Rewritten.
* ggc-zone.c: Rewritten.

	* alloc-pool.c (dump_alloc_pool_statistics): Don't print statistics
	if there are none.
	* configure.ac: Define GGC_ZONE for --with-gc=zone.
	* config.in: Regenerated.
	* configure: Regenerated.
	* gentype.c (write_types_process_field, write_func_for_structure):
	Pass new argument to gt_pch_note_object.
	* ggc-common.c (struct ptr_data): Add TYPE.
	(gt_pch_note_object): Take TYPE argument and save it.
	(call_count): Update call to ggc_pch_count_object.
	(call_alloc): Update call to ggc_pch_alloc_object.
	(gt_pch_save): Call ggc_pch_prepare_write after paddng the PCH
	file.
	* ggc-none.c (rtl_zone, garbage_zone, ggc_alloc_zone_stat): Delete.
	* ggc-page.c (rtl_zone, tree_zone, garbage_zone)
	(ggc_alloc_zone_stat): Delete.
	(ggc_pch_count_object, ggc_pch_alloc_object): Add TYPE argument.
	* ggc.h (gt_pch_note_object, ggc_pch_count_object)
	(ggc_pch_alloc_object): Update prototypes.
	(garbage_zone): Delete.
	(tree_zone, rtl_zone, ggc_alloc_zone_stat, ggc_alloc_zone): Move to
	GGC_ZONE conditional.  Update.  Change tree_zone and rtl_zone into
	pointers.
	(tree_id_zone): New variable.
	(ggc_alloc_cleared_zone): Remove unused.
	(ggc_alloc_zone): Define.
	(ggc_alloc_rtvec, ggc_alloc_tree): Update to use ggc_alloc_zone.
	* rtl.c (rtx_alloc_stat, shallow_copy_rtx_stat): Use
	ggc_alloc_zone_stat.
	* stringpool.c (gt_pch_n_S): Update call to gt_pch_note_object.
	* tree.c (copy_node_stat, make_tree_binfo_stat, make_tree_vec_stat)
	(tree_cons_stat, build1_stat): Update call to ggc_alloc_zone_stat.
	(make_node_stat): Likewise.  Use tree_id_zone.

From-SVN: r96381
2005-03-13 18:09:55 +00:00
James E Wilson 79e4e6a60b Fix out-of-bounds array access found by mudflap.
* gengtype.c (note_insn_name): Make 1 element larger.

From-SVN: r95473
2005-02-23 14:16:07 -08:00
Kazu Hirata deeec1d8a8 c-opts.c, [...]: Update copyright.
* c-opts.c, expmed.c, gengtype.c, tree-complex.c,
	config/arm/iwmmxt.md, config/avr/avr.c, config/s390/s390.h:
	Update copyright.

From-SVN: r94154
2005-01-24 11:59:45 +00:00
Steven Bosscher a62a0172a3 gengtype.c (walk_type): Produce `not equal to' compares for loop tests, instead of `less than'.
* gengtype.c (walk_type): Produce `not equal to' compares for loop
	tests, instead of `less than'.

From-SVN: r94109
2005-01-23 11:49:24 +00:00
Nathan Sidwell 7932a3db21 bitmap.h (struct bitmap_obstack): New obstack type.
* bitmap.h (struct bitmap_obstack): New obstack type.
	(struct bitmap_head_def): Replace using_obstack with obstack
	pointer.
	(bitmap_default_obstack): New.
	(bitmap_initialize): Make inline, does not do allocation.
	(bitmap_release_memory): Remove.
	(bitmap_obstack_initialize, bitmap_obstack_release): Declare.
	(bitmap_obstack_alloc, bitmap_malloc_alloc, bitmap_gc_alloc,
	bitmap_obstack_free, bitmap_malloc_free): Declare.
	(BITMAP_OBSTACK_ALLOC, BITMAP_GGC_ALLOC, BITMAP_XMALLOC): Adjust.
	(BITMAP_FREE): Replace with ...
	(BITMAP_OBSTACK_FREE): ... this.
	(BITMAP_XFREE): Adjust.
	(BITMAP_INIT_ONCE): Remove.
	* bitmap.c (bitmap_obstack, bitmap_obstack_init, bitmap_free: Remove.
	(bitmap_default_obstack): New.
	(bitmap_elem_to_freelist): Adjust.
	(bitmap_element_allocate): Adjust. Break initialization into ...
	(bitmap_obstack_initialize): ... here.
	(bitmap_release_memory): Replace with ...
	(bitmap_obstack_release): ... this.
	(bitmap_obstack_alloc, bitmap_malloc_alloc, bitmap_gc_alloc,
	bitmap_obstack_free, bitmap_malloc_free): New.
	(bitmap_ior_and_compl, bitmap_ior_and_compl_into): Use
	bitmap_initialize.
	(bitmap_initialize): Move to bitmap.h.
	* gengtype.c (open_base_files): Add obstack.h to ifiles.
	* Makefile.in (BASIC_BLOCK_H, REGS_H): Add obstack.h.
	* basic-block.h (INIT_REG_SET): Allocate from reg_obstack.
	(INITIALIZE_REG_SET): Remove.
	(FREE_REG_SET): Use BITMAP_OBSTACK_FREE.
	(INIT_ONCE_REG_SET, MAX_REGNO_REG_SET): Remove.
	(flow_obstack): Do not declare.
	(reg_obstack): Declare.
	* regs.h: Include obstack.h.
	* tree-optimize.c (tree_rest_of_compilation): Initialize and
	release bitmap obstack here.
	* bb-reorder.c: #include regs, not basic-block.
	(fix_crossing_conditional_branches): Allocate regsets from
	reg_obstack.
	* bt-load.c: Do not inlude bitmap.h, sbitmap.h, basic-block.h or
	obstack.h.
	* caller-save.c: Include regs.h earlier.
	* cfg.c: Do not include basic-block.h or obstack.h.
	(reg_obstack): Define.
	* cfganal.c: Include obstack.h
	* cfgcleanyp.c: Do not include basic-block.h. Include regs.h
	earlier.
	* cfglayout.c: Do not include obstack.h.
	(flow_obstack): Remove declaration.
	(cfg_layout_duplicate_bb): Use reg_obstack.
	* cfgloop.c, cfgloopanal.c, cfgloopmanip.c: Include obstack.h.
	* cfgrtl.c (rtl_split_block): Use reg_obstack.
	(force_nonfallthru_and_redirect, rtl_split_edge): Likewise.
	(safe_insert_insn_on_edge): Use OBSTACK_ALLOC_REG_SET, adjust.
	(cfg_layout_split_edge): Use reg_obstack.
	* cse.c: Include regs.h earlier.
	* ddg.c: Do not include basic-block.h.
	* dominance.c: Inlude obstack.h.
	* flow.c (update_life_info): Use OBSTACK_ALLOC_REG_SET, adjust.
	(calculate_global_regs_live): Likewise.
	(allocate_bb_life_data): Use reg_obstack.
	(init_propagate_block_info): Use OBSTACK_ALLOC_REGSET.
	* global.c: Do not include basic-block.h.
	(build_insn_chain): Use OBSTACK_ALLOC_REG_SET, adjust.
	* graph.c: Include obstack.h.
	* haifa-sched.c: Do not include basic-block.h.
	* ifcvt.c: Use OBSTACK_ALLOC_REG_SET, adjust.
	* local-alloc.c: Do not include basic-block.h.
	* loop-init.c, loop-invariant.c: Include obstack.h.
	* loop-iv.c: Likewise.
	(simplify_using_initial_values): Use OBSTACK_ALLOC_REG_SET,
	adjust.
	* loop-unroll.c, loop-unswitch.c: Inlude obstack.h.
	* modulo-sched.c: Do not include basic-block.h.
	* passes.c (rest_of_handle_final): Do not call
	regset_release_memory.
	* ra-debug.c: Include regs.h earlier. Do not include
	basic-block.h.
	* recog.c (peephole2_optimize): Use OBSTACK_ALLOC_REG_SET, adjust.
	* regclass.c (init_reg_sets): Do not call INIT_ONCE_REG_SET.
	(allocate_reg_info): Do not call MAX_REGNO_REG_SET.
	(regset_release_memory): Remove.
	* resource.c: Do not include basic-block.h.
	* rtlanal.c: Do not include basic-block.h.
	* sbitmap.c: Include obstack.h.
	* sched-deps.c: Do not include basic-block.h.
	(reg_pending_sets_head, reg_pending_clobbers_head,
	reg_pending_uses_head): Remove.
	(init_deps_global): Use OBSTACK_ALLOC_REG_SET.
	* sched-ebb.c: Do not include basic-block.h.
	* sched-rgn.c: Likewise.
	* tree-if-conv.c (get_loop_body_in_if_conv_order): Use
	BITMAP_XFREE.
	* tree-outof-ssa.c (perform_edge_inserts): Use BITMAP_XFREE.
	* tree-sra.c (decide_instantiations): Adjust bitmap
	initialization.
	* tree-ssa-dce.c: Include obstack.h.
	* tree-ssa-pre.c (grand_bitmap_obstack): Make a bitmap_obstack.
	(value_insert_into_set_bitmap): Remove useless bitmap_clear.
	(bitmap_set_new): Likewise.
	(init_pre): Initialize bitmap obstack.
	(fini_pre): Release bitmap obstack.
	* tree-ssanames.c (ssa_names_to_rewrite): Make static.
	(marked_for_rewrite_p): ssa_names_to_rewrite is never NULL.
	(mark_for_rewrite, unmark_for_rewrite): Likewise.
	(marked_ssa_names): Likewise.
	(init_ssanames): Use BITMAP_XMALLOC.
	(fini_ssanames): Use BITMAP_XFREE.
	* web.c: Include obstack.h

From-SVN: r91009
2004-11-22 12:23:59 +00:00
Kazu Hirata 471854f82a alias.c, [...]: Fix comment formatting.
* alias.c, basic-block.h, cgraphunit.c, combine.c, domwalk.h,
	final.c, gengtype.c, genpreds.c, ggc-page.c, insn-notes.def,
	lambda-code.c, loop-unroll.c, modulo-sched.c, pointer-set.c,
	pretty-print.c, ra-colorize.c, sbitmap.c, tree-complex.c,
	tree-data-ref.c, tree-dfa.c, tree-inline.c, tree-into-ssa.c,
	tree-scalar-evolution.c, tree-ssa-dom.c,
	tree-ssa-loop-manip.c, tree-ssa-loop-niter.c,
	tree-ssa-phiopt.c, tree-ssa-pre.c, tree-ssa-threadupdate.c,
	tree-vectorizer.c, vec.h: Fix comment formatting.

From-SVN: r89453
2004-10-22 17:05:11 +00:00
Daniel Berlin 0a05048550 Makefile.def: Remove libbanshee.
Toplevel:

2004-09-09  Daniel Berlin  <dberlin@dberlin.org>

	* Makefile.def: Remove libbanshee.
	* Makefile.tpl: Ditto.
	* configure.in: Ditto.
	* Makefile.in: Regen.
	* configure: Ditto.

gcc/

2004-09-09  Daniel Berlin  <dberlin@dberlin.org>

	* Makefile.in: Remove libbanshee, tree-alias-*.
	Remove tree-alias-common.h dependencies.
	* common.opt: Remove -ftree-points-to.
	* configure.ac: Remove libbanshee.
	* flags.h: Remove pta_type, flag_tree_points_to.
	* gengtype.c (open_base_files): Remove tree-alias-type.h.
	* opts.c (OPT_ftree_points_to): Remove.
	* toplev.c: Remove tree-alias-common.h, flag_tree_points_to.
	* tree-dfa.c: Remove tree-alias-common.h
	* tree-into-ssa.c: Ditto.
	* tree-outof-ssa.c: Ditto.
	* tree-ssa-copyrename.c: Ditto.
	* tree-ssa-live.c: Ditto.
	* tree-optimize.c: Ditto.
	* tree-ssa.c: Ditto.
	Remove pass_build_pta, pass_del_pta.
	* tree-pass.h: Ditto.
	* tree-ssa-alias.c: Remove tree-alias-common.h.
	(struct alias_stats_d):	Remove pta_queries, pta_resolved.
	(pass_may_alias): Remove PROP_pta requirement.
	(may_alias_p): Remove pta_queries, pta_resolved, use of andersens.
	(get_tmt_for): Ditto.
	(dump_alias_stats): Ditto.
	* doc/passes.texi: Remove blurb about points-to analysis.
	* fortran/Make-lang.in: Remove tree-alias-*.o.

From-SVN: r87253
2004-09-09 20:53:41 +00:00
Nathan Sidwell b2d59f6f77 Makefile.in (gengtype): Use $(BUILD_ERRORS).
* Makefile.in (gengtype): Use $(BUILD_ERRORS).
	(gengtype.o): Depend on errors.h.
	* genattrtab.c (strcmp_check): Use gcc_assert and gcc_unreachable.
	(attr_rtx_1, attr_printf, attr_copy_rtx, evaluate_eq_attr,
	attr_alt_subset_p, attr_alt_subset_of_compl_p,
	attr_alt_intersection, attr_alt_union, optimize_attrs, gen_insn,
	write_test_expr, write_attr_value, write_eligible_delay,
	make_internal_attr, make_numeric_value): Likewise.
	* genautomata.c (regexp_name, get_str_vect,
	gen_presence_absence_set, automaton_decl_hash,
	automaton_decl_eq_p, insn_decl_hash, insn_decl_eq_p, decl_hash,
	decl_eq_p, process_regexp, loop_in_regexp, check_loops_in_regexps,
	process_regexp_cycles, reserv_sets_cmp, set_unit_reserv,
	test_unit_reserv, it_is_empty_reserv_sets,
	reserv_sets_are_intersected, reserv_sets_shift, reserv_sets_or,
	reserv_sets_and, output_cycle_reservs, get_free_state,
	intersected_state_reservs_p, states_union, remove_arc,
	copy_insn_regexp, transform_1, transform_2, transform_3,
	regexp_transform_func, store_alt_unit_usage,
	check_regexp_units_distribution, process_seq_for_forming_states,
	process_alts_for_forming_states, make_automaton,
	form_arcs_marked_by_insn, create_composed_state,
	set_out_arc_insns_equiv_num, partition_equiv_class,
	process_insn_equiv_class, set_insn_equiv_classes,
	units_to_automata_heuristic_distr, form_regexp,
	longest_path_length, output_dfa_max_issue_rate, add_vect,
	out_state_arcs_num, add_vect_el, output_trans_table,
	output_state_alts_table, output_dead_lock_vect,
	output_max_insn_queue_index_def,
	output_min_insn_conflict_delay_func,
	output_internal_insn_latency_func, output_print_reservation_func,
	output_cpu_unit_reservation_p, output_state_arcs,
	make_insn_alts_attr, make_internal_dfa_insn_code_attr,
	make_default_insn_latency_attr,
	form_important_insn_automata_lists): Likewise.
	* genemit.c (gen_exp, output_add_clobbers,
	output_added_clobbers_hard_reg_p): Likewise.
	* genextract.c (print_path, main): Likewise.
	* genflags.c (gen_macro): Likewise.
	* gengenrtl.c: Include errors.h
	(type_from_format, accessor_from_format): Likewise.
	* gengtype.c (get_file_basename, output_mangled_typename,
	walk_type, write_types_process_field,
	write_types_local_process_field): Likewise.
	* genmodes.c (complete_mode): Likewise.
	* genopinit.c (gen_insn): Likewise.
	* genoutput.c (output_insn_data, check_constraint_len,
	constraint_len): Likewise.
	* genpreds.c (add_mode_tests):Likewise.
	* gen-protos.c (add_hash): Likewise.
	* genrecog.c (find_operand, find_matching_operand,
	validate_pattern, add_to_sequence, maybe_both_true,
	nodes_identical_1, merge_trees, write_switch, write_cond,
	write_action, is_unconditional, make_insn_sequence,
	debug_decision_2): Likewise.
	* gensupport.c (is_predicable, collect_insn_data,
	alter_predicate_for_insn, maybe_eval_c_test): Likewise.

From-SVN: r87236
2004-09-09 13:22:38 +00:00
Zack Weinberg 9e995780d4 rtl.def: Wrap MD-only codes in #ifdef GENERATOR_FILE.
* rtl.def: Wrap MD-only codes in #ifdef GENERATOR_FILE.
	* gengtype.c: Don't include rtl.h.  Define enum rtx_code and
	rtx_name, rtx_format arrays by direct reference to rtl.def,
	first undefining GENERATOR_FILE.  Define enum insn_note and
	note_insn_name array by direct reference to insn-notes.def.
	(adjust_field_rtx_def): Remove local definition of rtx_name.
	Use symbolic names for insn notes.
	* Makefile.in (gengtype.o): Update dependencies.

From-SVN: r86499
2004-08-24 17:00:54 +00:00
Ziemowit Laski ad8c162bc1 gcc.c (default_compilers): Add info about ".mm", ".M" and ".mii" Objective-C++ extensions.
[gcc/ChangeLog]
2004-08-18  Ziemowit Laski  <zlaski@apple.com>

        * gcc.c (default_compilers): Add info about ".mm", ".M" and ".mii"
        Objective-C++ extensions.
        * gengtype.c (get_file_basename): Match entire subdirectory name
        ('cp', 'objc', 'objcp') rather than just its suffix.
        (get_base_file_bitmap): Allow for files to belong to more than one
        language.
        (get_output_file_with_visibility): Treat objc/objc-act.h as a header
        used by more than one front-end.

From-SVN: r86167
2004-08-18 01:58:13 +00:00
Zack Weinberg 7e7ec48e73 Makefile.in (RTL_BASE_H, RTL_H): Correct.
* Makefile.in (RTL_BASE_H, RTL_H): Correct.
	(BUILD_RTL): Remove $(BUILD_PREFIX) from ggc-none.o.
	(genobjs): Add errors.o, ggc-none.o, and min-insn-modes.o.
	(read-rtl.o, gensupport.o, genconfig.o, genflags.o, gencodes.o)
	(genconstants.o, genemit.o, genopinit.o, genrecog.o, genextract.o)
	(genpeep.o, genattr.o, genattrtab.o, genautomata.o, genoutput.o)
	(genconditions.o): Depend on $(RTL_BASE_H) not $(RTL_H).
	(ggc-none.o, errors.o): Move rule to generators section;
	correct dependencies.
	(min-insn-modes.o): Move rule to generators section; remove
	unnecessary explicit command; correct dependencies.
	(print-rtl.o, print-rtl1.o): Correct dependencies.
	($(BUILD_PREFIX_1)errors.o. $(BUILD_PREFIX_1)ggc-none.o): Delete rule.
	(mostlyclean): Update.

	* errors.c: Include bconfig.h not config.h.  Correct comment.
	* gengtype.c, genpreds.c: Don't define NO_GENRTL_H.
	* ggc-none.c: Include bconfig.h; not config.h or tm.h.
	* print-rtl.c: Don't include tm_p.h.

	* rtl.h: Move forward-decl of struct function down where it's
	needed.  Include genrtl.h #ifndef GENERATOR_FILE, not
	#ifndef NO_GENRTL_H.  Remove unnecessary #ifdef BUFSIZ statements.

From-SVN: r85574
2004-08-04 20:55:08 +00:00
Gabriel Dos Reis 9e2878cff2 gengtype.h (options::info): Change type to const char *.
* gengtype.h (options::info): Change type to const char *.
        (enum gc_used_enum): Move out of struct type scope.
        * gengtype.c (create_option): Convert initializer for
        option::info to
        appropiate type.
        (adjust_field_type, walk_type, write_func_for_structure,
        write_root, write_roots): Remove pointless cast.

From-SVN: r85436
2004-08-02 12:48:49 +00:00
Gabriel Dos Reis 9ce88f5e94 rtl.h (union rtunion_def): Have all members start with the prefix "rt_".
* rtl.h (union rtunion_def): Have all members  start with the
        prefix "rt_".
        (XINT, XSTR, XEXP, XVEC, XMODE, XBITMAP, XTREE, XBBDEF, XTMPL,
        X0INT, X0UINT, X0STR, X0EXP, X0VEC, X0MODE, X0BITMAP, X0TREE,
        X0MEMATTR, X0BBDEF, X0REGATTR, XCINT, XCUINT, XCSTR, XCEXP,
        XCVEC, XCMODE, XCBITMAP, XCTREE, XCBBDEF, XC2EXP): Adjust
        members
        access.
        * gengtype.c (adjust_field_rtx_def): Likewise.
        * rtlanal.c (loc_mentioned_in_p): Likewise.

From-SVN: r85434
2004-08-02 10:29:26 +00:00
Bernardo Innocenti cca8ead2b9 gengtype.c (oprintf): Replace xrealloc () with XRESIZEVEC ().
* gengtype.c (oprintf): Replace xrealloc () with XRESIZEVEC ().
	* gengtype-yacc.y: Likewise.  Replace free() with XDELETE ().
	* c-typeck.c (PUSH_SPELLING): Remove redundant NULL-pointer
	check on invocation of XRESIZEVEC ().

From-SVN: r85177
2004-07-26 03:33:36 +02:00
Bernardo Innocenti 5d038c4cb1 bitmap.c: Use type-safe memory allocation macros from libiberty.
* bitmap.c: Use type-safe memory allocation macros from libiberty.
	* c-common.c: Likewise.
	* c-decl.c: Likewise.
	* c-lang.c: Likewise.
	* c-lex.c: Likewise.
	* c-opts.c: Likewise.
	* c-parse.in: Likewise.
	* c-typeck.c: Likewise.
	* genconditions.c: Likewise.
	* gengtype-lex.l: Likewise.
	* gengtype-yacc.y: Likewise.
	* gengtype.c: Likewise.
	* genmodes.c: Likewise.
	* gensupport.c: Likewise.
	* read-rtl.c: Likewise.
	* read-rtl.c (read_constants): Use INSERT instead of TRUE in call to
	htab_find_slot().

From-SVN: r85163
2004-07-25 22:43:23 +02:00
Bernardo Innocenti e18476eb94 c-common.c: Convert ATTRIBUTE_UNUSED to ARG_UNUSED in parameter lists.
* c-common.c: Convert ATTRIBUTE_UNUSED to ARG_UNUSED in parameter
	lists.
	* c-decl.c: Likewise.
	* c-format.c: Likewise.
	* c-lex.c: Likewise.
	* c-opts.c: Likewise.
	* c-pragma.c: Likewise.
	* c-typeck.c: Likewise.
	* gencheck.c: Likewise.
	* genconditions.c: Likewise.
	* genconfig.c: Likewise.
	* genflags.c: Likewise.
	* gengtype.c: Likewise.
	* gensupport.c: Likewise.
	* ggc-none.c: Likewise.
	* langhooks.c: Likewise.
	* statistics.h: Likewise.
	* stub-objc.c: Likewise.
	* java/decl.c: Likewise.

From-SVN: r85128
2004-07-25 02:13:01 +02:00
Richard Henderson ac45df5dba except.c (expand_eh_region_start, [...]): Remove.
* except.c (expand_eh_region_start, expand_eh_region_end,
	expand_eh_handler, expand_eh_region_end_cleanup,
	expand_start_all_catch, expand_start_catch, expand_end_catch,
	expand_end_all_catch, expand_eh_region_end_allowed,
	expand_eh_region_end_must_not_throw, expand_eh_region_end_throw,
	expand_eh_region_end_fixup): Remove.
	* stmt.c (struct nesting): Remove stack_level, innermost_stack_block,
	cleanups, outer_cleanups, label_chain, exception_region.
	(struct goto_fixup): Remove stack_level, cleanup_list_list.
	(struct label_chain): Remove.
	(struct stmt_status): Remove x_stack_block_stack.
	(stack_block_stack, expand_goto_internal, expand_fixup, expand_fixups,
	fixup_gotos, save_stack_pointer, expand_decl_cleanup,
	expand_decl_cleanup_eh, expand_cleanups, start_cleanup_deferral,
	end_cleanup_deferral, last_cleanup_this_contour,
	containing_blocks_have_cleanups_or_stack_level,
	any_pending_cleanups): Remove.
	(expand_null_return_1): Take no arguments.
	(expand_label, expand_naked_return, expand_return,
	expand_start_bindings_and_block, expand_end_bindings, expand_decl,
	expand_anon_union_decl, expand_start_case, pushcase, pushcase_range,
	expand_end_case_type): Don't use any of them.
	* calls.c (expand_call): Likewise.
	* dojump.c (do_jump): Likewise.
	* function.c (expand_function_end): Likewise.
	* expr.c (store_expr, expand_expr_real_1): Likewise.
	(safe_from_p): Don't handle WITH_CLEANUP_EXPR, CLEANUP_POINT_EXPR.
	(expand_expr_real_1): Don't handle WITH_CLEANUP_EXPR,
	CLEANUP_POINT_EXPR, TARGET_EXPR, TRY_CATCH_EXPR, CATCH_EXPR,
	EH_FILTER_EXPR, TRY_FINALLY_EXPR, GOTO_SUBROUTINE_EXPR.
	* fold-const.c (fold_checksum_tree): Use first_rtl_op.
	* gengtype.c (adjust_field_tree_exp): Remove rtl op handling.
	* gimplify.c (gimplify_cleanup_point_expr): Renumber operands
	for WITH_CLEANUP_EXPR.
	(gimple_push_cleanup): Likewise.
	* integrate.c (copy_decl_for_inlining): Don't DECL_TOO_LATE.
	* print-tree.c (print_node): Likewise.
	* tree-pretty-print.c (dump_generic_node): Remove GOTO_SUBROUTINE_EXPR.
	* tree.c (first_rtl_op): Always just TREE_CODE_LENGTH.
	(has_cleanups): Remove GOTO_SUBROUTINE_EXPR.
	* tree.def (WITH_CLEANUP_EXPR): Remove op1 and op2.
	(GOTO_SUBROUTINE_EXPR): Remove.
	* tree.h (WITH_CLEANUP_EXPR_RTL): Remove.
	(DECL_TOO_LATE): Remove.
	* except.h, tree.h: Update decls.
ada/
	* trans.c (gnat_to_gnu <N_Handled_Sequence_Of_Statements>): Update
	commentary.
cp/
	* cp-tree.h (expand_eh_spec_block): Remove.
java/
	* expr.c (case_identity, get_primitive_array_vtable,
	java_expand_expr, emit_init_test_initialization): Remove.
	* java-tree.h (java_expand_expr): Remove.
	* lang.c (LANG_HOOKS_EXPAND_EXPR): Remove.

From-SVN: r84275
2004-07-08 00:46:07 -07:00
Richard Henderson 82c8274320 c-decl.c (grokdeclarator): Don't frob current_function_decl around variable_size.
* c-decl.c (grokdeclarator): Don't frob current_function_decl
        around variable_size.
        (set_decl_nonlocal): Remove.
        (store_parm_decls): Add stmts for pending sizes.
        * calls.c (calls_function, calls_function_1): Remove.
        (precompute_arguments): Don't call it.
        * cfgexpand.c (set_save_expr_context): Remove.
        (tree_expand_cfg): Don't call it.
        * dwarf2out.c (add_bound_info): Don't handle SAVE_EXPR.
        (dwarf2out_finish): Likewise.
        * expr.c (emit_block_move): Adjust addresses to BLKmode.
        (store_constructor): Don't pre-evaluate SAVE_EXPR.
        (safe_from_p): Don't queue SAVE_EXPRs.
        (expand_expr_real_1 <case SAVE_EXPR>): Rewrite to expect,
        or build plain VAR_DECLs.
        * fold-const.c (twoval_comparison_p): Don't look at SAVE_EXPR_RTL.
        (fold): Likewise.
        (fold_checksum_tree): Don't special-case SAVE_EXPR.
        * function.c (free_after_compilation): Don't clear x_save_expr_regs.
        (put_var_into_stack): Don't handle SAVE_EXPR.
        (gen_mem_addressof): Likewise.
        * function.h (struct function): Remove x_save_expr_regs.
        (save_expr_regs): Remove.
        * gengtype.c (adjust_field_tree_exp): Don't special-case SAVE_EXPR.
        * print-tree.c (print_node): Don't dump SAVE_EXPR_NOPLACEHOLDER.
        * stor-layout.c (variable_size): Don't set it.
        (force_type_save_exprs, force_type_save_exprs_1): Remove.
        * tree-inline.c (remap_save_expr): Remove fn argument.  Update
        all callers.  Don't set SAVE_EXPR_CONTEXT.
        * tree-inline.h (remap_save_expr): Update decl.
        * tree.c (save_expr): Update build size.
        (first_rtl_op): Don't handle SAVE_EXPR.
        (unsave_expr_1, contains_placeholder_p): Likewise.
        (decl_function_context): Likewise.
        * tree.def (SAVE_EXPR): Remove args 1 and 2.
        * tree.h (SAVE_EXPR_CONTEXT, SAVE_EXPR_RTL): Remove.
        (SAVE_EXPR_NOPLACEHOLDER, SAVE_EXPR_PERSISTENT_P): Remove.
cp/
        * tree.c (cp_unsave_r): Update remap_save_expr call.
java/
        * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.

From-SVN: r84036
2004-07-02 17:15:50 -07:00
Richard Henderson 4dfa034295 tree.def (RTL_EXPR): Remove.
* tree.def (RTL_EXPR): Remove.
        * c-typeck.c (lvalue_p): Don't handle it.
        * expr.c (safe_from_p): Likewise.
        (expand_expr_real_1): Likewise.
        * fold-const.c (non_lvalue, operand_equal_p, fold): Likewise.
        (fold_checksum_tree, tree_expr_nonnegative_p): Likewise.
        * gengtype.c (adjust_field_tree_exp): Likewise.
        * stmt.c (warn_if_unused_value): Likewise.
        * tree-gimple.c (recalculate_side_effects): Likewise.
        * tree-pretty-print.c (dump_generic_node): Likewise.
        * tree.c (make_node_stat, first_rtl_op, unsave_expr_1): Likewise.
        (unsafe_for_reeval, stabilize_reference, build1_stat): Likewise.
        * tree.h (RTL_EXPR_SEQUENCE, RTL_EXPR_RTL, RTL_EXPR_ALT_RTL): Remove.

        * stmt.c (struct stmt_status): Remove x_last_expr_type,
        x_last_expr_value, x_last_expr_alt_rtl, x_expr_stmts_for_value.
        (last_expr_type, last_expr_value, last_expr_alt_rtl): Remove.
        (expand_expr_stmt): Merge with expand_expr_stmt_value.  Remove
        all the bits that tracked last_expr.
        (expand_end_bindings): Don't track last_expr.
        (expand_start_stmt_expr, expand_end_stmt_expr): Remove.
        (clear_last_expr): Remove.
        (expand_asm): Don't call it.
        (expand_asm_operands, expand_end_cond): Likewise.
        (expand_naked_return, expand_null_return_1): Likewise.
        * c-typeck.c (c_begin_compound_stmt): Likewise.
        * cfgexpand.c (expand_block): Use expand_expr_stmt.
        * expr.c (expand_expr_real_1): Likewise.
        * tree.h: Update prototypes.

        * function.h (struct sequence_stack): Remove sequence_rtl_expr.
        (struct emit_status): Remove sequence_rtl_expr.
        (struct function): Remove x_rtl_expr_chain.
        (seq_rtl_expr, rtl_expr_chain): Remove.
        * function.c (struct temp_slot): Remove rtl_expr.
        (assign_stack_temp_for_type): Don't set it.
        (free_temp_slots, pop_temp_slots): Don't check it.
        (free_after_compilation): Don't clear x_rtl_expr_chain.
        (fixup_var_refs): Don't search it.
        (preserve_rtl_expr_result, free_temps_for_rtl_expr): Remove.
        * emit-rtl.c (start_sequence): Don't use sequence_rtl_expr
        or seq_rtl_expr.
        (push_topmost_sequence): Likewise.
        (end_sequence, init_emit): Likewise.
        (start_sequence_for_rtl_expr): Remove.
        * expmed.c (make_tree): Build a VAR_DECL instead of an RTL_EXPR.
        * rtl.h (preserve_rtl_expr_result): Remove.

ada/
        * trans.c (gnat_stabilize_reference): Don't handle RTL_EXPR.
        * utils.c (max_size): Likewise.

cp/
        * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
        * method.c (synthesize_method): Don't clear_last_expr.
        * name-lookup.c (maybe_push_cleanup_level): Likewise.

From-SVN: r84009
2004-07-01 18:15:43 -07:00
Per Bothner 9506ac2be5 Conditionally compile support for --enable-mapped_location.
* gengtype-lex.l:  Temporary kludge to avoid duplicate typedef.
	* gengtype.c:  Update for now typdefs in input.h.  More kludges.
	* modulo-sched.c (sms_schedule):  Use NOTE_EXPANDED_LOCATION macro.
	* ra-debug.c (ra_print_rtl):  Likewise.
	* sched-rgn.c:  Likewise.
	* sched-vis.c:  Likewise.
	* rtl.h (gen_rtx_ASM_OPERANDS):  Redefine if USE_MAPPED_LOCATION.
	* stmt.c (expand_asm_operands):  Adjust calls to gen_rtx_ASM_OPERANDS.
	* tree-cfg.c:  Use new macros and typedefs.
	* tree-flow-inline.h:  Likewise.

From-SVN: r83922
2004-06-30 11:21:54 -07:00
Sebastian Pop c8a2ab6d0c Makefile.in (OBJS-common): Add tree-chrec.o.
* Makefile.in (OBJS-common): Add tree-chrec.o.
	(tree-chrec.o): New rule.
	(GTFILES): Add tree-chrec.h.
	* gengtype.c (open_base_files): Add tree-chrec.h.
	* tree-chrec.c: New file.
	* tree-chrec.h: New file.
	* tree.def (SCEV_KNOWN, SCEV_NOT_KNOWN, POLYNOMIAL_CHREC): New nodes.

From-SVN: r83909
2004-06-30 15:37:42 +00:00