aboutsummaryrefslogtreecommitdiff
path: root/gcc/rtl.h
AgeCommit message (Collapse)AuthorFilesLines
2003-05-14rtl.h (TREE_CONSTANT_POOL_ADDRESS_P): Rename from DEFERRED_CONSTANT_P.Richard Henderson1-6/+7
* rtl.h (TREE_CONSTANT_POOL_ADDRESS_P): Rename from DEFERRED_CONSTANT_P. * integrate.c (copy_rtx_and_substitute): Update use. * varasm.c (build_constant_desc): Set SYMBOL_REF_DECL to the copy generated. (maybe_output_constant_def_contents): Examine TREE_ASM_WRITTEN of the constant to see if we should emit. (mark_constant): Similarly. (output_constant_def_contents): Set TREE_ASM_WRITTEN. From-SVN: r66807
2003-05-13varasm.c (notice_rtl_inlining_of_deferred_constant): New function.Zack Weinberg1-0/+3
* varasm.c (notice_rtl_inlining_of_deferred_constant): New function. * rtl.h: Prototype it. * integrate.c (copy_rtx_and_substitute <SYMBOL_REF>): Call it when appropriate. From-SVN: r66762
2003-05-05rtl.h (STRING_POOL_ADDRESS_P): Rename to DEFERRED_CONSTANT_P.Zack Weinberg1-4/+5
* rtl.h (STRING_POOL_ADDRESS_P): Rename to DEFERRED_CONSTANT_P. * varasm.c (struct varasm_status): Add deferred_constants field. (n_deferred_strings): Delete variable. (n_deferred_constants): New #define. (struct constant_descriptor_tree): Kill next and label fields. (const_hash_table, MAX_HASH_TABLE): Delete. (const_desc_htab): New static variable. (const_hash): Rename const_desc_hash, and make it fit the hashtab.h interface. (const_desc_eq): New. (const_hash_1, compare_constant): Const-ify arguments. (build_constant_desc): Set DEFERRED_CONSTANT_P on all new SYMBOL_REFs. Clarify comments. Don't set desc->label. (output_constant_def): Do the lookup/insert using the hashtab.h interface. Don't muck with n_deferred_constants or DEFERRED_CONSTANT_P here. Always call maybe_output_constant_def_contents. (maybe_output_constant_def_contents): Take a pointer to the descriptor, not the EXP and RTL separately. Return immediately if this constant is not deferred. Defer output of everything, except writable string constants. Update n_deferred_constants here. (output_constant_def_contents): Now takes just one argument, an rtx. Clear DEFERRED_CONSTANT_P here. (mark_constant_pool): Update for rename of n_deferred_strings. (mark_constant): Don't clear DEFERRED_CONSTANT_P here. (init_varasm_status): Clear p->deferred_constants. (init_varasm_once): Call htab_create_ggc for const_desc_htab. * gcc.dg/const-elim-1.c, gcc.dg/const-elim-2.c: New testcases. From-SVN: r66505
2003-05-03emit-rtl.c (last_call_insn, [...]): New functions.Olivier Hainque1-0/+2
* emit-rtl.c (last_call_insn, add_function_usage_to): New functions. * rtl.h (last_call_insn, add_function_usage_to): New prototypes. * builtins.c (expand_builtin_apply): Use the new emit-rtl functions. * calls.c (emit_call_1): Likewise. (expand_call): For calls initializing constant memory, replace emission of standalone mem /u clobber with function usage entry. * expr.c (emit_block_move_via_libcall): Likewise. * cse.c (count_reg_usage, case EXPR_LIST): New case. * flow.c (propagate_one_insn): Pass entire operand of CALL_INSN_FUNCTION_USAGE to mark_used_regs. * integrate.c (try_constants): For CALL_INSNs, substitute constants within the FUNCTION_USAGE also. * loop.c (prescan_loop): Note clobbers of const mem mentioned in FUNCTION_USAGE lists. * reload1.c (replace_pseudos_in): Renamed. (reload): Use it for clobbers surviving until the end of the reload. From-SVN: r66429
2003-04-27varasm.c (const_str_htab_hash, [...]): Kill.Zack Weinberg1-1/+1
* varasm.c (const_str_htab_hash, const_str_htab_eq, STRHASH, struct deferred_string, const_str_htab): Kill. (n_deferred_strings): New static variable. (build_constant_desc): Set SYMBOL_REF_DECL of the new symbol_ref to point to the constant. (output_constant_def): When a deferred string is forced out, just clear STRING_POOL_ADDRESS_P and decrement n_deferred_strings. (mark_constant): Likewise. (maybe_output_constant_def_contents): When deferring a string constant, just set STRING_POOL_ADDRESS_P and increment n_deferred_strings. (mark_constant_pool): Check n_deferred_strings, not the size of const_str_htab. (init_varasm_once): No need to create const_str_htab. * rtl.def, rtl.h, doc/rtl.texi: Document possibility that SYMBOL_REF_DECL points to a constant. From-SVN: r66133
2003-04-22re PR middle-end/8866 (Bug in switch statement code generation -- missing label)Richard Henderson1-1/+7
PR 8866 * rtl.h (MEM_NOTRAP_P): New. (MEM_COPY_ATTRIBUTES): Copy it. * rtlanal.c (may_trap_p): Check it. * expr.c (do_tablejump): Set it. * doc/rtl.texi (Flags): Document it. * cfgrtl.c (try_redirect_by_replacing_jump): Revert last three changes. From-SVN: r65967
2003-04-21Break out coverage routines to new file.Nathan Sidwell1-2/+6
* Makefile.in (COVERAGE_H): New variable (C_OBJS): Add coverage.o (coverage.o): New target. (profile.o, loop-init.o, sched-ebb.o, predict.o, tracer.o): Adjust dependencies. (GTFILES): Adjust. (gt-coverage.h): New target. (gt-profile.h): Remove. * profile.h: Remove. Move to ... * coverage.h: ... here. New. #include gcov-io.h. * gcov-io.h: Move function definitions to ... * gcov-io.c: ... here. New. * profile.c: Move coverage routines to coverage.c. (instrument_edges, get_exec_counts, branch_prob, init_branch_prob, end_branch_prob): Adjust. * coverage.c: New. Coverage routines from profile.c (coverage_counter_ref, coverage_init, coverage_finish, coverage_end_function, coverage_begin_output, coverage_counter_ref, get_coverage_counts): Define. * gcov-dump.c, gcov.c: #include gcov-io.c. * libgcov.c: Likewise. Adjust. * loop-init.c: Don't #include profile.h * tracer.c, predict.c, sched-ebb.c: Adjust #includes. * rtl.h: Add coverage prototypes. * toplev.c (compile_file): Init coverage, not branch_prob. Always call coverage_finish. (rest_of_compilation): Call coverage_end_function. From-SVN: r65897
2003-04-17emit-rtl.c (subreg_hard_regno): Check that register is representable.Jan Hubicka1-0/+4
* emit-rtl.c (subreg_hard_regno): Check that register is representable. * reload.c (reload_inner_reg_of_subreg): When register is not representable, reload the whole thing. (find_reloads): Likewsie. * rtlanal.c (subreg_representable_p): New function. * profile.c (compute_branch_probabilities): Cleanup sanity checking; allow negative probabilities for edges from the call to exit. (branch_prob): Do not add fake edges for functions that may return twice From-SVN: r65757
2003-04-17rtl.h (SYMBOL_FLAG_MACH_DEP_SHIFT): New.Richard Henderson1-1/+2
* rtl.h (SYMBOL_FLAG_MACH_DEP_SHIFT): New. * config/m32r/m32r.c (SYMBOL_FLAG_MODEL_SHIFT): New. (SYMBOL_REF_MODEL): New. (LIT_NAME_P): Move from m32r.h. (m32r_select_section): Remove. (m32r_encode_section_info): Use SYMBOL_REF_FLAGS. (m32r_strip_name_encoding): Remove. (m32r_in_small_data_p): New. (small_data_operand): Use SYMBOL_REF_SMALL_P. (addr24_operand): Use SYMBOL_REF_MODEL. (call26_operand): Likewise. (addr32_operand): Tidy. (m32r_print_operand): Use HOST_WIDE_INT_PRINT_HEX. * config/m32r/m32r.h (RODATA_SECTION_ASM_OP): Remove. (SDATA_SECTION_ASM_OP, SBSS_SECTION_ASM_OP): Remove. (READONLY_DATA_SECTION_ASM_OP): Remove. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Remove. (SDATA_SECTION_FUNCTION, SBSS_SECTION_FUNCTION): Remove. (TARGET_ASM_SELECT_SECTION): Remove. (SDATA_FLAG_CHAR, MEDIUM_FLAG_CHAR, LARGE_FLAG_CHAR): Remove. (SDATA_NAME_P, SMALL_NAME_P, MEDIUM_NAME_P): Remove. (LARGE_NAME_P, ENCODED_NAME_P): Remove. (ASM_OUTPUT_LABELREF): Remove. From-SVN: r65731
2003-04-16rtl.h (MEM_ALIAS_SET): Update documentation.Richard Henderson1-6/+3
* rtl.h (MEM_ALIAS_SET): Update documentation. * doc/rtl.texi (Special Accessors): New node. (SYMBOL_REF_FLAG): Note relationship with SYMBOL_REF_FLAGS. From-SVN: r65714
2003-04-14rtl.h (SYMBOL_REF_TLS_MODEL): Fix mask value.Janis Johnson1-1/+1
2003-04-14 Janis Johnson <janis287@us.ibm.com> * rtl.h (SYMBOL_REF_TLS_MODEL): Fix mask value. From-SVN: r65602
2003-04-11rtl.def (SYMBOL_REF): Add two 0 fields.Richard Henderson1-0/+40
* rtl.def (SYMBOL_REF): Add two 0 fields. * gengtype.c (adjust_field_rtx_def): Handle them. * print-rtl.c (print_rtx): Print them. * rtl.h (SYMBOL_REF_DECL, SYMBOL_REF_FLAGS): New. (SYMBOL_FLAG_FUNCTION, SYMBOL_REF_FUNCTION_P): New. (SYMBOL_FLAG_LOCAL, SYMBOL_REF_LOCAL_P): New. (SYMBOL_FLAG_SMALL, SYMBOL_REF_SMALL_P): New. (SYMBOL_FLAG_TLS_SHIFT, SYMBOL_REF_TLS_MODEL): New. (SYMBOL_FLAG_EXTERNAL, SYMBOL_REF_EXTERNAL_P): New. (SYMBOL_FLAG_MACH_DEP): New. * optabs.c (init_one_libfunc): Zap fake SYMBOL_REF_DECL. * varasm.c (make_decl_rtl): Set SYMBOL_REF_DECL. (assemble_static_space): Set SYMBOL_REF_FLAGS. (assemble_trampoline_template): Likewise. (output_constant_def, force_const_mem): Likewise. (default_encode_section_info): New. * output.h: Declare it. * target-def.h (TARGET_ENCODE_SECTION_INFO): Use it. From-SVN: r65479
2003-04-06hashtable.c (gcc_obstack_init): Delete this function and everything related ↵Steven Bosscher1-4/+0
to it. 2003-04-06 Steven Bosscher <steven@gcc.gnu.org> * hashtable.c (gcc_obstack_init): Delete this function and everything related to it. * hashtable.h: Remove prototype. * bitmap.c (bitmap_element_allocate): Cleanup redundant defines. Cleanup some unnecessary whitespace. * defaults.h (obstack_chunk_alloc): Redefine with appropriate casts for libiberty obstacks. (obstack_chunk_free): Ditto. (OBSTACK_CHUNK_SIZE): Define, default to 0. (gcc_obstack_init): Define as a call to _obstack_begin. * tree.c (print_obstack_statistics): Delete this unused function. * tree.h (obstack): Don't forward-declare. (print_obstack_statistics): Delete prototype. (print_obstack_name): Ditto. (gcc_obstack_init): Ditto. * rtl.h (gcc_obstack_init): Ditto. * java/jv-scan.c (gcc_obstack_init): Delete this function, its prototype and related defines. * java/jvgenmain.c (gcc_obstack_init): Delete this function, and related defines. * java/parse-scan.y (obstack_chunk_alloc): Don't define. (obstack_chunk_free): Ditto From-SVN: r65308
2003-04-05alias.c (find_base_term): Export.Zdenek Dvorak1-0/+1
* alias.c (find_base_term): Export. * rtl.h (find_base_term): Declare. * gcse.c (find_moveable_store): Test for flag_non_call_exceptions instead of flag_exceptions. Move test for parameter passing ... (store_killed_in_insn): ... here. From-SVN: r65272
2003-04-03re PR rtl-optimization/10157 ([Sparc] internal compiler error: in ↵Eric Botcazou1-0/+1
extract_insn, at recog.c:2188) PR optimization/10157 * gcse.c (can_copy_p): Rename it to can_copy. (can_copy_init_p): Remove. (compute_can_copy): Use can_copy instead of can_copy_p. (can_copy_p): New exported function. Call compute_can_copy. (hash_scan_set): Use it. (gcse_main): Don't call compute_can_copy. (bypass_jumps): Don't call compute_can_copy. * rtl.h (can_copy_p): Declare. * loop.c (scan_loop): Don't move the source and add a reg-to-reg copy if the mode doesn't support copy operations. From-SVN: r65210
2003-03-24function.c (put_var_into_stack): Change bool parameter to int.Mark Mitchell1-1/+1
* function.c (put_var_into_stack): Change bool parameter to int. (gen_mem_addressof): Likewise. * rtl.h (gen_mem_addressof): Likewise. * tree.h (put_var_into_stack): Likewise. * config/alpha/alpha.c (alpha_gp_save_rtx): Adjust call to gen_mem_addressof or put_var_into_stack. * config/c4x/c4x.c (c4x_expand_builtin): Likewise. * config/ia64/ia64.c (spill_tfmode_operand): Likewise. From-SVN: r64807
2003-03-24re PR c++/7086 (compile time regression)Mark Mitchell1-1/+1
PR c++/7086 * c-typeck.c (c_mark_addressable): Adjust calls to put_var_into_stack. * expr.c (expand_expr): Likewise. * function.c (put_var_into_stack): Add rescan parameter. Do not call fixup_var_refs when rescan is false. (gen_mem_addressof): Likewise. (assign_parms): Adjust calls to put_var_into_stack. (setjmp_protect): Likewise. (setjmp_protect_args): Likewise. * rtl.h (gen_mem_addressof): Change prototype. * stmt.c (expand_decl): Adjust calls to put_var_into_stack. * tree.h (put_var_into_stack): Change prototype. PR c++/7086 * utils2.c: Adjust calls to put_var_into_stack. PR c++/7086 * semantics.c (genrtl_named_return_value): Adjust calls to put_var_into_stack. * typeck.c (cxx_mark_addressable): Likewise. PR c++/7086 * com.c (ffecom_sym_transform_): Adjust calls to put_var_into_stack. (ffe_mark_addressable): Likewise. From-SVN: r64781
2003-03-15rtl.h (subrtx_p): Renamed to rtx_referenced_p.Josef Zlomek1-3/+4
* rtl.h (subrtx_p): Renamed to rtx_referenced_p. (rtx_pair): Added new element update_label_nuses, renamed to replace_label_data. * cfgcleanup.c (outgoing_edges_match, try_crossjump_to_edge): Use replace_label_data instead of rtx_pair. * loop.c (load_mems): Likewise. * rtlanal.c (replace_label): Replace label in pool constants and in INSN_LIST (in REG_LABEL note). (subrtx_p): Renamed to rtx_referenced_p. (subrtx_p_1): Renamed to rtx_referenced_p_1, compare the interior of LABEL_REF with CODE_LABEL, traverse constants from pool. From-SVN: r64419
2003-03-10cfgcleanup.c (outgoing_edges_match): Compare the jump tables.Josef Zlomek1-0/+10
* cfgcleanup.c (outgoing_edges_match): Compare the jump tables. (try_crossjump_to_edge): Replace refereces to one jump table by references to identical jump table. * loop.c (load_mems): Moved setting the JUMP_LABEL to replace_label. (replace_label): Moved to rtlanal.c. (struct rtx_pair): Moved to rtl.h. * rtl.h (struct rtx_pair): Moved from loop.c. (replace_label): New extern function. (subrtx_p): New extern function. (tablejump_p): New extern function. * rtlanal.c (replace_label): Moved from loop.c. (subrtx_p_1): New static function. (subrtx_p): New function. (tablejump_p): New function. From-SVN: r64096
2003-02-28emit-rtl.c (set_reg_attrs_for_parm): New function.Josef Zlomek1-0/+1
* emit-rtl.c (set_reg_attrs_for_parm): New function. * rtl.h (set_reg_attrs_for_parm): New exported function. * function.c (assign_parms): Use set_reg_attrs_for_parm instead of set_reg_attrs_from_mem. From-SVN: r63548
2003-02-20toplev.c (flag_sched2_use_superblocks, [...]): New global variables.Jan Hubicka1-1/+1
* toplev.c (flag_sched2_use_superblocks, flag_sched2_use_traces): New global variables. (lang_independent_options): Add -fsched2-use-superblocks -fsced2-use-traces. (rest_of_compilation): Deal with it. * invoke.texi (-fsched2-use-traces, fsched2-use-superblocks): Declare. * flags.h (flag_sched2_use_superblocks, flag_sched2_use_traces): Declare. * rtl.h (reg_to_stack): Update prototype. * reg-stack.c (reg_to_stack): Return when something has changed; update liveness when executing after superblock scheduling. * combine.c (simplify_shift_const): Simplify few special cases into constants. From-SVN: r63183
2003-02-20combine.c (distribute_notes): Kill REG_EXEC_COUNT.Josef Zlomek1-5/+0
* combine.c (distribute_notes): Kill REG_EXEC_COUNT. * rtl.c (reg_note_name): Likewise. * rtl.h (enum reg_note): Likewise. * doc/invoke.texi: Likewise. * doc/rtl.texi: Likewise. From-SVN: r63157
2003-02-05genconfig.c (main): Generate CC0_P.Kazu Hirata1-7/+0
* genconfig.c (main): Generate CC0_P. * rtl.h (CC0_P): Remove. From-SVN: r62423
2003-01-24emit-rtl.c (reg_attrs_htab): New static variable.Jan Hubicka1-1/+28
* emit-rtl.c (reg_attrs_htab): New static variable. (reg_attrs_htab_hash, reg_attrs_htab_eq, get_reg_attrs): New static functions. (reg_rtx): Do not maintain regno_decl. (gen_rtx_REG_offset, set_reg_attrs_from_mem, set_delc_rtx, set_mem_attrs_from_reg): New global function. (init_emit): Do not initialize regno_decl. (init_emit_once): initialize reg_attrs_htab. * final.c (alter_subreg): Do not replace REG by SUBREG. (gen_mem_expr_from_op): Improve output. (output_asm_operands): Likewise. * function.c (assign_params): Do not set REGNO_DECL. * function.h (struct function): Kill regno_decl. (REGNO_DECL): Kill. * gengtype.c (adjust_field_rtx_def): Handle new field of reg. * print_rtl.c (print_rtx): Output REG information. * regclass.c (reg_scan_mark_refs): Update attrs. * reload1.c (alter_reg): Likewise. * simplify_rtx.c (simplify_subreg): Likewise. * stmt.c (expand_decl): Likewise. * rtl.def (REG): Add new field. * rtl.h (struct reg_attrs): New. (rtunion_def): At rtreg. (X0MEMATTR): Add checking. (X0REGATTR, REG_ATTRS, REG_EXPR, REG_OFFSET): New macro. (set_reg_attrs_from_mem, set_mem_attrs_from_reg, gen_rtx_REG_offset): Declare. * tree.h (SET_DECL_RTL): Call set_decl_rtl. From-SVN: r61741
2003-01-23re PR rtl-optimization/8423 (CSE1 not propagating __builtin_constant_p enough)Roger Sayle1-0/+1
PR optimization/8423 * cse.c (fold_rtx): Only eliminate a CONSTANT_P_RTX to 1 when its argument is constant, or 0 if !flag_gcse. * simplify-rtx.c (simplify_rtx): Convert CONSTANT_P_RTX to 1 if it's argument is constant. * gcse.c (want_to_gcse_p): Ignore CONSTANT_P_RTX nodes. (hash_scan_set): Don't record CONSTANT_P_RTX expressions. (do_local_cprop): Don't propagate CONSTANT_P_RTX constants. * builtins.c (purge_builtin_constant_p): New function to force instantiation of any remaining CONSTANT_P_RTX nodes. * rtl.h (purge_builtin_constant_p): Prototype here. * toplev.c (rest_of_compilation): Invoke purge_builtin_constant_p pass after GCSE and before loop. (flag_gcse): No longer static. * flags.h (flag_gcse): Prototype here. From-SVN: r61642
2003-01-16gcse.c (one_cprop_pass): Change function arguments to take both cprop_jumps ↵Roger Sayle1-1/+2
and bypass_jumps flags... * gcse.c (one_cprop_pass): Change function arguments to take both cprop_jumps and bypass_jumps flags instead of just alter_jumps. (gcse_main): Update calls to one_cprop_pass, disabling bypassing. (bypass_jumps): New function to perform separate jump bypassing pass. * rtl.h (bypass_jumps): Add function prototype. * timevar.def (TV_BYPASS): New timing variable. * toplev.c (enum dump_file_index): Add new entry DFI_bypass. (dump_file): New entry for the bypass RTL dump file. (rest_of_compilation): Insert new jump bypassing optimization pass after loop. * doc/passes.texi: Document new pass. From-SVN: r61374
2003-01-08i386.md (adddi3_carry_rex64, [...]): Name pattern.Jan Hubicka1-0/+1
* i386.md (adddi3_carry_rex64, subdi3_carry_rex64): Name pattern. (addhi3_carry, addqi3_carry, subhi3_carry, subqi3_carry): New patterns. (add??cc): New expanders. * i386.c (expand_int_addcc): New function. * i386-protos.h (expand_int_addcc): Declare. * alias.c (memory_modified_1): New static function. (memory_modified): New static varaible. (memory_modified_in_insn_p): New global function. * rtl.h (memory_modified_in_insn_p): Declare. * rtlanal.c (modified_between_p, modified_in_p): Be smart about memory references. * expr.h (emit_conditional_add): Declare. From-SVN: r61038
2002-12-26ssa-dce.c (EXECUTE_IF_UNNECESSARY): Verify INSN is an INSN_P before checking ↵Jose Renau1-3/+4
to see if it is dead. * ssa-dce.c (EXECUTE_IF_UNNECESSARY): Verify INSN is an INSN_P before checking to see if it is dead. (mark_all_insn_unnecessary): Similarly. (ssa_eliminate_dead_code): Similarly. * rtl.h (struct rtx_def): Update comments for in_struct usage in dead code elimination pass. (INSN_DEAD_CODE_P): Allow JUMP_INSN and CALL_INSN as well. From-SVN: r60520
2002-12-24regmove.c: Fix comment typos.Kazu Hirata1-1/+1
* regmove.c: Fix comment typos. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sched-deps.c: Likewise. * sched-rgn.c: Likewise. * sibcall.c: Likewise. * simplify-rtx.c: Likewise. * ssa-ccp.c: Likewise. * ssa.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * system.h: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * tracer.c: Likewise. * tree-inline.c: Likewise. * tree.c: Likewise. * tree.h: Likewise. * unroll.c: Likewise. * varasm.c: Likewise. From-SVN: r60473
2002-12-16Merge basic-improvements-branch to trunkZack Weinberg1-1/+35
From-SVN: r60174
2002-11-27expr.c (gen_group_rtx, [...]): New functions.John David Anglin1-3/+4
* expr.c (gen_group_rtx, emit_group_move): New functions. * expr.h (gen_group_rtx, emit_group_move): Prototype. * function.c (expand_function_start): Use gen_group_rtx to create a PARALLEL rtx to hold the return value when the real return rtx is a PARALLEL. (expand_function_end): Use emit_group_move to move the return value from a PARALLEL to the real return registers. * rtl.h (REG_FUNCTION_VALUE_P): Allow function values to be returned in PARALLELs. From-SVN: r59554
2002-11-04hard-reg-set.h (REG_CANNOT_CHANGE_MODE_P): New.Aldy Hernandez1-0/+10
2002-11-04 Aldy Hernandez <aldyh@redhat.com> * hard-reg-set.h (REG_CANNOT_CHANGE_MODE_P): New. * config/rs6000/rs6000.h (CLASS_CANNOT_CHANGE_MODE_P): Remove. (CLASS_CANNOT_CHANGE_MODE): Remove. (CANNOT_CHANGE_MODE_CLASS): New. * config/alpha/alpha.h: Same. * config/ia64/ia64.h: Same. * config/mips/mips.h: Same. * config/s390/s390.h: Same. * config/sh/sh.h: Same. * config/pa/pa64-regs.h: Same. * config/sh/sh-protos.h (sh_cannot_change_mode_class): Add prototype. * config/sh/sh.c (sh_cannot_change_mode_class): New. * config/mips/mips-protos.h (mips_cannot_change_mode_class): Add prototype. * config/mips/mips.c (mips_cannot_change_mode_class): New. * doc/tm.texi (Register Classes): Remove CLASS_CANNOT_CHANGE_MODE and CLASS_CANNOT_CHANGE_MODE_P. Document CANNOT_CHANGE_MODE_CLASS. * reload.c (push_reload): Use CANNOT_CHANGE_MODE_CLASS. (push_reload): Same. * simplify-rtx.c (simplify_subreg): Same. * reload1.c (choose_reload_regs): Same. * recog.c (register_operand): Same. * regrename.c (mode_change_ok): Change to use new CANNOT_CHANGE_MODE_CLASS infrastructure. * regclass.c (cannot_change_mode_set_regs): New. Declare subregs_of_mode. (regclass): Use subregs_of_mode. Remove references to reg_changes_mode. (init_reg_sets_1): Remove class_can_change_mode and reg_changes_mode code. (invalid_mode_change_p): New. (dump_regclass): Use invalid_mode_change_p instead of class_can_change_mode. (regclass): Same. (record_operand_costs): Do not set reg_changes_mode. * local-alloc.c (struct qty): Remove changes_mode field. (alloc_qty): Remove changes_mode initialization. (update_qty_class): Remove set of changes_mode. (find_free_reg): Use subregs_of_mode. * global.c (find_reg): Use subregs_of_mode info. * rtl.h (cannot_change_mode_set_regs): New prototype. (invalid_mode_change_p): Same. (REG_CANNOT_CHANGE_MODE_P): New macro. * flow.c (mark_used_regs): Calculate subregs_of_mode. Remove REG_CHANGES_MODE. (life_analysis): Clear subregs_of_mode. * combine.c (subst): Pass class to CLASS_CANNOT_CHANGE_MODE_P. Remove use of CLASS_CANNOT_CHANGE_MODE. (simplify_set): Same. (gen_lowpart_for_combine): Calculate subregs_of_mode. Remove REG_CHANGES_MODE. * regs.h: Add extern for subregs_of_mode; Include hard-reg-set and basic-block. (REG_CHANGES_MODE): Delete. From-SVN: r58794
2002-10-07Permit doloop treatment for preconditioned loops.Dale Johannesen1-0/+1
From-SVN: r57902
2002-09-30reload.c (push_reload): Handle subregs and secondary memory.Jan Hubicka1-0/+1
* reload.c (push_reload): Handle subregs and secondary memory. * reload1.c (gen_reload): Likewise. * jump.c (reg_or_subregno): New function. * rtl.h (reg_or_subregno): Declare * unroll.c (find_splittable_givs): Handle subregs. From-SVN: r57663
2002-09-26c-common.h: Follow spelling conventions.Kazu Hirata1-1/+1
* c-common.h: Follow spelling conventions. * cpplex.c: Likewise. * cpplib.h: Likewise. * gthr-dce.h: Likewise. * gthr-posix.h: Likewise. * optabs.c: Likewise. * output.h: Likewise. * profile.c: Likewise. * protoize.c: Likewise. * ra-rewrite.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regclass.c: Likewise. * regmove.c: Likewise. * reload.c: Likewise. * reload.h: Likewise. * reload1.c: Likewise. * reorg.c: Likewise. * resource.c: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. From-SVN: r57555
2002-09-20real.c (real_hash): New.Richard Henderson1-6/+5
* real.c (real_hash): New. * real.h: Declare it. * cse.c (canon_hash): Use it. * cselib.c (hash_rtx): Likewise. * emit-rtl.c (const_double_htab_hash): Likewise. * rtl.h (CONST_DOUBLE_REAL_VALUE): New. * varasm.c (struct rtx_const): Reduce vector size; separate integer and fp vectors. (HASHBITS): Remove. (const_hash_1): Rename from const_hash. Use real_hash. Do not take modulus MAX_HASH_TABLE. (const_hash): New. Do take modulus MAX_HASH_TABLE. (output_constant_def): Do not take modulus MAX_HASH_TABLE. (SYMHASH): Don't use HASHBITS. (decode_rtx_const): Copy only active bits from REAL_VALUE_TYPE. Fix CONST_VECTOR thinko wrt fp vectors. Fix kind comparison. (simplify_subtraction): Fix kind comparison. (const_hash_rtx): Return unsigned int. Don't use HASHBITS. Use a union to pun integer array. * config/rs6000/rs6000.c (rs6000_hash_constant): Use real_hash; only hash two words of integral CONST_DOUBLE. From-SVN: r57356
2002-09-16Index: gcc/ChangeLogGeoffrey Keating1-4/+26
2002-09-12 Geoffrey Keating <geoffk@apple.com> * ggc-common.c (ggc_mark_rtx_children_1): Update for changed name mangling. The following changes are merged from pch-branch: * doc/gty.texi (GTY Options): Document %a. * gengtype.c (do_scalar_typedef): New function. (process_gc_options): Handle `length' option. (set_gc_used_type): A pointer to an array of structures doesn't qualify as a pointer to a structure. (output_escaped_param): Add `%a' escape. (write_gc_structure_fields): Allow 'desc' on array of unions. (main): Define `uint8', `jword' and `JCF_u2' as scalars; use do_scalar_typedef. * gengtype.c (enum rtx_code): Make global. (rtx_format): Make global. (rtx_next): New. (gen_rtx_next): New. (write_rtx_next): New. (adjust_field_rtx_def): Skip fields marked by chain_next. (open_base_files): Delete redundant prototype. (write_enum_defn): New. (output_mangled_typename): Correct abort call. (write_gc_marker_routine_for_structure): Handle chain_next and chain_prev options. (finish_root_table): Don't output redundant \n. (main): Call gen_rtx_next, write_rtx_next, write_enum_defn. * c-tree.h (union lang_tree_node): Add chain_next option. * gengtype.h (NUM_PARAM): New definition. (struct type): For TYPE_PARAM_STRUCT, allow multiple parameters. * gengtype.c (find_param_structure): New. (adjust_field_type): Handle param<n>_is option. (process_gc_options): Detect use_params option. Update callers. (set_gc_used_type): Add 'param' parameter, update callers. Handle 'use_params' option. (open_base_files): Add splay-tree.h to list of files included. (output_mangled_typename): New. (write_gc_structure_fields): Update 'param' parameter to support multiple parameters. Change name mangling. Allow parameterized fields to have an apparent scalar type. Handle param<n>_is options, use_param option. (write_gc_marker_routine_for_structure): Update for change to name mangling. Better guess the output file for parameterized types. (write_gc_types): Update for change to name mangling. (write_gc_root): Update for change to name mangling. Handle (ignore) param<n>_is options. * doc/gty.texi (GTY Options): Add description of param<n>_is options, use_params option. * ggc.h (ggc_mark_rtx): Update for changed name mangling. * gengtype-lex.l: Produce token for param<n>_is. * gengtype-yacc.y: Parse param<n>_is. * gengtype.c (adjust_field_tree_exp): Don't name a variable 'rindex'. * rtl.c: Update comment describing rtx_format. * rtl.h (union rtunion): Separate definition and typedef. (struct rtx_def): Use gengtype to mark. * Makefile.in (gengtype.o): Also depend on rtl.def. * ggc.h (ggc_mark_rtx_children): Delete prototype. (ggc_mark_rtx): Change to alias of gengtype-generated routine. * ggc-common.c (ggc_mark_rtx_children): Delete. (ggc_mark_rtx_children_1): Delete. (gt_ggc_m_rtx_def): Delete. * gengtype.c (adjust_field_rtx_def): New. (adjust_field_type): Call adjust_field_rtx_def. (write_gc_structure_fields): Add 'default' case to switch if none is specified; remove unused code. * tree.h (struct tree_exp): Update for change to meaning of special. * gengtype.c (adjust_field_tree_exp): New function. (adjust_field_type): Handle `tree_exp' special here. (write_gc_structure_fields): Don't handle `tree_exp' special here. Handle new `dot' option. * gengtype.h: Make `info' a pointer-to-const. * gengtype-yacc.y (yacc_ids): Use xasprintf. * gengtype.c (write_gc_structure_fields): Remove implementation of `always' option, add `default' option. * doc/gty.texi (GTY Options): Remove documentation of `always', add `default'. Index: gcc/cp/ChangeLog 2002-09-12 Geoffrey Keating <geoffk@apple.com> * cp-tree.h (union lang_tree_node): Add chain_next option. Index: gcc/f/ChangeLog 2002-09-12 Geoffrey Keating <geoffk@apple.com> * com.c (union lang_tree_node): Add chain_next option. Index: gcc/java/ChangeLog 2002-09-12 Geoffrey Keating <geoffk@apple.com> * java-tree.h (union lang_tree_node): Add chain_next option. From-SVN: r57206
2002-09-08basic-block.h: Fix comment formatting.Kazu Hirata1-1/+1
* basic-block.h: Fix comment formatting. * c-common.c: Likewise. * c-common.h: Likewise. * c-lex.c: Likewise. * c-pretty-print.c: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * defaults.h: Likewise. * et-forest.c: Likewise. * explow.c: Likewise. * function.h: Likewise. * gcov.c: Likewise. * genattrtab.c: Likewise. * gengtype.c: Likewise. * ifcvt.c: Likewise. * libgcc2.c: Likewise. * loop.c: Likewise. * profile.c: Likewise. * ra-build.c: Likewise. * real.c: Likewise. * rtl.h: Likewise. * tracer.c: Likewise. * tree-inline.c: Likewise. * varasm.c: Likewise. From-SVN: r56952
2002-08-14m68k.c (m68k_output_function_prologue, [...]): Delete versions for ↵Kaveh R. Ghazi1-2/+0
DPX2/MOTOROLA and NEWS/MOTOROLA. * m68k.c (m68k_output_function_prologue, m68k_output_function_epilogue): Delete versions for DPX2/MOTOROLA and NEWS/MOTOROLA. * genattrtab.c: Remove dpx2 comment. * libgcc2.c (__enable_execute_stack): Delete versions for NeXT/__MACH__, __convex__, __sysV88__, __pyr__ and sony_news/SYSTYPE_BSD. * longlong.h: Delete code for __a29k__, _AM29K, __clipper__, __gmicro__, __i860__, __NeXT__ and __pyr__. * rtl.h: Remove convex comment. * varasm.c: Likewise. From-SVN: r56272
2002-07-25rtl.h (mem_attrs): Spell out more clearly the roles of ALIGN, SIZE, EXPR and ↵J"orn Rennecke1-0/+3
OFFSET. * rtl.h (mem_attrs): Spell out more clearly the roles of ALIGN, SIZE, EXPR and OFFSET. From-SVN: r55753
2002-07-19rtl.def (CODE_LABEL): Remove slot 8.Zack Weinberg1-4/+52
* rtl.def (CODE_LABEL): Remove slot 8. * rtl.h (struct rtx_def): Document new uses of jump and call fields. (LABEL_ALTERNATE_NAME): Delete. (LABEL_KIND, SET_LABEL_KIND, LABEL_ALT_ENTRY_P): New. * defaults.h: Remove default for ASM_OUTPUT_ALTERNATE_LABEL_NAME. * final.c (output_alternate_entry_point): New. (final_scan_insn): Use it instead of ASM_OUTPUT_ALTERNATE_LABEL_NAME. Do not consider possibility of a case label being an alternate entry point. * cfgbuild.c (make_edges, find_bb_boundaries): Use LABEL_ALT_ENTRY_P. * emit-rtl.c (gen_label_rtx): Adjust call to gen_rtx_CODE_LABEL. Do not clear LABEL_NUSES (unnecessary) or LABEL_ALTERNATE_NAME (field deleted). * print-rtl.c, ra-debug.c: Update code to output CODE_LABELs. * doc/rtl.texi: Document LABEL_KIND, SET_LABEL_KIND, and LABEL_ALT_ENTRY_P; not LABEL_ALTERNATE_NAME. * doc/tm.texi: Delete documentation of ASM_OUTPUT_ALTERNATE_LABEL_NAME. From-SVN: r55597
2002-07-11rtl.h (gen_rtx_CONST_VECTOR): Declare.J"orn Rennecke1-0/+1
* rtl.h (gen_rtx_CONST_VECTOR): Declare. * gengenrtl.c (special_rtx): Check for CONST_VECTOR. * emit-rtl.c (gen_rtx_CONST_VECTOR): New function. (gen_const_vector_0): Use it. From-SVN: r55395
2002-06-20cfglayout.c (scope_to_insns_initialize): Call set_block_levels.Jan Hubicka1-0/+3
* cfglayout.c (scope_to_insns_initialize): Call set_block_levels. (scope_to_insns_finalize): Do not call set_block_levels; handle sequences. (choose_inner_scope): New. * rtl.h (choose_inner_scope): Declare. From-SVN: r54868
2002-06-14rtl.h (SCHED_GROUP_P): Disallow CODE_LABEL, BARRIER and NOTE.Franz Sirl1-5/+4
2002-06-14 Franz Sirl <Franz.Sirl-kernel@lauterbach.com> * rtl.h (SCHED_GROUP_P): Disallow CODE_LABEL, BARRIER and NOTE. * sched-deps.c (add_dependence): Likewise. (group_leader): Likewise. * sched-rgn.c (init_ready_list): Likewise. * doc/rtl.texi: Adjust accordingly. From-SVN: r54622
2002-06-14gcse.c (delete_null_pointer_checks_1): Inform caller if any null pointer ↵Jeff Law1-1/+1
checks were eliminated. * gcse.c (delete_null_pointer_checks_1): Inform caller if any null pointer checks were eliminated. Update prototype. (delete_null_pointer_checks): Similarly. * rtl.h (delete_null_pointer_checks): Update prototype. * toplev.c (rest_of_compilation): Only run cleanup_cfg if delete_null_pointer_checks deletes one or more null pointer checks. Do not run cleanup_cfg before gcse, the CFG is accurate and optimized at that point.. From-SVN: r54617
2002-06-13emit-rtl.c (static_regno_reg_rtx): Define.Jeff Law1-0/+1
* emit-rtl.c (static_regno_reg_rtx): Define. (init_emit_once): Initialize static_regno_reg_rtx. (init_emit): Copy static_regno_reg_rtx into regno_reg_rtx instead of building new hard reg objects once per function. (gen_rtx_REG): Try to share hard regs. * regclass.c (init_fake_stack_mems): New function broken out from init_regs. * rtl.h (init_fake_stack_mems): Declare. * toplev.c (lang_independent_init): Call init_regs before init_emit_once. Call init_fake_stack_mems after init_emit_once. From-SVN: r54588
2002-06-13alias.c (argument_registers): Remove.Jeff Law1-1/+0
* alias.c (argument_registers): Remove. (init_alias_once): Initialize static_reg_base_value here. Remove initialization of argument_registers. (init_alias_once_per_function): Remove. (init_alias_analysis): Copy all the entries from static_reg_base_value into new_reg_base_value all at once. * rtl.h (init_alias_once_per_function): Remove declaration. * function.c (prepare_function_start): Do not call init_alias_once_per_function. * caller-save.c (init_caller_save): Use gen_rtx_INSN instead of starting a sequence and emitting an INSN. From-SVN: r54582
2002-06-11Delete SEQUENCE rtl usage outside of reorg and ssa passes.David S. Miller1-6/+0
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-10alias.c (static_reg_base_value): New to hold RTL for items allocated once ↵Jeff Law1-0/+1
per function for the aliasing code. * alias.c (static_reg_base_value): New to hold RTL for items allocated once per function for the aliasing code. (init_alias_once_per_function): Initialize static_reg_base_value. (init_alias_analysis): Avoid throw-away allocations of RTL by using pre-computed values in static_reg_base_value. * function.c (prepare_function_start): Call init_alias_once_per_function appropriately. * rtl.h (init_alias_once_per_function): Declare. * caller-save (init_caller_save): Restructure slightly to avoid lots of silly RTL generation. * expr.c (init_expr_once): Likewise. * reload1.c (reload_cse_regs_1): Allocate throw-away register RTL object here. Pass it into children. (reload_cse_simplify_operands): Use passed-in register RTL object. (reload_cse_simplify): Pass through throw-away register RTL object. From-SVN: r54442
2002-06-06i386.md (and promoting splitters): Disable QI to SImode promoting when doing ↵Jan Hubicka1-0/+8
so changes immediate to be 32bit. * i386.md (and promoting splitters): Disable QI to SImode promoting when doing so changes immediate to be 32bit. * rtl.h (emit_*_scope): Declare. * emit-rtl.c (emit_*_scope): New global functions. (try_split): Copy scope. * ifcvt.c (noce_try_store_flag, noce_try_store_flag_constants, noce_try_flag_inc, noce_try_store_flag_mask, noce_try_cmove, noce_try_cmove_arith, noce_try_minmax, noce_try_abs, noce_process_if_block, find_cond_trap): Copy scopes. * recog.c (peephole2_optimize): likewise. From-SVN: r54327