ChangeLog.apple-ppc   [plain text]


2004-06-12  Devang Patel  <dpatel@apple.com>

        * Makefile.in (OBJS-common): Add tree-if-conv.o.
        (tree-if-conv.o): New rule.
        * target-def.h (TARGET_VECTOR_COMPARE_P, TARGET_VECTOR_COMPARE_FOR_P,
        TARGET_VECTOR_COMPARE_STMT, TARGET_VECTOR_SELECT_P, 
        TARGET_VECTOR_SELECT_FOR_P, TARGET_VECTOR_SELECT_STMT): New.
        (TARGET_INITIALIZER): New members.
        * target.h (tree.h): Include.
        (struct gcc_target.vect): New members - support_vector_compare_p,
        support_vector_compare_for_p, vector_compare_stmt, support_vector_select_p,
        support_vector_select_for_p, vector_select_stmt.
        * tree-dfa.c (dump_immediate_uses_for): Print block index.
        * tree-flow.h (enum  move_pos): Move from ...
        * tree-ssa-loop-im.c (enum move_pos): here.
        * tree-if-conv.c: New file.
        * tree-simple.c (is_gimple_stmt): Make COND_EXPR valid gimple.
        * tree-ssa-dce.c (mark_control_dependent_edges_necessary): Check t.
       * tree-ssa-live.c (debug_var_map): New function.
        * tree-ssa-live.h (debug_var_map): New function declaration.
        * tree-ssa-loop-ivcanon.c (canonicalize_loop_induction_variable): Add
        flow_loop_scan() call.
        * tree-ssa-operands (get_stmt_operands): Handle MODIFY_EXPR when COND_EXPR
        is RHS.
        (get_expr_operands): Same.
        * tree-ssanames.c (make_ssa_name): Do not use free_ssanames.
        (release_ssa_name): Same.
        * tree-vectorizer.c (vect_transform_select): New function.
        (vect_transform_compare): New function
        (vect_is_supportable_operation): New function.
        (vect_is_supportable_compare): New function.
        (vect_is_supportable_select): New function.
        (get_array_base): Move into tree.c.
        (vect_loop_version): New function.
        (second_loop_vers_available): New variable.
        (default_vector_compare_p): New function.
        (default_vector_compare_for_p): New function.
        (default_vector_comapre_stmt): New function.
        (default_vector_select_p): New function.
        (default_vector_select_for_p): New function.
        (default_vector_select_stmt): New function.
        (vect_transform_stmt): Handle select_vec_info_type and 
        compare_vec_info_type.
        (vect_is_supportable_op): Use vect_is_supportable_operation.
        (vect_analyze_operations): Check select and compare support.
        (vect_analyze_data_refs_alignment): Print data reference in dump file.
        (vect_analyze_loop_form): Use if-conversion and update loop->num_nodes
        check.
        (vectorize_loops): Use vect_loop_version. Handle second loop version.
        * tree-vectorizer.h (struct _stmt_vec_info): New members - 
        select_vec_info_type and compare_vec_info_type.
        (default_vector_compare_p): New function decl.
        (default_vector_compare_for_p): New function decl.
        (default_vector_comapre_stmt): New function decl.
        (default_vector_select_p): New function decl.
        (default_vector_select_for_p): New function decl.
        (default_vector_select_stmt): New function decl.
        * tree.c (get_array_base): Move from tree-vectorizer to here.
        * tree.h (get_array_base): New function decl.
        * config/rs6000 (vector_builtin_fns): New.
        (rs6000_vector_compare_p): New function.
        (rs6000_vector_compare_for_p): New function.
        (rs6000_vector_compare_stmt): New function.
        (rs6000_vector_select_p): New function.
        (rs6000_vector_select_for_p): New function.
        (rs6000_vector_select_stmt): New function.
        (TARGET_VECTOR_COMPARE_P, TARGET_VECTOR_COMPARE_FOR_P,
        TARGET_VECTOR_COMPARE_STMT, TARGET_VECTOR_SELECT_P, 
        TARGET_VECTOR_SELECT_FOR_P, TARGET_VECTOR_SELECT_STMT): Define.
        (def_builtin): Record builtin fn node in vector_builtin_fns.
        * rs6000.h (enum rs6000_builtins):  New entry - RS6000_BUILTIN_MAX.

2004-06-12  Devang Patel  <dpatel@apple.com>

	Radar 3681611
	* gcc.c (do_spec_1):  Disable local IMA patch that creats new temp. file for 
	each source file. 

2004-06-12  Dorit Naishlos  <DORIT@il.ibm.com>
	    Olga Golovanevsky  <OLGA@il.ibm.com>
	    Ayal Zaks  <ZAKS@il.ibm.com>

	* tree-vectorize.c (vect_build_symbl_bound, vect_gen_if_guard): New.
	(vect_create_index_for_array_ref): Use integer_zer_node as init.
	(vect_update_initial_conditions_of_duplicated_loop): Update phis of epilog
	loop header and new loop exit destination.
	(vect_transform_loop): Remove code that now belongs to
	vect_generate_tmps_on_preheader () function. Use
	vect_gen_if_guard function twice.

2004-06-11  Dale Johannesen  <dalej.@apple.com>
	* tree-ssa-loop-niter.c (number-of_iterations_cond): Apply Zdenek's
	patch from 5/28 lno-branch.

2004-06-10  Dale Johannesen  <dalej@apple.com>
	* tree-scalar-evolution.c (scev_finalize): Remove wild load.

2004-06-10  Fariborz Jahanian <fjahanian@apple.com>
	* version.c: Change version date to 20040529 (date of
	last merge).

2004-06-09  Dale Johannesen  <dalej@apple.com>
	* df.c (df_def_record_1): Handle DImode parallel.

2004-06-09  Fariborz Jahanian <fjahanian@apple.com>
	* gengtype.c (get_output_file_with_visibility): Removed dead code.
	* gimplify.c (copy_if_shared_r): brought in patch to PR15884 done
	by RTH to fix perlbmk crash.

2004-06-08  Dale Johannesen  <dalej@apple.com>
	* config/rs6000/t-darwin:  Remove duplicate fpsave.

2004-06-08  Andrew Pinski  <pinskia@physics.uc.edu>
	approved Dale Johannesen <dalej@apple.com>
	Radar 3683113, PR 15881.
	* fold.const.c (fold_convert):  Handle ptr-to-member.
	* tree-scalar-evolution.c (count_ev_in_wider_type):  Use
	fold_convert not convert.
	(compute_overall_effect_of_inner_loop): Ditto.
	(chrec_is_positive): Ditto.
	(add_to_evolution_1):  Ditto.
	(add_to_evolution): Ditto.
	(first_iteration_non_satisfying_1): Ditto.
	(follow_ssa_edge_in_rhs): Ditto.
	(interpret_rhs_modify_expr): Ditto.
	(number_of_iterations_in_loop): Ditto.

2004-06-08 Robert Bowdidge <bowdidge@apple.com>
	* config/darwin.c (machopic_indirect_call_target): Added patch from
        PR/15720 (function marked inline which is called directly isn't
	emitted).

2004-06-08  Fariborz Jahanian <fjahanian@apple.com>
	* varasm.c (assemble_variable): Resotored zerofill size optimization.
	* config/rs6000/rs6000.c (rs6000_override_options): Place 
	rs6000_init_hard_regno_mode_ok after setting of -fast flags.

2004-06-08  Caroline Tice  <ctice@apple.com>
        
        * common.opt (fcreate-profile):  Add new command line option.
	(fuse-profile): Likewise.
	* gcc.c (LINK_COMMAND_SPEC):  Add fcreate-profile to list of flags
	that causes "-lgcov" to be included in link command.
	* opts.c (commmon_handle_option):  Add cases for fcreate-profile and
	fuse-profile; make them fall into the cases for fprofile-generate
	and fprofile-use, respectively.
	* config/darwin.h (LINK_COMMABND_SPEC):  Add fcreate-profile to list
	of flags that causes "-lgcov" to be included in link command.
	* doc/invoke.texi (fcreate-profile, fuse-profile):  Add documentation
	for the new command line options.  Indicates they are obsolete and
	should not be used.

2004-06-07  Fariborz Jahanian <fjahanian@apple.com>
	* gcc.c: Removed setting of -combine option with -fast.

2004-06-07  Fariborz Jahanian <fjahanian@apple.com>
	* decl.c (maybe_commonize_var): Removed APPLE LOCAL coalescing stuff.
	* method.c (use_thunk): ditto.
	* rtti.c (tinfo_base_init): ditto.
	* common.opt: ditto.

2004-06-07  Dale Johannesen  <dalej@apple.com>

	* cse.c (cse_insn):  Make sure there's a ZERO_EXTEND before looking
	under it.  (176.gcc spec regression)

2004-06-07  Ayal Zaks <zaks@il.ibm.com>

	Radar 3619935 - Part 1	
	* target-def.h (TARGET_VECT, TARGET_VECT_BUILD_BUILTIN_LVSL,
	TARGET_VECT_SUPPORT_MISALIGNED_LOADS,
	TARGET_VECT_PERMUTE_MISALIGNED_LOADS,
	TARGET_VECT_BUILD_BUILTIN_VPERM): New macros for
	TARGET_INITIALIZER.
	* target.h (struct vect): New substruct of gcc_target.
 	* tree-vectorizer.c (vect_create_index_for_array_ref): Return also the
 	initial value of the iv.
 	(vect_create_data_ref): Return also the created pointer; don't call
	vect_align_data_ref.
	(vect_finish_stmt_generation): New.
	(vect_transform_load): Handle misaligned loads too.
	(vect_analyze_data_refs_alignment): Allow loads to be misaligned.
	* config/rs6000/rs6000.c (TARGET_VECT_BUILD_BUILTIN_LVSL,
	TARGET_VECT_SUPPORT_MISALIGNED_LOADS,
	TARGET_VECT_PERMUTE_MISALIGNED_LOADS,
	TARGET_VECT_BUILD_BUILTIN_VPERM): Redefine.
	(rs6000_support_misaligned_vloads, rs6000_permute_misaligned_vloads,
	rs6000_build_builtin_lvsl, rs6000_build_builtin_vperm): New.

2004-06-07  Olga Golovanevsky  <OLGA@il.ibm.com>

	* tree-vectorizer.c (vect_update_initial_conditions_of_duplicated_loop):
	Handle general form of "init" and "step" of access function.
	* tree-ssa-loop-manip.c (tree_duplicate_loop_to_exit_cfg):
	The exit from loop is taken from bb previous to latch instead
	of latch itself.

2004-06-07  Devang Patel  <dpatel@apple.com>

	Radar 3673334
	* config/darwin-driver.c (add_arch): New.
	(strip_path_and_suffix): Use strcpy.
	(main): Use add_arch().

2004-06-07  Devang Patel  <dpatel@apple.com>

	Radar 3668208 and 3668213
	* config/rs6000/darwin.h (CC1_SPEC): Handle -gused and -gfull.
	* config/i386/darwin.h (CC1_SPEC): Same.

2004-06-07  Caroline Tice  <ctice@apple.com>

	* doc/invoke.texi (-fast): Add documentation for "-fast" option.
	
2004-05-29  Dale Johannesen  <dalej@apple.com>

	* config/rs6000/rs6000.c (rs6000_override_options):  Enable 
	hot/cold partitioning with -fast -profile-use.

2004-05-28  Ziemowit Laski  <zlaski@apple.com>

	Radar 3665286
	* cpplex.c (_cpp_peek_token): Fix bug in computing context size;
	increment/decrement 'keep_tokens' state instead of saving/restoring it.
	* cpplib.h (cpp_callbacks): Change 'expand_macro_p' hook to
	'macro_to_expand', returning a cpp_hashnode pointer.
	* cppmacro.c (cpp_get_token): Call 'macro_to_expand' hook instead of
	'expand_macro_p'.
	(warn_of_redefinition): Do not warn if redefining a conditional macro.
	* config/rs6000/rs6000-c.c (altivec_categorize_keyword): New function.
	(rs6000_expand_macro_p): Renamed to 'rs6000_macro_to_expand'; rewritten
	to call altivec_categorize_keyword() and return one of the three
	canonical macros ('__vector', '__pixel' and '__bool') as needed.
	(rs6000_cpu_cpp_builtins): Mark all AltiVec keyword variants as
	conditional macros, some expanding to themselves (e.g., '#define
	bool bool') by default.
	* config/rs6000/rs6000-protos.h (rs6000_expand_macro_p): Renamed to
	'rs6000_macro_to_expand'.

2004-05-28  Fariborz Jahanian <fjahanian@apple.com>

        * explow.c (copy_to_mode_reg): For PARALLEL patterns, copy
        to reg via a temprary.

2004-05-27  Dale Johannesen  <dalej@apple.com>

	* loop-invariant.c (check_maybe_invariant):  Disallow CALL hoists.
	* varasm.c (assemble_start_function): Construct unlikely_section_label
	unconditionally.

2004-05-26  Caroline Tice <ctice@apple.com>

	* bb-reorder.c (find_rarely_executed_basic_blocks_and_crossing_edges):
	Initialize variable 'has_hot_blocks'.
	(fix_up_fall_thru_edges):  Initialize variable'cond_jump'.
	* cfgcleanup.c (try_forward_edges):  Add code/tests to make sure the
	optimization is not attempted across section boundaries.
	* cfglayout.c (fixup_reorder_chain):  Correct comments.
	* cfgrtl.c (try_redirect_by_replacing_jump):  Fix test to make sure
	optimization is not attempted across section boundaries.
	* final.c (final_scan_instruction): Replace calls to text_section with
	calls to function_section.
	* predict.c (probably_never_executed_bb_p): Change criterion to be
	basic block count equals zero.
	* varasm.c (unlikely_text_section_name): New global variable.
	(text_section): Remove call to assemble_align.
	(unlikely_text_section):  Modify to build & use unlikely_text_section_name
	rather than directly using UNLIKELY_EXECUTED_TEXT_SECTION NAME; remove
	call to assemble_align; move code to free/initialize 
	unlikely_section_label to assemble_start_function.
	(in_unlikely_text_section):  Modify to use unlikely_text_section_name.
	(named_section): Add code to initialize unlikely_text_section_name if
	appropriate.
	(function_section): Reorder clauses in if statement to make sure
	functions containing only cold blocks end up in the correct section.
	(assemble_start_function):  Add code to correctly initialize/free
	unlikely_text_section_name.  Also make sure the cold label is printed
	out at the start of cold functions.
	(default_section_type_flags_1): Modify to use unlikely_text_section_name.
	* config/rs6000/darwin.h (HAS_LONG_UNCOND_BRANCH):  Add darwin-specific
	definition, based on the TARGET_LONG_BRANCH (-mlongcall) flag.

2004-05-25  Dale Johannesen  <dalej@apple.com>

	* tree-ssa-loop-niter.c: Add.  New in lno branch.  Oops.

2004-05-25  Mike Stump  <mrs@apple.com>

	Radar 3665096
	* config/i386/darwin.h (TARGET_SUBTARGET_DEFAULT): Change default
	for long double type size to be 128.

2004-05-25  Dale Johannesen  <dalej@apple.com>

	Merge from LNO branch as of 05-18.  
	--The following files are identical to lno branch:
	df.c:  Merge.
	lambda-code.c:  Merge.
	loop-iv.c:  Merge.
	tree-chrec.c:  Merge.
	tree-chrec.h:  Merge.
	tree-data-ref.c:  Merge.
	tree-data-ref.h:  Merge.
	tree-elim-check.c:  Merge.
	tree-fold-const.h:  Merge.
	tree-scalar-evolution.c:  Merge.
	tree-scalar-evolution.h:  Merge.
	tree-ssa-loop-ivcanon.c:  Merge.
	tree-ssa-loop-ivopts.c:  Merge.
	tree-vectorizer.c:  Merge.
	--These files were merged selectively, see lno branch ChangeLog.lno.
	Makefile.in:  Add tree-ssa-loop-niter.
	cfgloop.c: Merge changes from Devang's 05-13 patch.
	cfgloop.h: Ditto, also Zdenek's 04-30 patch.
	expr.c:  Merge changes from Zdenek's 05-13 patch.
	tree-cfg.c:  Ditto.
	tree-flow.h:  Ditto.  Also from Zdenek's 04-30 patch.
	loop-invariant.c:  Merge.  Add DF_EQUIV_NOTES.
	rtl.h:  Merge change from Zdenek's 05-09 patch.
	stor-layout.c:  Ditto.
	tree.c:  Merge change from Sebastian's 04-27 patch.
	tree.h:  Ditto.  Also Zdenek's 05-13 patch.  Add TYPE_UNSIGNED.
	varasm.c:  Merge change from Zdenek's 04-30 patch.
	config/rs6000/rs6000.c:  Ditto.
	-- Other stuff:
	fold-const.c:  Remove unused variable.
	config/rs6000/rs6000-c.c:  Make #define of bool work.
	config/rs6000/t-rs6000:  Make #define of bool work.  Remove 
	-Wno-error requirements.

2004-05-25  Mike Stump  <mrs@apple.com>

	Radar 3667005
	* config/darwin.h (SUBSUBTARGET_OVERRIDE_OPTIONS): Move long
	double size default from here...
	* config/rs6000/darwin.h (SUBTARGET_OVERRIDE_OPTIONS): to here.

2004-05-24  Devang Patel  <dpatel@apple.com>

	Radar 3665390
	* config/darwin-driver.h (main): While reinserting output filename
	do not forget -o.

2004-05-24  Mike Stump  <mrs@apple.com>

	Radar 3589079
	* config/darwin.h (SUBSUBTARGET_OVERRIDE_OPTIONS): Change default
	for long double type size to be 128.
	* c-common.c: Change default for -Wwarn-long-double to off.
	(warn_about_long_double): Change wording to account for new long
	double size.
	* doc/invoke.texi (-Wlong-double): Likewise.
	
2004-05-22  Devang Patel  <dpatel@apple.com>

	Radar 3644687
	* config/darwin-driver.c (main): Reinsert output filename
	only if user supplied one.

2004-05-22  Dale Johannesen  <dalej@apple.com>

	* simplify-rtx.c (simplify_unary_operation):  Don't create NOT(SYM)
	or (MINUS(CON SYM)).
	* config/rs6000/rs6000.h (machine_function):  Make substitute_pic_base_reg
	unsigned.
	* config/rs6000/rs6000.md:  Compare it to INVALID_REGNUM not -1.
	* config/rs6000/rs6000.c (throughout):  Ditto.

2004-05-21  Ziemowit Laski  <zlaski@apple.com>

	* opts.c (common_handle_option): Do not const-qualify a char buffer
	that has sprintf() and free() called on it.

2004-05-21  Ziemowit Laski  <zlaski@apple.com>

	Radar 3621323
	* c-lex.c: Do not include target.h.
	(C_LEX_BUFCAPACITY, C_LEX_OFFS_BOUND, c_lex_buf_beg, c_lex_buf_end,
	c_lex_buf, c_lex_peek, c_lex_prepend): Remove.
	(get_nonpadding_token): Get rid of int argument; adjust call sites
	accordingly.
	* cpplex.c (_cpp_peek_token): New function.
	(_cpp_temp_token): Account for existence of lookaheads when allocating
	token.
	* cpplib.h (cpp_callbacks): Add new 'expand_macro_p' hook.
	(NODE_CONDITIONAL): New flag for macro nodes.
	(_cpp_peek_token, _cpp_backup_tokens_direct): New prototypes.
	* cppmacro.c (cpp_get_token): For macros marked NODE_CONDITIONAL,
	call the 'expand_macro_p' predicate to see if they should be
	expanded.
	(_cpp_backup_tokens_direct): New function, broken off from
	_cpp_backup_tokens().
	(_cpp_backup_tokens): Call _cpp_backup_tokens_direct().
	* config/rs6000/rs6000-c.c (rs6000_expand_macro_p): Add cpp_reader
	parameter; call _cpp_peek_token() instead of c_lex_peek().
	(rs6000_cpu_cpp_builtins): Attach rs6000_expand_macro_p() to a
	cpplib callback instead of a target hook.
	* config/rs6000/rs6000-protos.h (rs6000_expand_macro_p): Add cpp_reader
	parameter to prototype.
	* hooks.c (hook_bool_constcpp_tokenp_false): Remove.
	* hooks.h (hook_bool_constcpp_tokenp_false): Remove prototype.
	* target-def.h (TARGET_EXPAND_MACRO_P): Remove.
	* target.h (gcc_target): Remove 'expand_macro_p' target hook.

2004-05-20  Devang Patel  <dpatel@apple.com>
 
	* config/darwin-driver.c (main): Prepand "-Wl," before
	-final_output to make it linker option.

2004-05-20  Fariborz Jahanian <fjahanian.apple.com>

	* c-opts.c (c_common_post_options): Remove old declaration and
	use of stdin_filename. Add new call to set_stdin_option.
	* common.opt: Add fpredictive-compilation=n option.
	* cppfiles.c (STAT_SIZE_RELIABLE macro): Change definition.
	(pch_open_file): No pch stuff with stdin file.
	(find_file_in_dir): When opening the main file, revert
	to opening stdin instead, in predictive compilation mode.
	(read_file_guts): Support for reading from stdin for predictive
	compilation sizes are added. (read_file): Don't close stdin.
	(read_from_stdin): New routine.
	* cpphash.h: New field declaration 'is_main_file' added.
	* cppinit.c (cpp_read_main_file): Set is_main_file to true,
	and then to false in predictive compilation mode.
	* cpplex.c (_cpp_get_fresh_line): Read more from stdin when
	in predictive compilation mode.
	* cpplib.c (set_stdin_option): New definition.
	* cpplib.h: Declaration updates.
	* flags.h: Declaration of predictive_compilation.
	* opts.c (common_handle_option): Processing -fprdictive-compilation=n
	options.
	* toplev.c: Definition of predictive_compilation added.

2004-05-14  Dale Johannesen  <dalej@apple.com>

	* Makefile.in:  Remove local -Wno-error dependencies.

2004-05-13  Caroline Tice  <ctice@apple.com>
        
        * c-common.c (builtin_function_disabled_p):  Remove "static" from
	function declaration and definition.
	* c-common.h (builtin_function_disabled_p):  Add extern function
	definition.
	* c-decl.c (merge_translation_unit_decls):  Add code to test
	function decls to see if they are builtin and the builtin is
	supposed to be disabled before attempting to merge the decls.

2004-05-12  Devang Patel  <dpatel@apple.com>

	* opts.c (common_handle_option): Handle OPT_arch.

2004-05-12  Devang Patel  <dpatel@apple.com>

	* config/darwin.h (darwin_builtins): Move to ...
	* config/darwin.c (darwin_builtins); here.

2004-05-12  Dale Johannesen  <dalej@apple.com>

	Radar 3509006

	* config/rs6000/rs6000.c (rs6000_override_options):
	Don't enable string insns with -Os.
	* doc/invoke.texi:  Document this behavior.
	* testsuite/gcc.apple/string-insns.c:  New.

2004-05-12  Dale Johannesen  <dalej@apple.com>

	* config/rs6000/rs6000.c (rs6000_stack_info):  Restore an
	optimization lost in merge.

2004-05-11  Devang Patel  <dpatel@apple.com>

	* gcc.c (optiom_map): Remove -precomp-trustfile support.
	* c-opts.c (c_common_handle_option): Remove -precomp-trustfile and
	-header-mapfile support.
	* common.opt: Same.
	* c.opt: Remove -header-mapfile support.
	
2004-05-11  Caroline Tice  <ctice@apple.com>

	* rtl.c (NOTE_INSN_UNLIKELY_EXECUTED_CODE):  Add this note back
	in; it seems to have vanished during a merge.

2004-05-10  Ziemowit Laski  <zlaski@apple.com>

	* config/rs6000/altivec.h: Bring over from mainline.
	* config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Define
	__APPLE_ALTIVEC__ to indicate Apple syntax support.

2004-05-10  Dale Johannesen  <dalej@apple.com>
	* config/darwin.c:  ANSIfy syntax (eliminate warnings).
	config/darwin-c.c:  Ditto.
	rs6000.c: Small cosmetic change in local code.

2004-05-06  Caroline Tice <ctice@apple.com>

	* config/rs6000/rs6000.c (rs6000_override_options):  Modify to
	not turn on hot/cold partitioning in the presence of exception
	handling.

2004-05-06  Dale Johannesen  <dalej@apple.com>

	* Merge from lno branch as of 04-24.  Files changed:
	 lambda-code.c
	 lambda.h
	 tree-chrec.c
	 tree-chrec.h
	 tree-data-ref.c
	 tree-elim-check.c
	 tree-flow.h
	 tree-loop-linear.c
	 tree-scalar-evolution.c
	 tree-ssa-loop-im.c
	 tree-ssa-loop-ivopts.c
	 tree-ssa-loop-manip.c
	 tree-ssa-loop.c
	 tree-vectorizer.c
	 tree-vectorizer.h

2004-05-04  Caroline Tice <ctice@apple.com>

	* config/rs6000/darwin.h (FP_SAVE_INLINE):  Modify this to
	always be 1 ("on") if the optimization level is -O3 or
	higher.

2004-04-30  Dale Johannesen  <dalej@apple.com>

	* cse.c (cse_insn):  Don't add REG_EQUAL note for
	(CONST (MINUS (LABEL_REF) (0))).

2004-04-30  Caroline Tice  <ctice@apple.com>

        * varasm.c (unlikely_section_label): New global variable.
        (unlikely_text_section): Change variable name from 
        'unlikely_section_name' to 'unlikely_section_label', make it a global
        variable, and move the code to generate its value to 
        assemble_start_function.
        (assemble_start_function):  Add code to generate *correct* value for
        'unlikely_section_label'.  Now makes use of value from 'fnname' 
        parameter.

2004-04-29  Devang Patel  <dpatel@apple.com>

	gcc/loop-iv.c : Merge from lno-branch as of 2004:04:19 00:00.
	gcc/tree-pass.h : Merge from lno-branch as of 2004:04:19 00:00.
	gcc/tree-ssa-alias.c : Merge from lno-branch as of 2004:04:19 00:00.
	gcc/tree-ssa-phiopt.c : Merge from lno-branch as of 2004:04:19 00:00.

2004-04-29  Devang Patel  <dpatel@apple.com>

	Merge lno-branch as of 2004:04:18 00:00 into
	apple-ppc-branch.


2004-04-28  Fariborz Jahanian <fjahanian@apple.com>

	* function.c (assign_parms): Add 2nd iteration over vector args
	if needed.
	* calls.c (initialize_argument_information): Add new argument,
	add 2nd iteration over vector arguments if needed.
	* target-def.h (default_skip_vec_args, TARGET_SKIP_VEC_ARGS): New.
	* target.h (skip_vec_args): Added to calls structure.
	* targhooks.c (default_skip_vec_args): Default 
	definition.
	* targhooks.h (default_skip_vec_args): Declaration.
	* config/rs6000/rs6000.c (skip_vec_args): New definition.
		
2004-04-27  Devang Patel  <dpatel@apple.com>

	* config/darwin.h (LINK_COMMAND_SPEC): Use darwin_arch_ld_spec.
	* config/rs6000/darwin.h (DARWIN_ARCH_ASM_SPEC): New.
	(DARWIN_ARCH_SPEC): Rename as...
	(DARWIN_ARCH_LD_SPEC): New name.
	* config/i386/darwin.h (DARWIN_ARCH_ASM_SPEC): New.
	(DARWIN_ARCH_SPEC): Rename as...
	(DARWIN_ARCH_LD_SPEC): New name.

2004-04-26  Andrew Pinski  <pinskia@physics.uc.edu>

	* configure.ac: Add test for -Wno-long-double.
	* Makefile.in (STRICT2_WARN): Add -Wno-long-double.
	(alloc-pool.o-warn): Delete.
	(ggc-page.o-warn): Delete.
	* configure: Regenerate.

2004-04-23  Dale Johannesen  <dalej@apple.com>

	Radars 3480058, 3178986

	* c-decl.c (merge_decls): Preserve duplicate_decl bit.
	(merge_translation_unit_decls):  Rewritten so -fno-common works.
	* opts.c (decode_options):  Turn on flag_no_common with -fast or -fastcp.
	* tree.h (struct tree_decl): Add duplicate_decl bit and DECL_DUPLICATE_DECL.
	* varasm.c (assemble_variable): Use it.
	* config/rs6000/rs6000.c (rs6000_override_options): Remove
	reorder-blocks-and-partition from -fast*.  Enable align-natural with -fastcp.
	* ../libstdc++-v3/include/std/std_fstream.h (basic_ifstream): Make
	_M_filebuf 8-byte aligned.
	(basic_ofstream): Ditto.
	
2004-04-22  Devang Patel  <dpatel@apple.com>

	Radar 3401402 and 3511029

	Remove FAT Build support from gcc.c

	* gcc.c (struct arch_config_out): Remove.
	(struct arch_out): Remove.
	(num_arches, curent_arch, final_output): Remove.
	(set_new_arch): Remove.
	(%T support): Remove.
	(%f support): Remove.
	(%F support): Remove.
	('@' support in specs): Remove.
	(ofile_merge_spec): Remove.
	(exec_merge_spec): Remove.
	(build_search_list): Remove fat builds readibility change.
	(SWITCH_IGNORE_RESTORE): Remove.
	(-arch support): Remove.
	* config/darwin.h (LINK_COMMAND_SPEC): Remove -arch*. Add %(darwin_arch_spec).
	* confiig/i386/darwin.h (ASM_SPEC): Add %(darwin_arch_spec).
	(DARWIN_ARCH_SPEC): New.
	* confiig/rs6000/darwin.h (ASM_SPEC): Add %(darwin_arch_spec).
	(DARWIN_ARCH_SPEC): New.
	* config/rs6000/rs6000.h (SUBTARGET_EXTRA_SPECS): Surround it with #ifndef.
	* config/darwin-driver.c: New file.

2004-04-20  Geoffrey Keating  <geoffk@apple.com>

	* c-cppbuiltin.c (define__GNUC__): Better precision and more
	error checking for code defining __APPLE_CC__.
	* testsuite/gcc.apple/applecc.c: New.

2004-04-15  Devang Patel  <dpatel@apple.com>

	* config/i386.h: Add static tree nodes for vector types to
	accomodate tree.h changes due to local Altivec patch.

2004-04-15  Caroline Tice  <ctice@apple.com>

	Fix various problems related to hot/cold partitioning (but not all of 
	them yet).
	* bb-reorder.c  (tm_p.h): Add new include statement.
	(HAVE_return): Define HAVE_return appropriately if not already defined.  
	(find_rarely_executed_basic_blocks_and_crossing_edges):  Modify to
	only mark crossing edges if architecture supports named sections.
	(fix_crossing_conditional_branches):  Add test for HAVE_return before
	calling gen_return.
	(fix_crossing_unconditional_branches): Change VOIDmode to Pmode in call
	to gen_rtl_LABEL_REF.
	(fix_edges_for_rarely_executed_code): Only "fix" branches and add
	REG_CROSSING_JUMP notes if the architecture supports named sections.
	(reorder_basic_blocks):  Change (* targetm.cannot_modify_jumps_p ())
	into (targetm.cannot_modify_jumps_p ()).  Modify to only add
	NOTE_INSN_UNLIKELY_EXECUTED_CODE notes if the architecture supports
	named sections.
	* cfglayout.c (fixup_reorder_chain):  Modify code that adds
	NOTE_INSN_UNLIKELY_EXECUTED_CODE and REG_CROSSING_JUMP notes, to only
	do so if architecture supports named sections.
	* cfgrtl.c (target.h): Add new include statement.
	(force_nonfallthru_and_redirect):  Modify code that adds
	NOTE_INSN_UNLIKELY_EXECUTED_CODE and REG_CROSSING_JUMP notes, to only
	do so if architecture supports named sections.
	(commit_one_edge_insertion):  Likewise.
	* dbxout.c (dbxout_source_file): Fix bug, when writing out source
	location debug information, to not change to the wrong section.
	* defaults.h (NORMAL_TEXT_SECTION_NAME):  Remove this definition.
	(SECTION_FORMAT_STRING): Remove this definition.
	* final.c (final_scan_insn): Remove unnecessary in_unlikely_text_section
	test from if statement.  Modify code that switches sections to not
	do so if architecture does not support named sections.  Cleaned up
	if statement.
	* ifcvt.c (if_convert): Modified test that disables optimization when
	partitioning, to not disable it if the architecture does not support
	named sections.
	* passes.c (rest_of_compilation):  Removed flag_exceptions test from
	code that calls partitioning, as this is already taken care of
	in decode_options.
	* predict.c (choose_function_section): Modify to NOT choose hot or
	cold sections for the function decl if we are doing partitioning
	optimization (want to leave it up to the hot/cold partitioning
	optimization, which is more fine-grained).
	* varasm.c (text_section): Restore code that outputs assembly for
	the text section to its original code.
	(unlikely_text_section):  Modify to always use named_section for
	writing out section directive, remove unnecessary ifdef, and
	use ASM_OUTPUT_LABEL for labelling the start of the
	cold section.
	(in_unlikely_text_section):  Modify to deal correctly with being in
	a named section.
	(function_section):  Restore code for generating section directives
	to its original order.
	* config/darwin.c (darwin_asm_named_section): Restore code that
	generates section directive to its original state.
	* config/i386/darwin.h (ASM_OUTPUT_ALIGN): Add in_unlikely_text_section ()
	to an if test that tests for in_text_section ().
	* config/rs6000/darwin.h (NORMAL_TEXT_SECTION_NAME):  Remove definition.
	(SECTION_FORMAT_STRING):  Remove definition.

2004-04-10  Paolo Bonzini  <bonzini@gnu.org>
	    Richard Henderson  <rth@redhat.com>

	PR target/14899

	* c-common.c (vector_types_compatible_p): New function.
	* c-typeck.c (comptypes): Recurse on vector types,
	treat a non-opaque type as equivalent to an opaque type.
	(convert_for_assignment): Use vector_types_compatible_p.
	(digest_init): Use vector_types_compatible_p to check
	validness of constant vector initializers; otherwise treat
	them as scalars
	* tree.c (make_or_reuse_type): New.
	(build_common_tree_nodes): Use it.
	* cp/call.c (standard_conversion): Likewise.
	* cp/typeck.c (comptypes): Recurse on vector types, do not
	treat a non-opaque type as equivalent to an opaque type.
	(convert_for_assignment): Use vector_types_compatible_p.

2004-04-13  Fariborz Jahanian <fjahanian@apple.com>

	* combine.c (combine_instructions): 
	Try insn with each REG_EQUAL note it links back to.
	(unmentioned_reg_p_1, unmentioned_reg_p): New functions.
	Brought from tree-ssa branch.

2004-04-09  Dale Johannesen <dalej@apple.com>

	Roll in gcc-1552 enhancement for separate stack temps.
	Turn on -fstrict-aliasing with -fast.
	* function.c (assign_stack_local_with_alias): New function.
	* rtl.h (assign_stack_local_with_alias): Declare it.
	* config/rs6000/rs6000.c (rs6000_override_options): Turn on strict
	aliasing with -fast.
	* config/rs6000/rs6000.md (floatsidf2): Use 
	assign_stack_local_with_alias.
	(floatunssidf2): Ditto.
	(fix_truncdfsi2): Ditto.

2004-04-07  Fariborz Jahanian <fjahanian@apple.com>

	Roll in Ziem Laski's Altivec front-end fixes to 
	support MOTOROLA's Altivec syntax.
	* Makefile.in: Add c-lex.o dependencies.
	* c-common.c (vector_constructor_from_expr): New function.
	* c-common.h (vector_constructor_from_expr): Add declaration.
	* c-lex.c: include target.h, cpphash.h. Add lexer support
	for new syntax.
	(c_lex_prepend): new function. (c_lex_peek): new function.
	* c-pragma.h: add (c_lex_peek, c_lex_prepend) declarations.
	 	
2004-04-06  Dale Johannesen <dalej@apple.com>

	Roll in Zdenek Dvorak's rewrite of doloop optimization.
	* Makefile.in: add loop-doloop.*, remove doloop.*
	* loop-doloop.c: New.
	* doloop.c: Remove.
	* cfgloop.h: Add new function declarations.
	* cfgloopanal.c: Add get_loop_level.
	* loop-iv.c: Recognize unexecuted loops.
	* loop.c: Remove call to old doloop optimization.
	* loop.h: Remove LOOP_BCT.
	* passes.c: Ditto. Call new doloop optimization.
	* config/rs6000/rs6000-protos.h: Remove duplicate declarations.
	* config/rs6000/rs6000.c: Cosmetic cleanups.  Add -freorder-blocks
	to -fast.

2004-04-02  Ziemowit Laski  <zlaski@apple.com>

	Remove APPLE LOCAL AltiVec code whenever possible; merge in
	AltiVec/VECTOR_TYPE-handling code from mainline.

2004-04-01  Fariborz Jahanian <fjahanian@apple.com>

	* Makefile.in: add $(PARAMS_H) $(TM_P_H) dependencies
	for sched-rgn.o.
	* params.def: add definitions for 
	max-sched-region-blocks and max-sched-region-insns.
	* sched-rgn.c (too_large): change return type to bool.
	Use the parametrized values of max-sched-region-blocks,
	max-sched-region-insns for computing upper limits for
	interblock scheduling. 
	* doc/invoke.texi: Document max-sched-region-blocks,
	max-sched-region-insns.

2004-04-01  Caroline Tice  <ctice@apple.com>

        * basic-block.h (struct edge_def):  Add new field, crossing_edge.
	(struct basic_block_def):  Add new field, partition.
	(UNPARTITIONED, HOT_PARTITION, COLD_PARTITION):  New constant macro
	definitions.
	(partition_hot_cold_basic_blocks): Add extern function 
	declaration.
        * bb-reorder.c (function.h, obstack.h, expr.h, regs.h):  Add four new 
	include	statements.
	(N_ROUNDS): Increase the maximum number of rounds by 1.
	(branch_threshold): Add array value for new round.
	(exec_threshold): Add array value for new round.
	(push_to_next_round_p): New function.
	(add_unlikely_executed_notes): New function.
	(find_rarely_executed_basic_blocks_and_crossing_edges): New function.
	(mark_bb_for_unlikely_executed_section): New function.
	(add_labels_and_missing_jumps): New function.
	(add_reg_crossing_jump_notes): New function.
	(fix_up_fall_thru_edges): New function.
	(find_jump_block): New function.
	(fix_crossing_conditional_branches): New function.
	(fix_crossing_unconditional_branches): New function.
	(fix_edges_for_rarely_executed_code): New function.
	(partition_hot_cold_basic_blocks): New function.
	(find_traces):  Add an extra round for partitioning hot/cold
	basic blocks.
	(find_traces_1_round): Add a parameter.  Modify to push all cold blocks,
	and only cold blocks, into the last (extra) round of collecting traces.
	(better_edge_p): Add a parameter.  Modify to favor non-crossing edges 
	over crossing edges.
	(bb_to_key):  Add code to correctly identify cold blocks when 
	doing partitioning.
	(connect_traces): Modify to connect all the non-cold traces first, then
	go back and connect up all the cold traces.
	(reorder_basic_blocks):  Add call to add_unlikely_executed_notes.
	* cfg.c (entry_exit_blocks): Add initialization for partition field in
	entry and exit blocks.
	* cfgbuild.c (make_edges): Update current_function_has_computed_jump  
	if we are doing hot/cold partitioning.
	* cfgcleanup.c (cfglayout.h): Add new include statement.
	(try_simplify_condjump): Modify to not attempt on blocks with jumps 
	that cross section boundaries.
	(try_forward_edges): Likewise.
	(merge_blocks_move_predecessor_nojumps): Likewise.
	(merge_blocks_move_successor_nojumps): Likewise.
	(merge_blocks_move): Likewise.
	(try_crossjump_to_edge): Modify to not attempt after we have done
	the block partitioning.
	(try_crossjump_bb): Modify to not attempt on blocks with jumps that
	cross section boundaries.
	(try_optimize_cfg): Likewise.
	* cfghooks.c (tidy_fallthru_edges): Modify to not remove indirect
	jumps that cross section boundaries.
        * cfglayout.c (flags.h): Add new include statement.
	(update_unlikely_executed_notes):  New function.
	(fixup_reorder_chain):  Add code so when a new jumping basic block is 
        added, it's UNLIKELY_EXECUTED_CODE and REG_CROSSING_JUMP notes are 
	updated appropriately.
	(duplicate_insn_chain):  Add code to duplicate the new NOTE insn
	introduced by this optimization.
        * cfglayout.h (scan_ahead_for_unlikely_executed_note):  Add new 
        extern function declaration.
	* cfgrtl.c (can_delete_note_p):  Add NOTE_INSN_UNLIKELY_EXECUTED_CODE to
	list of notes that can be deleted.
	(create_basic_block_structure):  Add initialization for partition field.
	(rtl_can_merge_blocks):  Modify to test blocks for jumps that cross
	section boundaries.
	(try_redirect_by_replacing_jump):  Modify to not attempt on jumps that
	cross section boundaries.
	(commit_one_edge_insertion): Add code so newly created basic block
	ends up in correct (hot or cold) section.  Modify to disallow 
	insertions before NOTE_INSN_UNLIKELY_EXECUTED_CODE notes.
	(rtl_verify_flow_info_1):  Add code to verify that no fall_thru edge
	crosses section boundaries.
	(cfg_layout_can_merge_blocks_p): Modify to test blocks for jumps that
	cross section boundaries.
	(force_nonfallthru_and_redirect): Modify to make sure new basic block
	ends up in correct section, with correct notes attached.
        * common.opt (freorder-blocks-and-partition):  Add new flag for this 
        optimization.
        * dbxout.c (dbx_function_end):  Add code to make sure scope labels at
        the end of functions are written into the correct (hot or cold) 
        section.
	(dbx_source_file): Add code so writing debug file information
	doesn't incorrectly change sections.
        * defaults.h (NORMAL_TEXT_SECTION_NAME): New constant macro, for use
	in partitioning hot/cold basic blocks into separate sections.
	(SECTION_FORMAT_STRING): New constant macro, for linux/i386 hot/cold 
	section partitioning.
	(HAS_LONG_COND_BRANCH): New constant macro, indicating whether or not
	conditional branches can span all of memory.
	(HAS_LONG_UNCOND_BRANCH): New constant macro, indicationg whether or not
	unconditional branches can span all of memory.
        * final.c (scan_ahead_for_unlikely_executed_note):  New function.
	(final_scan_insn):  Add code to check for NOTE instruction indicating 
        whether basic block belongs in hot or cold section, and to make sure 
        the current basic block is being written to the appropriate section.  
        Also added code to ensure that jump table basic blocks end up in the 
        correct section.
        * flags.h (flag_reorder_blocks_and_partition):  New flag.
	* ifcvt.c (find_if_case_1):  Modify to not attempt if conversion if
	one of the branches has a jump that crosses between sections.
	(find_if_case_2): Likewise.
	(ifcvt): Modify to not attempt to mark loop exit edges after 
	hot/cold partitioning has occurred.
        * opts.c (decode_options): Code to handle new flag, 
        flag_reorder_blocks_and_partition; also to turn it off if
	flag_exceptions is on.
	(common_handle_option): Code to handle new flag, 
        flag_reorder_blocks_and_partition.
        * output.h (unlikely_text_section): New extern function declaration.
	(in_unlikely_text_section): New extern function declaration.
	* passes.c (rest_of_handle_stack_regs):  Add 
	flag_reorder_blocks_and_partition as an 'or' condition for calling 
	reorder_basic_blocks.
	(rest_of_handle_reorder_blocks):  Add flag_reorder_blocks_and_partition 
	as an 'or' condition for calling reorder_basic_blocks.
	(rest_of_compilation):  Add call to partition_hot_cold_basic_blocks.
        * print-rtl.c (print_rtx): Add code for handling new note,
        NOTE_INSN_UNLIKELY_EXECUTED_CODE
        * rtl.c  (NOTE_INSN_UNLIKELY_EXECUTED_CODE): New note insn (see below).
	(REG_CROSSING_JUMP): New kind of reg_note, to mark jumps that
	cross between section boundaries.
        * rtl.h (NOTE_INSN_UNLIKELY_EXECUTED_CODE):  New note instruction, 
        indicating the basic block containing it belongs in the cold section.
	(REG_CROSSING_JUMP): New type of reg_note, to mark jumps that cross
	between hot and cold sections.
        * toplev.c (flag_reorder_blocks_and_partition):  Add code to 
        initialize this flag, and to tie it to the command-line option 
        freorder-blocks-and-partition.
        * varasm.c (cfglayout.h):  Add new include statement.
	(unlikely_section_label_printed):  New global variable, used for 
        determining when to output section name labels for cold sections.
	(in_section):  Add in_unlikely_executed_text to enum data structure.
	(text_section):  Modify code to use SECTION_FORMAT_STRING and
	NORMAL_TEXT_SECTION_NAME macros.
	(unlikely_text_section):  New function.
	(in_unlikely_text_section):  New function.
	(function_section):  Add code to make sure beginning of function is 
        written into correct section (hot or cold).
	(assemble_start_function):  Add code to make sure stuff is written to 
        the correct section.
	(assemble_zeros):  Add in_unlikely_text_section as an 'or' condition 
        to an if statement that was checking 'in_text_section'.
	(assemble_variable):  Add 'in_unlikely_text_section' as an 'or' 
        condition to an if statement that was checking 'in_text_section'.
        (default_section_type_flags_1):  Add check: if in cold section 
        flags = SECTION_CODE.
	* config/darwin.c (darwin_asm_named_section):  Modify to use
	SECTION_FORMAT_STRING if we are partitioning hot/cold blocks.
	* config/i386/i386.h (HAS_LONG_COND_BRANCH): Defined this macro 
	specifically for the i386.
	(HAS_LONG_UNCOND_BRANCH):  Defined this macro specifically for the i386.
        * config/rs6000/darwin.h (UNLIKELY_EXECUTED_TEXT_SECTION_NAME): Change
	text string to something more informative.
	(NORMAL_TEXT_SECTION_NAME): Add new definition.
	(SECTION_FORMAT_STRING):  Add new definition.
        * config/rs6000/rs6000.c (rs6000_assemble_integer):  Add 
        '!in_unlikely_text_section' as an 'and' condition to an if statement 
        that was already checking '!in_text_section'.
	(rs6000_override_options):  Turn on flag_reorder_blocks_and_partition
	with "-fast".
        * config/rs6000/sysv4.h (HOT_TEXT_SECTION_NAME,NORMAL_TEXT_SECTION_NAME,
        UNLIKELY_EXECUTED_TEXT_SECTION_NAME,SECTION_FORMAT_STRING): Make
        sure these are properly defined for linux on ppc.
        * doc/invoke.texi  (freorder-blocks-and-partition): Add documentation 
        for this new flag.
	* doc/rtl.texi (REG_CROSSING_JUMP):  Add documentation for new
	reg_note.
        * doc/tm.texi (NORMAL_TEXT_SECTION_NAME, SECTION_FORMAT_STRING, 
	HAS_LONG_COND_BRANCH, HAS_LONG_UNCOND_BRANCH): Add documentation for 
	these new macros.