aboutsummaryrefslogtreecommitdiff
path: root/gcc/loop.c
AgeCommit message (Collapse)AuthorFilesLines
2002-08-05Index: ChangeLogGeoffrey Keating1-1/+0
2002-08-05 Geoffrey Keating <geoffk@redhat.com> * attribs.c: Don't include obstack.h. * builtins.c: Likewise. * cfganal.c: Likewise. * cfgbuild.c: Likewise. * cfgcleanup.c: Likewise. * emit-rtl.c: Likewise. * loop.c: Likewise. * stmt.c: Likewise. Index: cp/ChangeLog 2002-08-05 Geoffrey Keating <geoffk@redhat.com> * class.c: Don't include obstack.h. (popclass): * decl2.c: Delete bogus comment. * error.c: Don't include obstack.h. * except.c: Likewise. (dump_type): Correct comment. * method.c: Don't include obstack.h. * tree.c: Likewise. Index: java/ChangeLog 2002-08-05 Geoffrey Keating <geoffk@redhat.com> * mangle_name.c: Don't include obstack.h twice. * xref.c: Don't include obstack.h. From-SVN: r56055
2002-07-23genautomata.c (VLA_HWINT_SHORTEN, [...]): Remove.Neil Booth1-9/+0
* genautomata.c (VLA_HWINT_SHORTEN, VLA_HWINT_LAST): Remove. * df.c (HANDLE_SUBREG, FOR_EACH_BB_IN_BITMAP_REV, FOR_EACH_BB_IN_SBITMAP): Remove. * gcse.c (NEVER_SET, FOLLOW_BACK_EDGES): Remove. * haifa-sched.c (DONE_PRIORITY, MAX_PRIORITY, TAIL_PRIORITY, LAUNCH_PRIORITY, DONE_PRIORITY_P, LOW_PRIORITY_P): Remove. * loop.c (PREFETCH_BLOACK_IN_LOOP_MIN, PREFETCH_LIMIT_TO_SIMULTANEOUS): Remove. * regrename.c (REGNO_MODE_OK_FOR_BASE_P): Remove. From-SVN: r55685
2002-07-23defaults.h (obstack_chunk_alloc, [...]): Default definition.Neil Booth1-3/+0
* defaults.h (obstack_chunk_alloc, obstack_chunk_free): Default definition. * gcse.c: Don't define obstack_chunk_free. * collect2.c, conflict.c, df.c, diagnostic.c, fix-header.c, flow.c, gcc.c, genattrtab.c, genautomata.c, genflags.c, gensupport.c, integrate.c, loop.c, ra.c, read-rtl.c, regrename.c, reload1.c, reorg.c, tlink.c, tree.c, config/arm/arm.c, objc/objc-act.c: Don't define obstack macros. cp: * class.c, method.c, pt.c, search.c: Similarly. From-SVN: r55665
2002-07-21loop.h (LOOP_AUTO_UNROLL): Rename from LOOP_FIRST_PASS.Richard Henderson1-1/+1
* loop.h (LOOP_AUTO_UNROLL): Rename from LOOP_FIRST_PASS. * loop.c (strength_reduce): Update. * toplev.c (rest_of_compilation): Do unrolling in the first loop pass, not the second. From-SVN: r55634
2002-07-19* loop.c (loop_givs_rescan): Delete the REG_EQUAL note, not the insn.Richard Henderson1-6/+8
From-SVN: r55590
2002-07-17re PR rtl-optimization/6713 (Regression wrt 3.0.4: g++ -O2 leads to seg ↵Eric Botcazou1-2/+12
fault at run time) PR optimization/6713 * loop.c (loop_givs_rescan): Explicitly delete the insn that sets a non-replaceable giv after issuing the new one. Co-Authored-By: Glen Nakamura <glen@imodulo.com> From-SVN: r55539
2002-06-14loop.c (check_final_value): Use v->always_executed instead of ↵Eric Botcazou1-1/+2
v->always_computable. * loop.c (check_final_value): Use v->always_executed instead of v->always_computable. * unroll.c (final_giv_value): Don't calculate the final value as a function of the biv if the giv is not computed for every loop iteration. From-SVN: r54634
2002-06-14* loop.c (for_each_insn_in_loop): Fix formatting and comments.Eric Botcazou1-9/+6
From-SVN: r54633
2002-06-11* loop.c (loop_regs_scan): Avoid useless generation of REG objects.Jeff Law1-1/+1
From-SVN: r54513
2002-06-11Delete SEQUENCE rtl usage outside of reorg and ssa passes.David S. Miller1-47/+54
2002-06-05 David S. Miller <davem@redhat.com> Delete SEQUENCE rtl usage outside of reorg and ssa passes. * rtl.h (gen_sequence, emit_insns, emit_insns_before, emit_insns_before_scope, emit_insns_after, emit_insns_after_scope): Delete declaration. * ada/misc.c (insert_code_for): Use emit_insn* instead of emit_insns_foo. * config/alpha/alpha.c (alpha_set_memflags_1): Abort on SEQUENCE. (alpha_set_memflags): Fix comment. (set_frame_related_p): Use get_insns instead of gen_sequence. * config/alpha/alpha.md (setjmp receiver splitter): Avoid emitting no insns. * config/arm/arm.c (arm_finalize_pic): Use get_insns instead of gen_sequence. (arm_gen_load_multiple, arm_gen_store_multiple): Likewise. * config/fr30/fr30.c (fr30_move_double): Likewise. * config/i386/i386.c (ix86_expand_int_movcc, ix86_expand_movstr): Likewise. * config/ia64/ia64.c (spill_restore_mem): Likewise. * config/ia64/ia64.md (conditional move spliiter): Avoid emitting no insns. * config/m32r/m32r.c (gen_split_move_double): Use get_insns instead of gen_sequence. * config/mips/mips.c (embedded_pic_fnaddr_reg): Likewise. (mips_expand_prologue, mips16_gp_pseudo_reg): Likewise. * config/sh/sh.c (sh_need_epilogue): Likewise. * config/sparc/sparc.md (current_function_calls_alloca, flat): New attributes. (setjmp pattern and split): Use them to avoid splitter which emits no RTL. * genattrtab.c (main): Emit include of function.h * config/stormy16/stormy16.c (xstormy16_split_cbranch): Use get_insns instead of gen_sequence. * config/cris/cris.c (cris_split_movdx): Likewise. * emit-rtl.c (emit_insns*): Kill. (try_split): Expect insn list instead of SEQUENCE. (make_jump_insn_raw, make_call_insn_raw): Fix comments. (emit_*insn*): Reimplement to work with INSN lists and PATTERNs. Make them abort if a SEQUENCE is given and RTL checking is enabled. (emit_*_scope): Don't forget to set scope on final insn. (gen_sequence): Move from here... * ssa.c (gen_sequence): To here as private function. * builtins.c (expand_builtin_apply_args): Use emit_insn_foo, fix comments. (expand_builtin_return, expand_builtin_mathfn): Likewise. (expand_builtin_strlen): Use get_insns instead of gen_sequence. (expand_builtin_saveregs): Use emit_insn_foo, fix comments. (expand_builtin_expect_jump): Use get_insns and fix comments. * calls.c (try_to_integrate): Use emit_insn_foo. (expand_call, emit_library_call_value_1): Likewise. * expr.c (emit_queue): Handle insn lists instead of SEQUENCE. (emit_move_insn_1): Use get_insns instead of gen_sequence. (expand_expr): Use emit_insn_foo. * cfgrtl.c (commit_one_edge_insertion): Use emit_insn_foo. * except.c (build_post_landing_pads): Likewise. * flow.c (attempt_auto_inc): Likewise. * stmt.c (expand_fixup, fixup_gotos, expand_nl_handler_label, expand_nl_goto_receivers, expand_decl_cleanup): Likewise. * function.c (fixup_var_refs_insn): Use get_insns instead of gen_sequence. (fixup_var_refs_1): Likewise and expect insn list from gen_foo. (fixup_memory_subreg): Use get_insns instead of gen_sequence. (fixup_stack_1, purge_addressof_1, expand_main_function, get_arg_pointer_save_area): Likewise. (optimize_bit_field, instantiate_virtual_regs_1, assign_parms, expand_function_end): Use emit_insn_foo. (record_insns, keep_stack_depressed): Work with insn list instead of SEQUENCE, fix comments. * ifcvt.c (noce_emit_store_flag, noce_try_store_flag, noce_try_store_flag_constants, noce_try_store_flag_inc, noce_try_store_flag_mask, noce_emit_cmove, noce_try_cmove_arith, noce_try_minmax, noce_try_abs): Use emit_insn_foo. (noce_process_if_block): Use get_insns instead of gen_sequence. * optabs.c (add_equal_note): Work with insn list, fix comments. (expand_binop): Expect insn list from GEN_FCN(), use emit_insn_foo. (expand_unop, expand_complex_abs, expand_unop_insn, expand_no_conflict_block): Likewise. (gen_move_insn): Use get_insns instead of gen_sequence. (gen_cond_trap): Likewise. * integrate.c (copy_rtx_and_substitute): Likewise. (emit_initial_value_sets): Use emit_insn_foo. * reload1.c (emit_output_reload_insns, emit_reload_insns): Likewise. (fixup_abnormal_edges): Avoid losing REG_NOTES more intelligently now that RTL generators give insn lists. * sibcall.c (replace_call_placeholder): Use emit_insn_foo. * doloop.c (doloop_modify, doloop_modify_runtime): Use get_insns instead of gen_sequence. (doloop_optimize): Work with insn lists instead of SEQUENCE rtl. * explow.c (emit_stack_save, emit_stack_restore): Use get_insns instead of gen_sequence. * loop.c (move_movables, emit_prefetch_instructions, gen_add_mult, check_dbra_loop, gen_load_of_final_value): Likewise. (loop_regs_update): Work with insn list instead of SEQUENCE rtl. (product_cheap_p): Likewise, and add commentary about RTL wastage here. * lcm.c (optimize_mode_switching): Use get_insns instead of gen_sequence. * profile.c (gen_edge_profiler): Likewise. * regmove.c (copy_src_to_dest): Likewise. * reg-stack.c (compensate_edge): Likewise and fix comment. * gcse.c (process_insert_insn): Likewise. (insert_insn_end_bb): Work with insn list instead of SEQUENCE rtl. * jump.c (delete_prior_computation): Update comment. * genemit.c (gen_expand, gen_split, main): Use get_insns instead of gen_sequence, update comments to match. * recog.c (peephole2_optimize): Work with insn lists instead of SEQUENCE rtl. * sched-vis.c (print_pattern): Abort on SEQUENCE. * unroll.c (unroll_loop, find_splittable_givs, final_giv_value): Use get_insns instead of gen_sequence. (copy_loop_body): Likewise and don't emit dummy NOTE. * genrecog.c: Don't mention SEQUENCE rtl in comments. * combine.c (try_combine): Expect insn lists from split generator. * reorg.c (relax_delay_slots): Emit SEQUENCE into insn list by hand. From-SVN: r54497
2002-06-02loop.c (emit_prefetch_instructions): Properly place the address computation.Jan Hubicka1-10/+7
* loop.c (emit_prefetch_instructions): Properly place the address computation. * basic-block.h (basic_block_for_insn, BLOCK_FOR_INSN): Kill. (set_block_for_insn): Turn into macro. * cfgbuild.c (find_basic_block): Do not clear basic_block_for_insn. * cfglayout.c (insn_scopes): Kill. (scope_to_insns_initialize): Do not use insn_scopes. (scope_to_insns_finalize): Likewise. (duplicate_insn_chain): Likewise. (cfg_layout_initialize, cfg_layout_finalize): Do not turn scopes to notes. * cfgrtl.c (basic_block_for_insn): Kill. (delete_insn_and_edges, delete_insn_chain_and_edges): Simplify. (create_basic_block_structure): Use reorder_insns. (compute_bb_for_insn): Do not use basic_block_for_insn. (merge_blocks_nomove): Likewise. (update_bb_for_insn): Likewise. (verify_flow_info): Likewise. (set_block_for_insn): Kill. * combine.c (try_combine): Update gen_rtx_INSN call. * emit-rtl.c (gen_label_rtx): Update gen_rtx_CODE_LABEL call. (mark_insn_raw, make_jump_insn_raw, make_call_insn_raw): Clear scopes and BBs. (add_insn_after, add_insn_before, remove_insn, reorder_insns): Simplify. (emit_note_before, emit_note_after, emit_line_note_after, emit_note): Clear BB. (emit_insns_after): Simplify. (emit_copy_of_insn_after): Copy scope. * final.c (final_start_function): Lower scopes. * flow.c (check_function_return_warnings): Do not rely on deleted insn. * integrate.c (copy_insn_list): Cope scopes. * jump.c (duplicate_loop_exit_test): LIkewise; simplify. * loop.c (loop_optimize): Do not care block notes. * print-rtl.c (print_rtx): Print BB. * recog.c (apply_change_group): Simplify. * rtl.c (copy_rtx): Handle 'B'. * rtl.def (INSN, CALL_INSN, JUMP_INSN, NOTE): Add extra fields. * rtl.h (Field accessors): Update indexes. * sched-ebb.c (schedule_ebbs): Do not lower notes. * sched-rgn.c (schedule_insns): Likewise. * toplev.c (rest_of_compilation): Lower notes. * unroll.c (unroll_loop): Do not care scoping notes. (copy_loop_body): Copy scopes. From-SVN: r54188
2002-05-30expmed.c (const_mult_add_overflow_p): New.Eric Botcazou1-6/+21
* expmed.c (const_mult_add_overflow_p): New. * expr.h: Declare it. * loop.c (maybe_eliminate_biv_1) [COMPARE]: Use it. Don't eliminate the biv if the giv has a constant multiplier and the rhs argument of the comparison does satisfy the predicate. Use expand_mult_add to compute the replacement constant. From-SVN: r54075
2002-05-30langhooks.c: Fix formatting.Kazu Hirata1-13/+13
* langhooks.c: Fix formatting. * langhooks.h: Likewise. * lcm.c: Likewise. * libgcc2.c: Likewise. * lists.c: Likewise. * local-alloc.c: Likewise. * loop.c: Likewise. * loop.h: Likewise. From-SVN: r54070
2002-05-16Revert "Basic block renumbering removal", and two followup patches.Richard Henderson1-1/+1
From-SVN: r53537
2002-05-16loop.h (struct loop_info): Add member has_prefetch.Janis Johnson1-91/+130
* loop.h (struct loop_info): Add member has_prefetch. * loop.c (PREFETCH_CONDITIONAL): Change default to 1. (prescan_loop): Initialize has_prefetch. (struct prefetch_info): Change prefetch_in_loop and prefetch_before_loop from bit fields to ints. (emit_prefetch_instructions): Several small fixes. (check_dbra_loop): Don't reverse loop that uses prefetch. From-SVN: r53524
2002-05-16Basic block renumbering removal.Zdenek Dvorak1-1/+1
From-SVN: r53522
2002-05-10loop.c: (PREFETCH_EXTREME_DIFFERENCE, PREFETCH_BEFORE_LOOP): New.Janis Johnson1-69/+131
* loop.c: (PREFETCH_EXTREME_DIFFERENCE, PREFETCH_BEFORE_LOOP): New. (PREFETCH_CONDITIONAL): Renamed from PREFETCH_NOT_ALWAYS. (struct prefetch_info): Fix spelling of member bytes_accessed. (emit_prefetch_instructions): Make dump messages more regular; restructure code to add more dump messages; use new macros for heuristics. (There are no code generation changes in any of this). From-SVN: r53371
2002-04-25loop.c (load_mems): Don't change the interface of called functions.J"orn Rennecke1-4/+17
* loop.c (load_mems): Don't change the interface of called functions. * calls.c (expand_call): Take current_function_pretend_args_size into account when setting argblock for sibcalls. From-SVN: r52745
2002-04-24* loop.c (canonicalize_condition): Use gen_int_mode.Jan Hubicka1-4/+4
From-SVN: r52715
2002-04-23i386.c (ix86_output_addr_diff_elt): Avoid x86_64 binutils bug workaround.Jan Hubicka1-6/+24
* i386.c (ix86_output_addr_diff_elt): Avoid x86_64 binutils bug workaround. (ix86_expand_int_movcc): Avoid x86_64 compilation chrash. (ix86_expand_clrstr): Fix typo. * loop.c (gen_load_of_final_value): New. (loop_givs_rescan, strength_reduce, check_dbra_loop): Use it. From-SVN: r52664
2002-04-10re PR rtl-optimization/6233 (simple loop miscompilation)Alan Modra1-0/+2
PR optimization/6233 * rtlanal.c (pure_call_p): New function. * rtl.h (pure_call_p): Declare. * loop.c (prescan_loop): Use it to set has_nonconst_call. * gcse.c (store_killed_in_insn): Use pure_call_p here too. From-SVN: r52110
2002-04-09basic-block.h (flow_delete_block_noexpunge): Declare.Richard Henderson1-18/+15
* basic-block.h (flow_delete_block_noexpunge): Declare. (expunge_block_nocompact): Declare. * cfg.c (expunge_block_nocompact): Split out from ... (expunge_block): ... here. * cfgrtl.c (can_delete_label_p): Don't use exception_handler_labels. (flow_delete_block_noexpunge): Split out from ... (flow_delete_block): ... here. * cfgcleanup.c (delete_unreachable_blocks): Compact while removing dead blocks. * except.c (exception_handler_labels): Remove. (exception_handler_label_map): New. (struct eh_region): Add aka member. (mark_ehl_map_entry, mark_ehl_map, free_region): New. (ehl_hash, ehl_eq, ehl_free, add_ehl_entry): New. (for_each_eh_label, for_each_eh_label_1): New. (init_eh): Register exception_handler_label_map. (free_eh_status): Use free_region. (find_exception_handler_labels): Use the map, not the list. (remove_exception_handler_label): Likewise. (maybe_remove_eh_handler): Likewise. (remove_eh_handler): Use the region aka bitmap. * except.h (exception_handler_labels): Remove. (for_each_eh_label): Declare. * jump.c (rebuild_jump_labels): Don't check exception_handler_labels. * loop.c (invalidate_loops_containing_label): New. (find_and_verify_loops): Use it. Use for_each_eh_label. * sched-rgn.c (is_cfg_nonregular): Use current_function_has_exception_handlers. From-SVN: r52100
2002-04-02re PR rtl-optimization/4311 (unrolling loops creates non-ending loop)Richard Henderson1-1/+2
PR opt/4311 * loop.h (LOOP_FIRST_PASS): New. * loop.c (strength_reduce): Mind it when deciding to unroll. * toplev.c (rest_of_compilation): Set it. From-SVN: r51798
2002-03-29* loop.c (combine_movables): Do allow combination of pseudos.Dale Johannesen1-4/+5
From-SVN: r51581
2002-03-13loop.c (basic_induction_var): Don't call convert_modes if mode classes are ↵Jakub Jelinek1-3/+4
different. * loop.c (basic_induction_var): Don't call convert_modes if mode classes are different. * gcc.c-torture/compile/20020309-2.c: New test. From-SVN: r50721
2002-03-10loop.c (strength_reduce): Compute number of iterations as unsigned ↵Richard Henderson1-6/+6
HOST_WIDE_INT. * loop.c (strength_reduce): Compute number of iterations as unsigned HOST_WIDE_INT. From-SVN: r50550
2002-02-27* loop.c (prescan_loop): Handle PARALLEL.Graham Stott1-4/+5
From-SVN: r50101
2002-02-23re PR rtl-optimization/5747 (ss20020218 fails to build binutils-2.11.93.0.2 ↵Jakub Jelinek1-1/+19
on sparc-suse-linux - ICE in loop.c) PR optimization/5747 * loop.c (scan_loop): Update reg info if move_movables created new pseudos. * gcc.dg/20020222-1.c: New test. From-SVN: r49989
2002-02-22expr.c (store_expr): When converting expression to promoted equivalent type...Richard Kenner1-7/+7
* expr.c (store_expr): When converting expression to promoted equivalent type, allow using SUBREG_REG of TARGET as the target of the expansion of EXP. * loop.c (basic_induction_var, case SUBREG): Always look inside. * config/alpha/alpha.c (rtx_equiv_function_matters): Delete decl. (alpha_emit_set_const): Handle SImode when can't make new pseudos. (alpha_emit_set_const_1, alpha_sa_mask): Use no_new_pseudos. * config/alpha/alpha.md (addsi3, subsi3): Don't use if optimizing. From-SVN: r49972
2002-02-07loop.c (strength_reduce): Sink final_value when not eliminating a biv.Richard Henderson1-0/+5
* loop.c (strength_reduce): Sink final_value when not eliminating a biv. From-SVN: r49606
2002-02-07alias.c (find_base_value): Recall base values for fixed hard regs.Richard Henderson1-3/+3
* alias.c (find_base_value): Recall base values for fixed hard regs. * loop.c (loop_regs_update): Don't use single_set on non-insns. From-SVN: r49570
2002-02-06loop.c (remove_constant_addition): Avoid clobbering a shared CONST expression.Janis Johnson1-1/+12
* loop.c (remove_constant_addition): Avoid clobbering a shared CONST expression. Co-Authored-By: Jan Hubicka <jh@suse.cz> From-SVN: r49556
2002-02-05re PR fortran/3393 (ICE in extract_insn, at recog.c:2173)Richard Henderson1-3/+3
PR fortran/3393 * loop.c (loop_iv_add_mult_emit_before): Copy multiplier as well. (loop_iv_add_mult_sink, loop_iv_add_mult_hoist): Likewise. From-SVN: r49521
2002-01-30* loop.c (loop_invariant_p): Special case pic_offset_table_rtx.Steve Ellcey1-1/+1
From-SVN: r49355
2002-01-29emit-rtl.c (gen_rtx_REG): Check that the PIC_OFFSET_TABLE_REGNUM is a fixed ↵John David Anglin1-0/+3
register before returning... * emit-rtl.c (gen_rtx_REG): Check that the PIC_OFFSET_TABLE_REGNUM is a fixed register before returning pic_offset_table_rtx. * loop.c (scan_loop): Don't hoist insns that set pic_offset_table_rtx when PIC_OFFSET_TABLE_REG_CALL_CLOBBERED is defined. From-SVN: r49304
2002-01-25loop.c (emit_prefetch_instructions): Use the prefetch insn's mode, not Pmode.Aldy Hernandez1-1/+2
2002-01-24 Aldy Hernandez <aldyh@redhat.com> * loop.c (emit_prefetch_instructions): Use the prefetch insn's mode, not Pmode. * builtins.c (expand_builtin_prefetch): Same. From-SVN: r49200
2002-01-23* loop.c [!HAVE_prefetch] (CODE_FOR_prefetch): Define to 0.Hans-Peter Nilsson1-0/+1
From-SVN: r49129
2002-01-22Makefile.in (loop.o): Depend on OPTABS_H.Janis Johnson1-0/+5
* Makefile.in (loop.o): Depend on OPTABS_H. * loop.c (expand_builtin_prefetch): Check the prefetch operand against the predicate. From-SVN: r49095
2002-01-03builtins.c: Fix formatting.Kazu Hirata1-12/+12
* builtins.c: Fix formatting. * c-typeck.c: Likewise. * combine.c: Likewise. * expr.c: Likewise. * loop.c: Likewise. From-SVN: r48512
2002-01-03final.c (final_scan_insn): Change 0 -> NULL_RTX in FIND_REG_INC_NOTE call.Eric Christopher1-2/+2
2002-01-02 Eric Christopher <echristo@redhat.com> * final.c (final_scan_insn): Change 0 -> NULL_RTX in FIND_REG_INC_NOTE call. Update copyright. * loop.c (canonicalize_condition): Ditto. * reorg.c (delete_scheduled_jump): Ditto. From-SVN: r48506
2002-01-03except.c: Fix comment typos.Kazu Hirata1-2/+2
* except.c: Fix comment typos. * loop.c: Likewise. * varasm.c: Likewise. * doc/tm.texi: Fix a typo. From-SVN: r48488
2001-12-30loop.c (check_dbra_loop): Fix last change: examine both ↵Richard Henderson1-1/+3
has_multiple_exit_targets and exit_count. * loop.c (check_dbra_loop): Fix last change: examine both has_multiple_exit_targets and exit_count. From-SVN: r48404
2001-12-29loop.c (prescan_loop): Set has_multiple_exit_targets for exception edges.Richard Henderson1-55/+72
* loop.c (prescan_loop): Set has_multiple_exit_targets for exception edges. Rearrange jump interpretation code to use pc_set. (check_dbra_loop): Examine has_multiple_exit_targets not exit_count. * sched-deps.c (sched_analyze_insn): Set scheduling barrier for all insns that can throw, not just if flag_non_call_exceptions. From-SVN: r48377
2001-12-22loop.c (scan_loop, [...]): Do not overlook hard registers when computing ↵David Edelsohn1-21/+42
statistics. * loop.c (scan_loop, move_movables, count_one_set): Do not overlook hard registers when computing statistics. From-SVN: r48280
2001-12-13Update whitespace.Richard Kenner1-1/+1
From-SVN: r47974
2001-12-13loop.c (remove_constant_addition): Fix prototype and whitespace.Richard Kenner1-49/+77
* loop.c (remove_constant_addition): Fix prototype and whitespace. (emit_prefetch_instructions): Remove warnings and whitespace changes. From-SVN: r47972
2001-12-13predict.c (estimate_probability): Reorganize opcode heuristics.Jan Hubicka1-0/+593
* predict.c (estimate_probability): Reorganize opcode heuristics. * predict.def (PRED_OPCODE_POSITIVE, PRED_OPCODE_NONEQUAL, PRED_FPOPCODE): New. * i386.c (override_options): Recognize various CPU variants and set SSE/MMX/3dNOW flags accordingly. * i386.h (MASK_MMX_SET, MASK_SSE_SET, MASK_SSE2_SET, MASK_3DNOW_SET, MASK_3DNOW_A_SET): New. (MASK_ACCUMULATE_OUTGOING_ARGS_SET): New. (MASK_NO_ACCUMULATE_OUTGOING_ARGS): Delete. (MASK_*): Renumber. (TARGET_FLAGS): Use new masks. (CPP_CPU_SPECS): Recognize new CPU variants. * invoke.texi (-mcpu): Update documentation. * flags.h (flag_prefetch_loop_arrays): Declare. * loop.h (LOOP_PREFETCH): Define new constant. * loop.c (strength_reduce): Call emit_prefetch_instructions. (MAX_PREFETCHES, PREFETCH_BLOCKS_BEFORE_LOOP_MAX, PREFETCH_BLOCKS_BEFORE_LOOP_MIN, PREFETCH_BLOCKS_IN_LOOP_MIN): New constants. (check_store_data): New structure. (check_store, emit_prefetch_instructions, rtx_equal_for_prefetch_p): New functions. * toplev.c: Include insn-flags.h. (flag_prefetch_loop_arrays): New global variable. (lang_independent_option): Add -fprefetch-loop-arrays. (rest_of_compilation) Pass LOOP_PREFETCH when flag_prefetch_loop_arrays is set. * Makefile.in (toplev.c): Depend on insn-flags.h. * invoke.texi (-fprefetch-loop-arrays): Document. * predict.c (estimate_probability): Distribute the loop exit probability according to number of exit edges. * cfgcleanup.c (insns_match_p): Break out from ...; (flow_find_cross_jump): ... here; (outgoing_edges_match): Add parameter MODE; attempt to match everything except for tablejumps. (try_crossjump_to_edge): Accept complex edges. (try_crossjump_bb): Likewise. From-SVN: r47969
2001-11-15alias.c (nonoverlapping_memrefs): Use REGNO_PTR_FRAME_P.Richard Kenner1-1/+1
* alias.c (nonoverlapping_memrefs): Use REGNO_PTR_FRAME_P. * emit-rtl.c (change_address): Fix typo in default alignment. (adjust_address_1): Use mode of NEW, not MODE, when setting size. * expr.c (highest_pow2_factor, case WITH_RECORD_EXPR): New case. * rtl.h (REGNO_PTR_FRAME_P): New macro. * expr.c (store_field): Pass tree instead of max size; callers changed. Change handling of alignment. Only copy to_rtx if is TARGET. (expand_expr_unaligned): Delete; callers now use expand_expr. (emit_cmp_insn): No longer take ALIGN parm; all callers changed. (expand_assignment): Change handling of alignment. Only copy to_rtx if was original. (get_inner_reference): No longer return alginment; callers changed. (expand_expr, case COMPONENT_REF): Change handling of alignment. (expand_expr, case ADDR_EXPR): Make copy if not sufficiently aligned. (compare_from_rtx): Delete ALIGN parm; all callers changed. (do_compare_rtx_and_jump): Likewise. * expr.h: Reflect above changes. * tree.h: Likewise. * dwarf2out.c (loc_descriptor_from_tree): Remove ALIGN parameter to get_inner_reference. * except.c: Remove ALIGN parameter in call to emit_cmp_and_jump_insns. * explow.c: Likewise. * loop.c: Likewise. * optabs.c: Likewise. (prepare_cmp_insn): Now static; remove ALIGN parm. Callers changed. (emit_cmp_and_jump_insns): Remove ALIGN parm; all callers changed. * fold-const.c: Remove PALIGN in calls to get_inner_reference. * function.c (assign_stack_temp_for_type): No longer static. * optabs.h (emit_cmp_insn): Remove ALIGN parm. (prepare_cmp_insn): Delete declaration. * rtl.h (assign_stack_temp_for_type): Add declaration. * config/d30v/d30v.c: Reflect above changes. * config/i860/i860.c, config/ia64/ia64.c: Likewise. * config/rs6000/rs6000.c, config/sh/sh.c: Likewise. * ada/trans.c, ada/utils2.c: Remove PALIGN parameter to get_inner_reference. From-SVN: r47075
2001-11-15jump.c (squeeze_notes): Return true if no real insns were found.Jakub Jelinek1-1/+2
* jump.c (squeeze_notes): Return true if no real insns were found. * rtl.h (squeeze_notes): Adjust prototype. * cfgcleanup.c (merge_blocks_move_predecessor_nojumps): If squeeze_notes finds no real instructions, abort. (merge_blocks_move_successor_nojumps): Likewise. * loop.c (find_and_verify_loops): Likewise. * stmt.c (expand_end_case): Likewise. * ifcvt.c (dead_or_predicable): Return TRUE if squeeze_notes doesn't find any real instructions. * gcc.c-torture/compile/20011114-4.c: New test. From-SVN: r47048
2001-11-13loop.c (combine_movables): Turn off combination until move_movables ↵Richard Henderson1-1/+4
validation bugs are fixed. * loop.c (combine_movables): Turn off combination until move_movables validation bugs are fixed. From-SVN: r46995