summaryrefslogtreecommitdiff
path: root/gcc/emit-rtl.c
Commit message (Collapse)AuthorAgeFilesLines
* * emit-rtl.c (set_used_flags): New.hubicka2003-11-291-4/+194
| | | | | | | | | | | | | | | | | (verify_rtx_sharing, verify_rtl_sharing): New. (unshare_all_rtl_1): Rename to.... (unshare_all_rtl_in_chain): ... this one; make static. (copy_rtx_if_shared): LABEL_REF chan be shared. * ifcvt.c (unshare_ifcvt_sequence): New. (noce_try_move, noce_try_store_flag, noce_try_store_flag_constants, noce_try_addcc, noce_try_addcc, noce_try_store_flag_mask, noce_try_cmove, noce_try_store_flag_mask, noce_try_minmax, noce_try_abs, noce_process_if_block, find_cond_trap * rtl.h (verify_rtl_sharing, set_used_flags, unshare_all_rtl_in_chain): Declare. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@74030 138bc75d-0d04-0410-961f-82ee72b054a4
* * emit-rtl.c (gen_lowpart): Don't force MEMs into a register unlessrsandifo2003-11-191-0/+2
| | | | | | | the register lowpart is a TRULY_NOOP_TRUNCATION. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@73731 138bc75d-0d04-0410-961f-82ee72b054a4
* * emit-rtl.c (copy_rtx_if_shared): Don't allow MEMs with constantrsandifo2003-11-041-14/+0
| | | | | | | | addresses to be shared. (force_const_mem): Return a copy of the pool entry. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@73248 138bc75d-0d04-0410-961f-82ee72b054a4
* * rtl.h (rtl_size): Declare.rsandifo2003-10-181-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (rtunion): Remove rtwint. (rtx_def): Replace 'fld' with a union of an rtunion or a HOST_WIDE_INT. (RTX_HDR_SIZE, RTX_SIZE): New macros. (RTL_CHECK1): Adjust for new rtx_def layout. (RTL_CHECK2, RTL_CHECKC1, RTL_CHECKC2): Likewise. (XWINT, XCWINT): Likewise. Access the rtx structure directly. (X0WINT): Remove. (X0ANY): New macro. * rtl.def: Adjust comments for new rtx_def layout. * ggc.h (ggc_alloc_rtx): Take the rtx code as argument, not the number of slots. * rtl.c (rtx_size): New array. (rtx_alloc): Adjust call to ggc_alloc_rtx. Use RTX_HDR_SIZE. (copy_rtx): Use RTX_HDR_SIZE. Adjust for new rtx_def layout. (shallow_copy_rtx): Adjust call to ggc_alloc_rtx. Use RTX_SIZE. * integrate.c (copy_rtx_and_substitute): Use X0ANY to copy '0' fields. * emit-rtl.c (copy_most_rtx): Likewise. (copy_rtx_if_shared): Use RTX_SIZE. (copy_insn_1): Use RTX_HDR_SIZE. Adjust for new rtx_def layout. * gengenrtl.c (gendef): Adjust ggc_alloc_rtx call. Use RTX_HDR_SIZE. * gengtype.c (write_rtx_next): Use RTX_HDR_SIZE. (adjust_field_rtx_def): Expect "rtx_def" to be a union rather than an array. Adjust output for new rtx_def layout. * ggc-page.c (RTL_SIZE): Use RTX_HDR_SIZE. * reload1.c (eliminate_regs): Use RTX_SIZE. * rtlanal.c (loc_mentioned_in_p): Adjust for new rtx_def layout. * gdbinit.in (pi): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72647 138bc75d-0d04-0410-961f-82ee72b054a4
* * builtins.c (builtin_dconsts_init, dconstpi, dconste,ghazi2003-09-111-0/+9
| | | | | | | | | | init_builtin_dconsts): Delete. * emit-rtl.c (dconstpi, dconste): Define. (init_emit_once): Initialize dconstpi & dconste. * real.h (dconstpi, dconste): Declare. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71320 138bc75d-0d04-0410-961f-82ee72b054a4
* * builtins.c (real_dconstp, fold_builtin_logarithm,ghazi2003-09-091-1/+8
| | | | | | | | | | | | | | | | | fold_builtin_exponent): New, split out from fold_builtin. Also generalize to add log2, log10, exp2 and exp10/pow10 equivalents. * emit-rtl.c (dconst3, dconst10, dconstthird): New. (init_emit_once): Initialize new dconsts, use ARRAY_SIZE in lieu of hardcoded array size. * fold-const.c (fold): Add cases for exp2, exp10 and pow10. (tree_expr_nonnegative_p): Likewise. * real.h (dconst3, dconst10, dconstthird): New. testsuite: * gcc.dg/torture/builtin-explog-1.c: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71252 138bc75d-0d04-0410-961f-82ee72b054a4
* * targhooks.c: New file.dj2003-09-041-19/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * targhooks.h: New file. * Makefile.in: Add targhooks.o support. (function.o): Depend on$(TARGET_H). (stmt.o): Likewise. (combine.o): Depend on $(TREE_H) and $(TARGET_H). * builtins.c (apply_args_size, expand_builtin_apply_args_1, expand_builtin_apply): Convert to calls.struct_value_rtx hook. (expand_builtin_saveregs): Convert to calls.expand_builtin_saveregs hook. * c-decl.c (start_decl): Handle new calls.promote_prototypes hook here, instead of ... (get_parm_info) ... here. (store_parm_decls_oldstyle): Convert to calls.promote_prototypes hook. (finish_function): Handle calls.promote_prototypes hook here too. * c-typeck.c (convert_arguments): Convert to calls.promote_prototypes hook. (c_convert_parm_for_inlining): Likewise. * calls.c (initialize_argument_information): Convert to calls.promote_function_args hook. (expand_call): Convert to calls.struct_value_rtx, calls.strict_argument_naming, calls.pretend_outgoing_varargs_named, and calls.promote_function_return hooks. Pass fndecl to aggregate_value_p. Initialize CUMULATIVE_ARGS before calling hooks, so they can use that. (emit_library_call_value_1): Likewise. * combine.c (setup_incoming_promotions): Convert to calls.promote_function_args hook. * emit-rtl.c: Convert to calls.struct_value_rtx hook. * expr.c (expand_assignment): Pass call to aggregate_value_p. (expand_expr): Likewise. * expr.h: Remove support for SETUP_INCOMING_VARARGS, STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED, RETURN_IN_MEMORY macro defaults. * final.c (profile_function): Convert to calls.struct_value_rtx hook. * function.c (aggregate_value_p): Accept function type tree as second parameter; try to deduce fntype from it. Convert to calls.return_in_memory hook. (assign_parms): Convert to calls.setup_incoming_varargs, calls.strict_argument_naming, calls.promote_function_args, calls.pretend_outgoing_varargs_named hooks. Pass fndecl to aggregate_value_p. (expand_function_start): Likewise. Convert to calls.struct_value_rtx hook. (expand_function_end): Convert to calls.promote_function_return hook. (allocate_struct_function): Pass fndecl to aggregate_value_p. * hard-reg-set.h: Update comments to new hook names. * integrate.c (expand_inline_function): Pass fndecl to aggregate_value_p. * reg-stack.c (stack_result): Likewise. * rtl.h (struct_value_rtx, struct_value_incoming_rtx): Delete. * stmt.c (expand_value_return): Convert to calls.promote_function_return hook. * target-def.h: Add TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, TARGET_STRUCT_VALUE_RTX, TARGET_RETURN_IN_MEMORY, TARGET_EXPAND_BUILTIN_SAVEREGS, TARGET_SETUP_INCOMING_VARARGS, TARGET_STRICT_ARGUMENT_NAMING, TARGET_PRETEND_OUTGOING_VARARGS_NAMED, and TARGET_CALLS. * target.h: Likewise. * tree.h (aggregate_value_p): Also takes a tree to deduce function attributes from (for target hooks). * doc/tm.texi (PROMOTE_FUNCTION_ARGS, PROMOTE_FUNCTION_RETURN, PROMOTE_PROTOTYPES, RETURN_IN_MEMORY, STRUCT_VALUE_REGNUM, STRUCT_VALUE, STRUCT_VALUE_INCOMING_REGNUM, STRUCT_VALUE_INCOMING, EXPAND_BUILTIN_SAVEREGS, SETUP_INCOMING_VARARGS, STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED): Convert to hooks. * config/alpha/alpha.c (alpha_output_mi_thunk_osf): Pass function to aggregate_value_p. * config/arm/arm.c (arm_init_cumulative_args, arm_output_mi_thunk): Likewise. * config/i386/i386.c (ix86_return_pops_args, x86_this_parameter): Likewise. * config/mips/mips.c (mips_save_reg_p, mips_expand_prologue, mips_can_use_return_insn): Likewise. * config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise. * config/s390/s390.c (s390_output_mi_thunk): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Pass function to aggregate_value_p. * config/story16/stormy16.c (xstormy16_asm_output_mi_thunk): Pass function to aggregate_value_p. * objc/objc-act.c (generate_struct_by_value_array): Pass NULL to aggregate_value_p. * config/sh/sh-protos.h (sh_builtin_saveregs): Remove. (sh_attr_renesas_p, sh_cfun_attr_renesas_p, sh_function_arg, sh_function_arg_advance, sh_pass_in_reg_p): New. * config/sh/sh.c (sh_handle_renesas_attribute, sh_promote_prototypes, sh_struct_value_rtx, sh_return_in_memory, sh_builtin_saveregs, sh_setup_incoming_varargs, sh_strict_argument_naming, sh_pretend_outgoing_varargs_named): New decls. (targetm): Add new hooks. (calc_live_regs): Save MACL and MACH if the function has the renesas attribute. (sh_expand_prologue): Support renesas attribute. (sh_builtin_saveregs): Make static. (sh_build_va_list): Support renesas attribute. (sh_va_start): Likewise. (sh_va_arg): Likewise. (sh_promote_prototypes): New. (sh_function_arg): New, moved from sh.h. Support renesas attribute. (sh_function_arg_advance): Likewise. (sh_return_in_memory): Likewise. (sh_strict_argument_naming): Likewise. (sh_pretend_outgoing_varargs_named): Likewise. (sh_struct_value_rtx): New. (sh_attribute): Add renesas attribute. (sh_handle_renesas_attribute): New. (sh_attr_renesas_p, sh_cfun_attr_renesas_p): New. (sh_ms_bitfield_layout_p): Support renesas attribute also. (sh_output_mi_thunk): Pass function to aggregate_value_p. * config/sh/sh.h (TARGET_SWITCHES): Add -mrenesas as an alias for -mhitachi. (STRUCT_VALUE_REGNUM, STRUCT_VALUE, RETURN_IN_MEMORY): Moved to target hooks. (sh_args): Add renesas_abi flag. (INIT_CUMULATIVE_ARGS): Set it. Pass fndecl to aggregate_value_p. (FUNCTION_ARG_ADVANCE, FUNCTION_ARG): Move to sh.c. (PASS_IN_REG_P): Support renesas attribute. Pass DF and TF on the stack for the renesas abi. (STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED, SETUP_INCOMING_VARARGS, EXPAND_BUILTIN_SAVEREGS, PROMOTE_PROTOTYPES): Moved to sh.c. * config/sh/sh.md (call): Set call cookie to indicate renesas calls. * decl.c (finish_function): Pass fndecl to aggregate_value_p. * misc.c (default_pass_by_ref): Convert to calls.return_in_memory hook. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71048 138bc75d-0d04-0410-961f-82ee72b054a4
* * cfgcleanup.c: Fix comment typos.kazu2003-08-221-1/+1
| | | | | | | | | | | * emit-rtl.c: Likewise. * optabs.c: Likewise. * ra-build.c: Likewise. * rtlanal.c: Likewise. * tree.h: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70678 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-common.c: Fix comment formatting.kazu2003-08-191-1/+1
| | | | | | | | | | | | | | | | * c-common.h: Likewise. * c-decl.c: Likewise. * cppinit.c: Likewise. * cpplib.h: Likewise. * emit-rtl.c: Likewise. * input.h: Likewise. * line-map.h: Likewise. * opts.c: Likewise. * opts.h: Likewise. * simplify-rtx.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70577 138bc75d-0d04-0410-961f-82ee72b054a4
* * regclass.c (init_reg_modes): Make non-static.bothner2003-08-141-0/+3
| | | | | | | | | | | Rename to init_reg_modes_once per new naming convention. (init_regs): Don't call init_reg_modes here. * emit-rtl.c (init_emit_once): Call init_reg_modes_once here instead. * rtl.h (init_reg_modes_once): New declaration. * toplev.c (backend_init): Call init_regs after init_emit_once. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70426 138bc75d-0d04-0410-961f-82ee72b054a4
* * alias.c alloc-pool.c bitmap.c bitmap.h bt-load.c builtins.cghazi2003-07-191-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | c-common.c c-decl.c c-incpath.c c-lex.c c-opts.c c-parse.in c-pragma.c c-typeck.c calls.c cfg.c cfganal.c cfgloop.c cfgrtl.c collect2.c combine.c conflict.c coverage.c cppexp.c cppfiles.c cpphash.c cppinit.c cpplex.c cpplib.c cppmacro.c cppspec.c cpptrad.c cse.c cselib.c dbxout.c defaults.h df.c dominance.c dwarf2out.c dwarfout.c emit-rtl.c except.c expmed.c expr.c final.c fix-header.c flow.c fold-const.c function.c gcc.c gccspec.c gcov.c gcse.c genattr.c genattrtab.c genautomata.c genconditions.c genemit.c genextract.c genoutput.c genrecog.c gensupport.c ggc-page.c ggc-simple.c global.c graph.c haifa-sched.c hashtable.c integrate.c jump.c langhooks.c lcm.c line-map.c local-alloc.c loop.c mips-tdump.c mips-tfile.c mkdeps.c optabs.c params.c postreload.c prefix.c print-tree.c protoize.c ra-build.c ra-colorize.c ra-rewrite.c ra.c recog.c reg-stack.c regclass.c regmove.c regrename.c reload.c reload1.c reorg.c resource.c sbitmap.c sched-deps.c sched-rgn.c sched-vis.c sdbout.c simplify-rtx.c ssa-ccp.c ssa.c stmt.c stor-layout.c timevar.c tlink.c toplev.c tree-dump.c tree.c unroll.c unwind-dw2-fde.c varasm.c varray.c vmsdbgout.c xcoffout.c: Remove unnecessary casts. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69587 138bc75d-0d04-0410-961f-82ee72b054a4
* 2003-07-10 Steven Bosscher <steven@gcc.gnu.org>steven2003-07-101-1/+1
| | | | | | | | | | | | | | | | | | * ggc.h, integrate.h, langhooks.h, real.h, toplev.h: Use `rtx' instead of `struct rtx_def *', `rtvec' instead of `struct rtvec_dev *' and `tree' instead of `union tree_node *' in function prototypes. * varray.h (const_equiv_data): Likewise for fields. (varray_data_tag): Likewise. * output.h: Likewise, and don't forward declare union tree_node. * emit_rtl.c (const_int_htab_hash): Cast to `rtx' instead of `struct rtxvec *'. * print-tree.c (print_node): Likewise. * reload1.c: Don't redeclare current_function_decl, tree.h is included in this file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69183 138bc75d-0d04-0410-961f-82ee72b054a4
* partial fix for PR target/10021wilson2003-07-091-13/+16
| | | | | | | | * emit-rtl.c (set_mem_attribute_minus_bitpos): When handle ARRAY_REF, loop over new variable t2 instead of t. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69111 138bc75d-0d04-0410-961f-82ee72b054a4
* * rtl.h (emit_line_note): Take a location_t.nathan2003-07-071-28/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (emit_line_note_force): Remove. (set_file_and_line_for_statement): Take a location_t. * tree.g (emit_line_note): Take a location_t. * emit-rtl.c (emit_line_note): Take a location_t. (emit_line_note_force): Remove. * function.c (init_function_start): Adjust emit_line_note call. (expand_function_end): Use force_next_line_note, not emit_line_note_force. * c-parse.in (maybe_type_qual): Adjust emit_line_note calls. * c-semantics.c (genrtl_do_pushlevel, genrtl_goto_stmt, genrtl_expr_stmt_value, genrtl_decl_stmt, genrtl_if_stmt, genrtl_while_stmt, genrtl_do_stmt_1, genrtl_return_stmt, genrtl_for_stmt, genrtl_break_stmt, genrtl_continue_stmt, genrtl_continue_stmt, genrtl_switch_stmt, genrtl_asm_stmt): Likewise. * expr.c (expand_expr): Likewise. * integrate.c (expand_inline_function): Likewise. * stmt.c (set_file_and_line_for_stmt): Take a location_t. (expand_decl_init): Adjust emit_line_note call. * ada/trans.c (build_unit_elab, set_lineno): Adjust emit_line_note calls. * cp/semantics.c: (genrtl_try_block) Adjust emit_line_note calls. * f/com.c (bison_rule_pushlevel_, bison_rule_compstmt_): Adjust emit_line_note calls. * f/ste.c (ffeste_emit_line_note_): Likewise. * java/expr.c (expand_byte_code): * treelang/treetree.c (tree_code_if_start, tree_code_if_else, tree_code_if_end, tree_code_create_function_initial, tree_code_create_function_wrapup, tree_code_generate_return, tree_code_output_expression_statement): Adjust emit_line_note calls. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69047 138bc75d-0d04-0410-961f-82ee72b054a4
* * bt-load.c: Fix comment typos.kazu2003-07-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * c-incpath.c: Likewise. * cfg.c: Likewise. * cfgcleanup.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * diagnostic.h: Likewise. * dwarfout.c: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * et-forest.h: Likewise. * expr.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * jump.c: Likewise. * langhooks.h: Likewise. * local-alloc.c: Likewise. * loop-unroll.c: Likewise. * loop-unswitch.c: Likewise. * ra-build.c: Likewise. * regclass.c: Likewise. * regmove.c: Likewise. * rtl.def: Likewise. * rtlanal.c: Likewise. * sched-ebb.c: Likewise. * sched-rgn.c: Likewise. * simplify-rtx.c: Likewise. * ssa.c: Likewise. * tracer.c: Likewise. * tree.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68975 138bc75d-0d04-0410-961f-82ee72b054a4
* * rtl.h (NOTE_DATA): Refer to whole union.nathan2003-07-031-1/+1
| | | | | | | * emit-rtl.c (emit_note): Use memset to clear NOTE_DATA. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68874 138bc75d-0d04-0410-961f-82ee72b054a4
* * rtl.h (emit_line_note_after): Remove.nathan2003-07-011-19/+33
| | | | | | | | | | | | | | | | | | | (emit_note_copy_after, emit_note_copy): New. * emit-rtl.c (reorder_insns_with_line_notes): Replace emit_line_note_after with emit_note_copy_after. (emit_insn_after_with_line_notes): Likewise. (emit_line_note_after): Kill. (emit_note_copy_after): New. (emit_note_copy): New. * function.c (emit_return_into_block): Use emit_note_copy_after. (thread_prologue_and_epilogue_insns): Likewise. * integrate.c (expand_inline_function): Use emit_note_copy. (copy_insn_list): Likewise. * unroll.c (copy_loop_body): Likewise. * cfglayout.c (duplicate_insn_chain): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68767 138bc75d-0d04-0410-961f-82ee72b054a4
* * except.c: Convert prototypes to ISO C90.aj2003-06-291-439/+202
| | | | | | | | | | | | | | | * except.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * et-forest.h: Likewise. * except.c: Likewise. * explow.c: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68674 138bc75d-0d04-0410-961f-82ee72b054a4
* * rtl.h (emit_note): Remove FILE parameter.nathan2003-06-271-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * emit-rtl.c (emit_line_note): Adjust emit_note call. (emit_note): Remove FILE parameter. Adjust. * builtins.c (expand_builtin_expect): Adjust emit_note call. * c-semantics.c (genrtl_scope_stmt): Likewise. (expand_stmt): Likewise. * cfglayout.c (reemit_insn_block_notes): Likewise. (duplicate_insn_chain): Likewise. * except.c (expand_eh_region_start, expand_eh_region_end, sjlj_emit_function_enter): Likewise. * explow.c (probe_stack_range): Likewise. * expr.c (emit_block_move_via_loop): Likewise. * function.c (init_function_start, expand_function_start, expand_function_end, thread_prologue_and_epilogue_insns): Likewise. * integrate.c (expand_inline_function, copy_insn_list): Likewise. * reg-stack.c (compensate_edge): Likewise. * reload1.c (reload): Likewise. * rtlanal.c (hoist_insn_to_edge): Likewise. * stmt.c (expand_fixup, expand_start_loop, expand_start_null_loop, expand_loop_continue_here, expand_end_loop, expand_continue_loop, expand_exit_loop_top_cond, expand_value_return, expand_start_bindings_and_block, expand_end_bindings, expand_decl_cleanup, expand_start_case): Likewise. * unroll.c (copy_loop_body * config/alpha/alpha.c (alpha_output_mi_thunk_osf): Likewise. * config/ia64/ia64.c (ia64_output_mi_thunk): Likewise. * config/rs6000/rs6000.c (rs6000_emit_eh_toc_restore, rs6000_emit_allocate_stack, rs6000_output_function_prologue, rs6000_output_function_epilogue, rs6000_output_mi_thunk): Likewise. * config/sh/sh.c (sh_output_mi_thunk): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. * ada/misc.c (record_code_position): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68561 138bc75d-0d04-0410-961f-82ee72b054a4
* * emit-rtl.c (try_split): Append to new CALL_INSN_FUNCTION_USAGErth2003-06-261-2/+4
| | | | | | | instead of replacing it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68547 138bc75d-0d04-0410-961f-82ee72b054a4
* * convert.c, dwarf2out.c, dwarfout.c, emit-rtl.c, function.c,neroden2003-06-161-1/+1
| | | | | | | | | | lists.c, print-rtl.c, print-tree.c, read-rtl.c, rtl-error.c, stmt.c, toplev.c, integrate.h, loop.h, machmode.h, rtl.h, ssa.h, tree.def: Replace overly specific references to "GNU C" and "GNU C Compiler" with references to "GCC". git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68004 138bc75d-0d04-0410-961f-82ee72b054a4
* * function.h (struct emit_status): Remove x_last_linenum,nathan2003-06-161-25/+21
| | | | | | | | | | | | | | | | | | | | | | x_last_filename. Add x_last_location. * rtl.h: #include "input.h". (NOTE_DATA): New. * cfglayout.c (duplicate_insn_chain): Use emit_line_note for line number notes. * emit-rtl.c (last_linenum, last_filename): Remove. (last_location): New. (emit_line_note_after): LINE must always be >= 0. (emit_line_note): Likewise. Check not duplicate here... (emit_note): ... rather than here. (emit_line_note_force, force_next_line_note, init_emit): Adjust. * integrate.c (expand_inline_function): Use emit_line_note for line number notes. (copy_insn_list): Likewise. * unroll.c (copy_loop_body): Likewise. * Makefile.in (RTL_H): Add input.h. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68002 138bc75d-0d04-0410-961f-82ee72b054a4
* 2003-06-13 Aldy Hernandez <aldyh@redhat.com>aldyh2003-06-131-3/+1
| | | | | | | | | | | * c-common.c (handle_mode_attribute): Use VECTOR_MODE_P macro. * simplify-rtx.c (simplify_subreg): Same. * emit-rtl.c (gen_lowpart_common): Same. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67911 138bc75d-0d04-0410-961f-82ee72b054a4
* * ChangeLog: Follow spelling conventions.kazu2003-06-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ChangeLog.2: Likewise. * c-decl.c: Likewise. * cfgloop.h: Likewise. * cgraph.c: Likewise. * coverage.c: Likewise. * cppcharset.c: Likewise. * cpphash.h: Likewise. * cpplex.c: Likewise. * cpplib.c: Likewise. * dbxout.c: Likewise. * df.c: Likewise. * dwarf2out.c: Likewise. * dwarfout.c: Likewise. * emit-rtl.c: Likewise. * explow.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gengtype.c: Likewise. * ggc.h: Likewise. * opts.c: Likewise. * real.c: Likewise. * reload.c: Likewise. * stmt.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67849 138bc75d-0d04-0410-961f-82ee72b054a4
* * cfglayout.c (insn_scope): New static functionhubicka2003-06-081-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (block_locators_*, line_locators*, file_locators*): New static varrays. (scope_to_insns_initialize): Use them. (insn_line, insn_file): New functions. (scope_to_insns_finalize): Use insn_scope. (prologue_locator, epilogue_locator): New global variables. * emit-rt.c (try_split, make_insn_raw, make_jump_insn_raw, make_call_insn_raw, emit_copy_of_insn_after): Use locators. (emit_insn_after_scope, emit_insn_before_scope emit_jump_insn_after_scope, emit_jump_insn_before_scope emit_call_insn_after_scope, emit_call_insn_before_scope): Rename to... (emit_insn_after_setloc, emit_insn_before_setloc emit_jump_insn_after_setloc, emit_jump_insn_before_setloc emit_call_insn_after_setloc, emit_call_insn_before_setloc): ... these; use locators. * final.c (notice_source_line): Use locators. (final_start_function): Set initial source file and line. (final_scan_insn): Use locators. * ifcvt.c (noce_try_store_flag, noce_try_store_flag_constants, noce_try_addcc, 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): Likewise. * integrate.c (copy_insn_list): Likewise. * jump.c (duplicate_loop_exit_test): LIkewise. * print-rtl.c (print_rtx): Print locators. * recog.c (peephole2_optimize): Likewise. * rtl.h (INSN_SCOPE): Remove. (emit_insn_after_scope, emit_insn_before_scope emit_jump_insn_after_scope, emit_jump_insn_before_scope emit_call_insn_after_scope, emit_call_insn_before_scope): Rename to... (emit_insn_after_setloc, emit_insn_before_setloc emit_jump_insn_after_setloc, emit_jump_insn_before_setloc emit_call_insn_after_setloc, emit_call_insn_before_setloc): ... these; (insn_file, insn_line, prologue_locator, epilogue_locator): Declare. * unroll.c (copy_loop_body): Use locators. * function.c (set_insn_locators): New function. (thread_prologue_and_epilogue_insns): Set the locators accordingly. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67637 138bc75d-0d04-0410-961f-82ee72b054a4
* * emit-rtl.c (gen_complex_constant_part): Remove unnecessarysayle2003-06-021-2/+1
| | | | | | | test of TREE_CONSTANT_POOL_ADDRESS_P. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67331 138bc75d-0d04-0410-961f-82ee72b054a4
* * emit-rtl.c (gen_lowpart_common): Handle interpreting integersayle2003-06-011-0/+6
| | | | | | | constants as condition code values. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67309 138bc75d-0d04-0410-961f-82ee72b054a4
* * emit-rtl.c (gen_complex_constant_part): New function for gettingsayle2003-05-301-0/+45
| | | | | | | | | the constant real or imaginary part of a complex constant. (gen_realpart): Use it. (gen_imagpart): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67252 138bc75d-0d04-0410-961f-82ee72b054a4
* * tree.h (contains_placeholder_p): Now returns bool.kenner2003-05-271-4/+2
| | | | | | | | | | | | | | | | | | | | | | | (CONTAINS_PLACEHOLDER_P): New macro. (type_contains_placeholder_p): New function. * tree.c (save_expr): Remove code avoiding folding COMPONENT_REF. (contains_placeholder_p): Now returns bool. Rework to use CONTAINS_PLACEHOLDER_P macro. (type_contains_placeholder_p): New function. * fold-const.c (fold, case COMPONENT_REF): Don't fold if type_contains_placeholder_p. (fold_range_test, fold_mathfn_compare, fold_inf_compare, fold): Use CONTAINS_PLACEHOLDER_P macro. * builtins.c (fold_builtin): Likewise. * calls.c (initialize_argument_information): Likewise. * emit-rtl.c (set_mem_attributes_minus_bitpos): Likewise. * explow.c (expr_size): Likewise. * expr.c (store_constructor, get_inner_reference): Likewise. * function.c (assign_parms): Likewise. * stor-layout.c (variable_size): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67189 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc:ghazi2003-05-171-9/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * builtins.c (validate_arglist): Eliminate libiberty VA_ macros, always use stdarg. * c-errors.c (pedwarn_c99): Likewise. * c-format.c (status_warning): Likewise. * c-semantics.c (build_stmt): Likewise. * calls.c (emit_library_call, emit_library_call_value): Likewise. * collect2.c (notice, fatal_perror, fatal, error): Likewise. * cpperror.c (cpp_error, cpp_error_with_line): Likewise. * diagnostic.c (build_message_string, output_printf, output_verbatim, verbatim, inform, warning, pedwarn, error, sorry, fatal_error, internal_error, warning_with_decl, pedwarn_with_decl, error_with_decl, fnotice): Likewise. * dwarf2asm.c (dw2_asm_output_data, dw2_asm_output_delta, dw2_asm_output_offset, dw2_asm_output_pcrel, dw2_asm_output_addr, dw2_asm_output_addr_rtx, dw2_asm_output_nstring, dw2_asm_output_data_uleb128, dw2_asm_output_data_sleb128, dw2_asm_output_delta_uleb128, dw2_asm_output_delta_sleb128, dw2_asm_output_encoded_addr_rtx): Likewise. * emit-rtl.c (gen_rtx, gen_rtvec): Likewise. * errors.c (warning, error, fatal, internal_error): Likewise. * final.c (output_operand_lossage, asm_fprintf): Likewise. * fix-header.c (fatal): Likewise. * gcc.c (fatal, error, notice): Likewise. * gcov.c (fnotice): Likewise. * genattrtab.c (attr_rtx, attr_printf): Likewise. * gengtype.c (error_at_line, xasprintf, oprintf): Likewise. * gensupport.c (message_with_line): Likewise. * mips-tfile.c (fatal, error): Likewise. * protoize.c (notice): Likewise. * ra-debug.c (ra_debug_msg): Likewise. * read-rtl.c (fatal_with_file_and_line): Likewise. * rtl-error.c (error_for_asm, warning_for_asm): Likewise. * tree.c (build, build_nt, build_function_type_list): Likewise. cp: * error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate libiberty VA_ macros, always use stdarg. * rtti.c (create_pseudo_type_info): Likewise. * tree.c (build_min_nt, build_min): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66919 138bc75d-0d04-0410-961f-82ee72b054a4
* * emit-rtl.c (last_call_insn, add_function_usage_to): New functions.kenner2003-05-031-0/+41
| | | | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66429 138bc75d-0d04-0410-961f-82ee72b054a4
* * emit-rtl.c (subreg_hard_regno): Check that register is representable.hubicka2003-04-171-1/+5
| | | | | | | | | | | | | | * 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 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@65757 138bc75d-0d04-0410-961f-82ee72b054a4
* * expr.c (highest_pow2_factor): Return unsigned.kenner2003-04-141-3/+2
| | | | | | | | * expr.h (offset_address): Likewise. * emit-rtl.c (offset_address): POW2 argument now unsigned. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@65589 138bc75d-0d04-0410-961f-82ee72b054a4
* * emit-rtl.c (gen_rtx): Really correct typo.geoffk2003-04-121-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@65501 138bc75d-0d04-0410-961f-82ee72b054a4
* 2003-04-11 Eric Christopher <echristo@redhat.com>echristo2003-04-121-3/+3
| | | | | | | * emit-rtl.c (gen_rtx): Fix typos. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@65496 138bc75d-0d04-0410-961f-82ee72b054a4
* * emit-rtl.c (gen_rtx): Zero '0' fields.rth2003-04-111-1/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@65488 138bc75d-0d04-0410-961f-82ee72b054a4
* * emit-rtl.c (get_mem_attrs): Adjust alignment tests determiningkenner2003-04-041-4/+5
| | | | | | | use of default attributes to agree MEM_ALIGN macro. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@65254 138bc75d-0d04-0410-961f-82ee72b054a4
* * emit-rtl.c (dconstm2, dconsthalf): New real constants.sayle2003-03-311-0/+6
| | | | | | | | | | | | | | | | | | (init_emit_once): Initialize dconstm2 and dconsthalf here. * real.h (dconstm2, dconsthalf): Add prototypes here. * real.c (real_sqrt): Use dconsthalf rather than local copy. * builtins.c (fold_builtin): When optimizing sqrt(exp(x)) as exp(x/2.0) remember to fold the division if possible. Fold sin(0.0) as 0.0, cos(0.0) as 1.0, pow(x,1.0) as x, pow(x,-1.0) as 1.0/x, pow(x,2.0) as x*x, pow(x,-2.0) as 1.0/(x*x) and pow(x,0.5) as sqrt(x). * gcc.dg/builtins-3.c: Add new tests for sin and cos. * gcc.dg/builtins-7.c: New test case. * gcc.dg/builtins-8.c: New test case. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@65088 138bc75d-0d04-0410-961f-82ee72b054a4
* * emit-rtl.c (try_split): Handle 1-1 splits of call insns properly.rth2003-03-131-144/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * config/ia64/ia64.c (TARGET_FUNCTION_OK_FOR_SIBCALL): New. (ia64_gp_save_reg): Remove. (struct ia64_frame_info): Move to the beginning of the file; add reg_save_gp. (ia64_expand_call): Rearrange for new call patterns. (ia64_reload_gp): New. (ia64_split_call): New. (ia64_compute_frame_size): Allocate reg_save_gp. (ia64_expand_prologue): Save reg_save_gp. (ia64_expand_epilogue): Don't restore gp. (ia64_hard_regno_rename_ok): Remove R4 hack. (ia64_function_ok_for_sibcall): New. (ia64_output_mi_thunk): Set reload_completed, no_new_pseudos; call try_split on sibcall pattern. * config/ia64/ia64-protos.h: Update. * config/ia64/ia64.md (call_nogp, call_value_nogp, sibcall_nogp): Rename from nopic versions. Confiscate 2nd argument to call as a marker. (call_pic, call_value_pic, sibcall_pic): Remove. (call_gp, call_value_gp, sibcall_gp): New. (builtin_setjmp_setup): Remove. (builtin_setjmp_receiver): Call ia64_reload_gp. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64303 138bc75d-0d04-0410-961f-82ee72b054a4
* * emit-rtl.c (gen_lowpart): Don't attempt to load a part ofhp2003-03-081-0/+1
| | | | | | | a complex or vector type, using a load in the original mode. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64000 138bc75d-0d04-0410-961f-82ee72b054a4
* * emit-rtl.c (gen_lowpart): When requesting the low-part of asayle2003-03-061-0/+6
| | | | | | | | MEM, try loading the MEM into a register and taking the low-part of that, to help CSE see the use of the MEM in its true mode. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63907 138bc75d-0d04-0410-961f-82ee72b054a4
* * emit-rtl.c (gen_highpart_mode): Fix a comment typo.kazu2003-03-061-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63885 138bc75d-0d04-0410-961f-82ee72b054a4
* * emit-rtl.c (set_reg_attrs_for_parm): New function.zlomek2003-02-281-1/+27
| | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63548 138bc75d-0d04-0410-961f-82ee72b054a4
* * emit-rtl.c (init_emit): Use ggc_alloc for regno_reg_rtx.zack2003-02-141-2/+1
| | | | | | | | | | | | | | * function.h (struct emit_status): Length of regno_pointer_align and x_regno_reg_rtx as seen by gengtype is only x_reg_rtx_no, not regno_pointer_align_length (i.e. length actually used, not length as allocated) * config/i386/i386.c (struct stack_local_entry): New. (struct machine_function): Replace huge array with alist. (assign_386_stack_local): Change to match. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@62891 138bc75d-0d04-0410-961f-82ee72b054a4
* * emit-rtl.c (emit_copy_of_insn_after): Copy insn recog cache too.hubicka2003-02-111-0/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@62711 138bc75d-0d04-0410-961f-82ee72b054a4
* 2003-01-28 Dale Johannesen <dalej@apple.com>dalej2003-01-281-1/+5
| | | | | | | | | * emit-rtl.c (const_double_htab_hash): Use mode in the hash. * loop.c (scan_loop): Move movables on -Os rich-register targets. * config/rs6000/rs6000.md (sibcall*): Use match_operand for LR. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@62004 138bc75d-0d04-0410-961f-82ee72b054a4
* * emit-rtl.c (reg_attrs_htab): New static variable.hubicka2003-01-241-11/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61741 138bc75d-0d04-0410-961f-82ee72b054a4
* * dwarf2out.c (fde_table_in_use): Mark GTY.uweigand2003-01-211-1/+1
| | | | | | | | | (dwarf2out_cfi_label_num): New variable, marked GTY. (dwarf2out_cfi_label): Use it instead of static label_num. * emit-rtl.c (label_num): Mark GTY. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61547 138bc75d-0d04-0410-961f-82ee72b054a4
* * arm.h (CONDITIONAL_REGISTER_USAGE): Avoid signed/unsignedghazi2003-01-161-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | warning. * emit-rtl.c (gen_rtx_REG, set_mem_attributes_minus_bitpos, init_emit_once): Likewise. * flow.c (mark_regs_live_at_end, calculate_global_regs_live): Likewise. * function.c (assign_stack_temp_for_type): Likewise. * loop.c (loop_invariant_p): Likewise. * recog.c (push_operand): Likewise. * regclass.c (init_reg_sets_1): Likewise. * reload.c (update_auto_inc_notes): Likewise. * reload1.c (reload_as_needed, emit_input_reload_insns): Likewise. * stmt.c (expand_asm_operands): Likewise. * stor-layout.c (start_record_layout): Likewise. cp: * class.c (layout_virtual_bases): Avoid signed/unsigned warning. java: * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned warning. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61389 138bc75d-0d04-0410-961f-82ee72b054a4
* Merge from pch-branch.geoffk2003-01-101-6/+6
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61136 138bc75d-0d04-0410-961f-82ee72b054a4