aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.c
AgeCommit message (Collapse)AuthorFilesLines
1999-03-27function.c (assign_parms): Undo change of June 9.Andreas Schwab1-3/+3
* function.c (assign_parms): Undo change of June 9. Brought over from the gcc2 tree. From-SVN: r26027
1999-03-23function.c: Include hash.h.Mark Mitchell1-36/+236
* function.c: Include hash.h. (insns_for_mem_entry): New struct. (put_reg_into_stack): Take an optional hash-table mapping MEMs to the INSNs that use them. (fixup_var_refs): Likewise. (put_addressof_into_stack): Likewise. (purge_addressof_1): Likewise. Keep the hash-table up to date if we add new instructions. (fixup_var_refs_insns): Use it to avoid searching the entire instruction chain. (insns_for_mem_newfunc): New function. (insns_for_mem_comp): Likewise. (insns_for_mem_walk): Likewise. (compute_insns_for_mem): Likewise. (pop_function_context_from): Pass NULL for the hash-table. (put_var_into_stack): Likewise. (gen_mem_addressof): Likewise. (flush_addressof): Likewise. (purge_addressof): Call compute_insns_for_mem to pre-compute the hash table. * Makefile.in (OBJS): Include hash.o. (function.o): Depend on hash.h. * Makefile.in (OBJS): Don't mention hash.o. (OBJDEPS): Likewise. From-SVN: r25922
1999-03-20Warning fixes:Kaveh R. Ghazi1-1/+3
* c-lex.c (yylex): Remove unused variable `bytes'. * flow.c (print_rtl_with_bb): Cast the return value of alloca. * function.c (assign_parms): Wrap variable `varargs_setup' in macro SETUP_INCOMING_VARARGS. (thread_prologue_and_epilogue_insns): Mark parameter `f' with ATTRIBUTE_UNUSED. * local-alloc.c (no_equiv): Likewise for parameter `store'. * sched.c (schedule_insns): Remove unused variables `insn' and `next'. * tlink.c (symbol_hash_newfunc, symbol_hash_lookup, file_hash_newfunc, file_hash_lookup, demangled_hash_newfunc, demangled_hash_lookup, symbol_push, symbol_pop, file_push, file_pop, tlink_init, tlink_execute, frob_extension, obstack_fgets, tfgets, pfgets, freadsym, read_repo_file, maybe_tweak, recompile_files, read_repo_files, demangle_new_symbols, scan_linker_output): Add static prototype. (symbol_hash_newfunc, file_hash_newfunc, demangled_hash_newfunc): Make the third argument a `hash_table_key'. * toplev.c (debug_start_source_file): Mark parameter `filename' with ATTRIBUTE_UNUSED. From-SVN: r25871
1999-03-19Warning fixes:Kaveh R. Ghazi1-1/+1
* calls.c (initialize_argument_information): Mark parameters `num_actuals' and `n_named_args' with ATTRIBUTE_UNUSED. * dbxout.c (dbxout_start_new_source_file): Likewise for parameter `filename'. (dbxout_finish): Likewise for parameters `file' and `filename'. (dbxout_prepare_symbol): Likewise for parameter `decl'. (dbxout_begin_function): Likewise. * explow.c (hard_function_value): Likewise for parameter `func'. * function.c (locate_and_pad_parm): Likewise for parameter `fndecl'. * expmed.c (expand_divmod): Omit unused argument to `expand_abs'. * expr.c (expand_expr): Likewise. * expr.h (expand_abs): Delete unused argument from prototype. * optabs.c (expand_abs): Remove unused parameter `unsignedp'. * sdbout.c (sdbout_init): Mark parameter `syms' with ATTRIBUTE_UNUSED. (sdbout_end_block): Likewise for parameter `n'. * toplev.c (debug_define): Likewise for parameters `lineno' and `buffer'. (debug_undef): Likewise. * varasm.c (named_section): Likewise for parameter 'reloc'. (assemble_external): Likewise for parameter `decl'. (assemble_alias): Likewise for parameter `target'. From-SVN: r25858
1999-03-17function.c (fixup_var_refs_1): First try moving the expression directly into ↵Richard Henderson1-8/+35
a register. * function.c (fixup_var_refs_1): First try moving the expression directly into a register. Don't separate cc0 setter and user. From-SVN: r25821
1999-03-04function.c (assign_stack_temp_for_type): Abort if mode == Blkmode and align ↵John Wehle1-6/+6
is less than BIGGEST_ALIGNMENT / BITS_PER_UNIT. * function.c (assign_stack_temp_for_type): Abort if mode == Blkmode and align is less than BIGGEST_ALIGNMENT / BITS_PER_UNIT. (assign_stack_temp_for_type): Round the size parameter passed to assign_stack_local instead of size itself. Bootstrapped on the PA and x86. From-SVN: r25593
1999-03-03function.c (current_function_has_computed_jump): Remove duplicate definition.Jeffrey A Law1-7/+0
* function.c (current_function_has_computed_jump): Remove duplicate definition. From-SVN: r25571
1999-02-25Flow rewrite to use basic block structures and edge lists.Richard Henderson1-83/+148
From-SVN: r25450
1999-02-25sh.h (PASS_IN_REG_P): For TARGET_HITACHI, don't pass structures in registers.J"orn Rennecke1-3/+4
* sh.h (PASS_IN_REG_P): For TARGET_HITACHI, don't pass structures in registers. * expr.h (PRETEND_OUTGOING_VARARGS_NAMED): Provide default definition. * function.c (assign_parms): Honour PRETEND_OUTGOING_VARARGS_NAMED. * calls.c (expand_call): Likewise. * sh.c (sh_expand_prologue): For TARGET_HITACHI, don't push varargs / stdarg arguments. * sh.h (CPP_SPEC): Add -D__HITACHI__ for -mhitachi. (FUNCTION_ARG): For TARGET_HITACHI, don't pass unnamed arguments in registers. (PRETEND_OUTGOING_VARARGS_NAMED): Define. * va-sh.h (entire file): If __HITACHI__ is defined, use sh[123] flavour varargs. From-SVN: r25440
1999-02-22cse.c (dump_class): New function.Mark Mitchell1-2/+36
* cse.c (dump_class): New function. (invalidate_memory): Fix typo in comment. * function.c (temp_slot): Add an alias set field. (assign_stack_temp): Only reuse slots if they will have the same alias set as before. (combine_temp_slots): Don't combine if -fstrict-aliasing; that's unsafe. * rtl.c (copy_rtx): Copy all the flags (in particular, MEM_SCALAR_P). From-SVN: r25372
1999-02-18function.c (assign_stack_temp_for_type): Round SIZE before calling ↵Jeffrey A Law1-0/+12
assign_stack_local for BLKmode slots. * function.c (assign_stack_temp_for_type): Round SIZE before calling assign_stack_local for BLKmode slots. From-SVN: r25290
1999-02-10function.c (assign_stack_temp_for_type): Clear best_p when an exact match is ↵John Wehle1-22/+77
found. * function.c (assign_stack_temp_for_type): Clear best_p when an exact match is found. * i386.h (LOCAL_ALIGNMENT): Define. * function.c (assign_stack_local, assign_outer_stack_local): Use it. (assign_stack_temp_for_type): New function based on assign_stack_temp. (assign_stack_temp): Call it. (assign_temp): Use assign_stack_temp_for_type, not assign_stack_temp. * stmt.c: Use assign_temp, not assign_stack_temp. * tm.texi: Document LOCAL_ALIGNMENT. From-SVN: r25143
1999-02-08output.h (current_function_has_computed_jump): Rename from ↵Richard Henderson1-6/+5
current_function_addresses_labels. * output.h (current_function_has_computed_jump): Rename from current_function_addresses_labels. * function.h (struct function): Likewise for addresses_labels member. * rtl.h (FUNCTION_FLAGS_HAS_COMPUTED_JUMP): Likewise. * function.c (current_function_has_computed_jump): Likewise. Update all references. * integrate.c (function_cannot_inline_p): Test current_function_has_computed_jump instead of addresses_labels. (initialize_for_inline): Likewise save. (output_inline_function): Likewise restore. * expr.c (expand_expr): Don't reference addresses_labels variables. * stmt.c (expand_computed_goto): Set has_computed_jump. From-SVN: r25100
1999-02-05function.c (fixup_var_refs): Scan catch_clauses too.Dave Brolley1-0/+5
Fri Feb 5 17:08:01 1999 Dave Brolley <brolley@cygnus.com> * function.c (fixup_var_refs): Scan catch_clauses too. From-SVN: r25049
1999-01-29emit-rtl.c (remove_insn): New function.Dave Brolley1-12/+3
Fri Jan 29 18:26:07 1999 Dave Brolley <brolley@cygnus.com> * emit-rtl.c (remove_insn): New function. * rtl.h (remove_insn): Add prototype. * function.c (reposition_prologue_and_epilogue_notes): Call remove_insn. From-SVN: r24908
1999-01-27function.c (purge_addressof_1): Handle case when a register has been used in ↵J"orn Rennecke1-1/+14
a wider mode. * function.c (purge_addressof_1): Handle case when a register has been used in a wider mode. From-SVN: r24887
1999-01-26Merge in gcc2 snapshot 19980929. See gcc/ChangeLog and gcc/FSFChangeLog forJeffrey A Law1-10/+29
details. From-SVN: r24879
1999-01-26Fix i960 build failure with unrecognizable insn.Jim Wilson1-2/+9
* function.c (expand_function_end): Pass arg_pointer_save_area to validize_mem before using it. Emit code into a sequence. From-SVN: r24872
1999-01-20function.c (assign_parms): Save and restore setting of TREE_USED (parm).Dave Brolley1-0/+4
Wed Jan 20 18:15:08 1999 Dave Brolley <brolley@cygnus.com> * function.c (assign_parms): Save and restore setting of TREE_USED (parm). From-SVN: r24789
1999-01-19rtl.h (rtx_def): Update documentation.Mark Mitchell1-16/+20
* rtl.h (rtx_def): Update documentation. (MEM_IN_STRUCT_P): Likewise. (MEM_SCALAR_P): New macro. (MEM_COPY_ATTRIBUTES): Likewise. (MEM_SET_IN_STRUCT_P): Likewise. * rtl.texi (MEM_SCALAR_P): Document. * alias.c (canon_rtx): Use MEM_COPY_ATTRIBUTES. (fixed_scalar_and_varying_struct_p): New function. Use MEM_SCALAR_P rather than !MEM_IN_STRUCT_P. (aliases_everything_p): Likewise. (true_dependence): Use them. (write_dependence_p): New function, containing code common to anti_dependence and output_dependence. (anti_dependence): Use it. (output_dependence): Likewise. * calls.c (save_fixed_argument_area): Don't clear MEM_IN_STRUCT_P. (expand_call): Use MEM_SET_IN_STRUCT_P. (emit_library_call): Don't clear MEM_IN_STRUCT_P. (emit_library_call_value): Likewise. (store_one_arg): Use MEM_SET_IN_STRUCT_P. * combine.c (simplify_rtx): Use MEM_COPY_ATTRIBUTES. (make_extraction): Likewise. (simplify_shift_const): Likewise. (gen_lowpart_for_combine): Likewise. * cse.c (gen_lowpart_if_possible): Use MEM_COPY_ATTRIBUTES. * emit-rtl.c (operand_subword): Likewise. (change_address): Likewise. * explow.c (stabilize): Use MEM_COPY_ATTRIBUTES. * expr.c (protect_from_queue): Use MEM_COPY_ATTRIBUTES. (emit_group_store): Use MEM_SET_IN_STRUCT_P. (copy_blkmode_from_reg): Likewise. (store_field): Likewise. (expand_expr): Remove bogus guesswork setting MEM_IN_STRUCT_P heuristically. Use MEM_SET_IN_STRUCT_P. (get_memory_rtx): Likewise. * final.c (alter_subreg): Use MEM_COPY_ATTRIBUTES. * function.c (assign_stack_temp): Clear MEM_SCALAR_P and MEM_ALIAS_SET on newly returned MEMs. (assign_temp): Use MEM_SET_IN_STRUCT_P. (put_reg_into_stack): Likewise. (fixup_var_refs1): Use MEM_COPY_ATTRIBUTES. (gen_mem_addressof): Use MEM_SET_IN_STRUCT_P. (assign_parms): Likewise. (expand_function): Likewise. * integrate.c (expand_inline_function): Likewise. (copy_rtx_and_substitute): Use MEM_COPY_ATTRIBUTES. * loop.c (note_addr_stored): Remove check on MEM_IN_STRUCT_P. * optabs.c (gen_move_insn): Use MEM_COPY_ATTRIBUTES. * print-rtl.c (print_rtx): Print /f for frame_related. * recog.c (validate_replace_rtx_1): Use MEM_COPY_ATTRIBUTES. * reload1.c (reload): Copy MEM_SCALAR_P as well. * stmt.c (expand_decl): Use MEM_SET_IN_STRUCT_P. (expand_anon_union_decl): Use MEM_COPY_ATTRIBUTES. * varasm.c (make_decl_rtl): Use MEM_SET_IN_STRUCT_P. (output_constant_def): Likewise. * a29k.c (a29k_set_memflags_1): Take scalar_p. Set MEM_SCALAR_P. (a29k_set_memflags): Use it. * alpha.c (get_aligned_mem): Use MEM_COPY_ATTRIBUTES. * c4x.c (c4x_scan_for_ld): Likewise. * h8300.c (fix_bit_operand): Likewise. * m88k.c (legitimize_address): Likewise. (block_move_loop): Likewise. (block_move_no_loop): Likewise. (block_move_sequence): Likewise. (m88k_builtin_saveregs): Use MEM_SET_IN_STRUCT_P. * mips/abi64.h (SETUP_INCOMING_VARARGS): Likewise. * rs6000.c (expand_block_move_insn): Use MEM_COPY_ATTRIBUTES. * sh.c (sh_builtin_saveregs): Use MEM_SET_IN_STRUCT_P. * arm.h (arm_gen_load_multiple): Take scalar_p. (arm_store_load_multiple): Likewise. * arm.c (arm_gen_load_multiple): Likewise. (arm_gen_store_multiple): Likewise. (arm_gen_movstrqi): Treat MEM_SCALAR_P like MEM_IN_STRUCT_P. From-SVN: r24759
1999-01-11function.c (purge_addressof_1): If the note accesses a mem+addressof in a ↵Richard Henderson1-6/+39
wider mode than any replacement... * function.c (purge_addressof_1): If the note accesses a mem+addressof in a wider mode than any replacement, adjust the cached replacement. Cache trivial substitutions as well. From-SVN: r24629
1999-01-11Update copyrights.Richard Henderson1-1/+1
From-SVN: r24624
1999-01-11basic-block.h (basic_block_head): Rename to x_basic_block_head.Richard Henderson1-12/+12
* basic-block.h (basic_block_head): Rename to x_basic_block_head. (basic_block_end): Rename to x_basic_block_end. (BLOCK_HEAD, BLOCK_END): Update. * caller-save.c: Change basic_block_head/end references to BLOCK_HEAD/END. * combine.c, flow.c, function.c, gcse.c, global.c: Likewise. * graph.c, haifa-sched.c, local-alloc.c, regclass.c: Likewise. * regmove.c, reload1.c, reorg.c, sched.c: Likewise. From-SVN: r24622
1998-11-20function.c (nonlocal_goto_handler_slots): Renamed from ↵Bernd Schmidt1-11/+23
nonlocal_goto_handler_slot; now an EXPR_LIST chain. * function.c (nonlocal_goto_handler_slots): Renamed from nonlocal_goto_handler_slot; now an EXPR_LIST chain. (push_function_context_to): Adjust for this change. (pop_function_context_from): Likewise. (init_function_start): Likewise. (expand_function_end): Likewise. * function.h (struct function): Likewise. * calls.c (expand_call): Likewise. * explow.c (allocate_dynamic_stack_space): Likewise. * expr.h (nonlocal_goto_handler_slots): Rename its declaration. * stmt.c (declare_nonlocal_label): Make a new handler slot for each label. (expand_goto): When doing a nonlocal goto, find corresponding handler slot for it. Don't put the label address in the static chain register. (expand_end_bindings): Break out nonlocal goto handling code into three new functions. (expand_nl_handler_label, expand_nl_goto_receiver, expand_nl_goto_receivers): New static functions, broken out of expand_end_bindings and adapted to create one handler per nonlocal label. * function.c (delete_handlers): Delete insn if it references any of the nonlocal goto handler slots. * i960.md (nonlocal_goto): Comment out code that modifies static_chain_rtx. * sparc.md (nonlocal_goto): Likewise. (goto_handler_and_restore_v9): Comment out. (goto_handler_and_restore_v9_sp64): Comment out. From-SVN: r23732
1998-11-19expr.c (STACK_BYTES): Delete unused macro.Bernd Schmidt1-3/+7
* expr.c (STACK_BYTES): Delete unused macro. * calls.c: Provide default for PREFERRED_STACK_BOUNDARY. (STACK_BYTES): Use PREFERRED_STACK_BOUNDARY, not STACK_BOUNDARY. (expand_call): Likewise. (emit_library_call): Likewise. (emit_library_call_value): Likewise. * function.c: Provide default for PREFERRED_STACK_BOUNDARY. (STACK_BYTES): Use PREFERRED_STACK_BOUNDARY, not STACK_BOUNDARY. * explow.c: Provide default for PREFERRED_STACK_BOUNDARY. (round_push): Use PREFERRED_STACK_BOUNDARY, not STACK_BOUNDARY. (allocate_dynamic_stack_space): Likewise. * tm.texi (PREFERRED_STACK_BOUNDARY): Document new macro. (STACK_BOUNDARY): Update description to reflect the new situation. From-SVN: r23730
1998-11-15function.c (purge_addressof_1): Unshare rtl created by store_bit_field.J"orn Rennecke1-0/+12
* function.c (purge_addressof_1): Unshare rtl created by store_bit_field. From-SVN: r23670
1998-11-06function.c (purge_addressof): Clear purge_addressof_replacements only after ↵Richard Henderson1-1/+1
processing the whole function. * function.c (purge_addressof): Clear purge_addressof_replacements only after processing the whole function. From-SVN: r23554
1998-10-28Andreas Schwab <schwab@issan.cs.uni-dortmund.de>Andreas Schwab1-11/+44
Andreas Schwab <schwab@issan.cs.uni-dortmund.de> * function.c (purge_addressof_1): Instead of aborting when a bitfield insertion as a replacement for (MEM (ADDRESSOF)) does not work just put the ADDRESSOF on stack. Otherwise remember all such successfull replacements, so that exactly the same replacements can be made on the REG_NOTEs. Remove the special case for CALL insns again. (purge_addressof_replacements): New variable. (purge_addressof): Clear it at end. From-SVN: r23405
1998-10-19[multiple changes]Jeff Law1-1/+1
1998-10-18 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl> * reorg.c (steal_delay_list_from_target) Check for insns that modify the condition codes and effect the direction of the jump in the sequence. Sat Oct 17 13:09:09 1998 Graham <grahams@rcp.co.uk> * function.c (purge_addressof_1): Replace call to emit_insns_before() with emit_insn_before(). From-SVN: r23189
1998-10-18function.c (uninitialized_vars_warning): Do not warn for a VAR_DECL if it ↵Jeffrey A Law1-0/+8
has a nonzero DECL_INITIAL. * function.c (uninitialized_vars_warning): Do not warn for a VAR_DECL if it has a nonzero DECL_INITIAL. From-SVN: r23164
1998-10-17Warning fixes:Kaveh R. Ghazi1-2/+2
* Makefile.in (flow.o): Depend on recog.h. * cpplib.h (directive_table): Add missing initializiers. (finclude): Change type of variable `bsize' to size_t. * cse.c (rtx_cost): Mark parameter `outer_code' with ATTRIBUTE_UNUSED. * dwarfout.h (dwarfout_label): Wrap prototype in macro RTX_CODE. * fix-header.c (lookup_std_proto): Cast the result of `strlen' to `int' when comparing against one. (cpp_file_line_for_message): Mark parameter `pfile' with ATTRIBUTE_UNUSED. (cpp_fatal): Mark parameter `pfile' with ATTRIBUTE_UNUSED. * flow.c: Include recog.h. (sbitmap_copy): Cast arguments 1 & 2 of `bcopy' to (PTR). * function.c (thread_prologue_and_epilogue_insns): Mark parameter `f' with ATTRIBUTE_UNUSED. (reposition_prologue_and_epilogue_notes): Likewise. * genopinit.c (gen_insn): Cast argument of ctype functions to `unsigned char'. * haifa-sched.c: Include recog.h. (blockage_range): Cast result of UNIT_BLOCKED macro to (int) when comparing against one. * libgcc2.a (__throw): Revert ATTRIBUTE_UNUSED change for now. * mips-tfile.c (parse_end): Cast the argument of ctype function to `unsigned char'. (parse_ent): Likewise. (parse_input): Likewise. * optabs.c (init_libfuncs): Likewise. * protoize.c (find_rightmost_formals_list): Likewise. * recog.h (const_double_operand): Fix typo in prototype. * tlink.c (scan_linker_output): Cast the argument of ctype function to `unsigned char'. * toplev.c (check_lang_option): Cast the result of `strlen' to `int' when comparing against one. From-SVN: r23155
1998-10-13function.c (purge_addressof_1): Force the first argument of a CALL insn to ↵Andreas Schwab1-0/+6
memory. � * function.c (purge_addressof_1): Force the first argument of a CALL insn to memory. From-SVN: r23071
1998-10-13function.c (purge_addressof_1): Fix typo in inequality: do bitfield ↵Richard Henderson1-1/+1
optimization for equal mode sizes. * function.c (purge_addressof_1): Fix typo in inequality: do bitfield optimization for equal mode sizes. * expmed.c (store_bit_field): Don't take subregs of subregs in the movstrict case. Tidy a potential problem in the multi-word case. (extract_bit_field): Likewise. From-SVN: r23066
1998-10-12flow.c: Update comment.John Wehle1-0/+7
* flow.c: Update comment. (notice_stack_pointer_modification): New static function. (record_volatile_insns): Use it. (mark_regs_live_at_end): Mark the stack pointer as alive at the end of the function if current_function_sp_is_unchanging is set. (life_analysis_1): Set current_function_sp_is_unchanging. * function.c: Define it. (init_function_start): Initialize it. * output.h: Declare it. * reorg.c (fill_simple_delay_slots, dbr_schedule): Mark the stack pointer as alive at the end of the function if current_function_sp_is_unchanging is set. * i386.c (ix86_epilogue): Optimize the restoring of the stack pointer. From-SVN: r23009
1998-10-11Fine-grained control of -fcheck-memory-usage with new no_check_memory_usage ↵Ken Raeburn1-3/+13
attribute. Fine-grained control of -fcheck-memory-usage with new no_check_memory_usage attribute. Misc minor bugfixes and tests for it too. From-SVN: r22983
1998-10-09expmed.c (store_bit_field): Pun non-integral str_rtx modes.Richard Henderson1-12/+2
* expmed.c (store_bit_field): Pun non-integral str_rtx modes. Take extra care for op0 now possibly being a subreg. (extract_bit_field): Likewise. * function.c (purge_addressof_1): Revert Oct 4 change. Drop the reg to memory if there is no equal sized integral mode. * stor-layout.c (int_mode_for_mode): New function. * machmode.h: Prototype it. From-SVN: r22962
1998-10-03function.c (purge_addressof_1): If trying to take a sub-word integral piece ↵David S. Miller1-0/+11
of a floating point mode... * function.c (purge_addressof_1): If trying to take a sub-word integral piece of a floating point mode, put it on the stack. From-SVN: r22804
1998-10-02function.c (purge_addressof_1): Do not perform endianness corrections on ↵David S. Miller1-15/+2
bitpos, who we call will do it for us. * function.c (purge_addressof_1): Do not perform endianness corrections on bitpos, who we call will do it for us. From-SVN: r22766
1998-09-30Typo in last commit.Richard Henderson1-1/+1
From-SVN: r22687
1998-09-30function.c (purge_addressof_1): Use bitfield manipulation routines to handle ↵Richard Henderson1-12/+80
mem mode < reg mode. * function.c (purge_addressof_1): Use bitfield manipulation routines to handle mem mode < reg mode. From-SVN: r22686
1998-09-30function.c (gen_mem_addressof): If the address REG is REG_USERVAR_P make the ↵Mark Mitchell1-1/+3
new REG be so also. * function.c (gen_mem_addressof): If the address REG is REG_USERVAR_P make the new REG be so also. * loop.c (scan_loop): Apply DeMorgan's laws and add documentation in an attempt to clarify slightly. From-SVN: r22667
1998-09-20reload1.c (emit_reload_insns): Accept a new arg for the bb.Richard Henderson1-1/+15
* reload1.c (emit_reload_insns): Accept a new arg for the bb. Use it to update bb boundaries. Update caller. * function.c (reposition_prologue_and_epilogue_notes): Update bb boundaries wrt the moved note. From-SVN: r22507
1998-09-15combine.c (make_extraction): If no mode is specified for an operand of insv...Jeffrey A Law1-4/+15
* combine.c (make_extraction): If no mode is specified for an operand of insv, extv, or extzv, default it to word_mode. (simplify_comparison): Similarly. * expmed.c (store_bit_field): Similarly. (extract_bit_field): Similarly. * function.c (fixup_var_regs_1): Similarly. * recog.c (validate_replace_rtx_1): Similarly. * mips.md (extv, extzv, insv expanders): Default modes for most operands. Handle TARGET_64BIT. (movdi_uld, movdi_usd): New patterns. From-SVN: r22439
1998-09-15tree.h (BUILT_IN_CALLER_RETURN_ADDRESS): Unused.Richard Henderson1-0/+21
* tree.h (BUILT_IN_CALLER_RETURN_ADDRESS): Unused. Kill. (BUILT_IN_FP, BUILT_IN_SP, BUILT_IN_SET_RETURN_ADDR_REG): Kill. (BUILT_IN_EH_STUB_OLD, BUILT_IN_EH_STUB, BUILT_IN_SET_EH_REGS): Kill. (BUILT_IN_EH_RETURN, BUILT_IN_DWARF_CFA): New. * c-decl.c (init_decl_processing): Update accordingly. * expr.c (expand_builtin): Likewise. * cp/decl.c (init_decl_processing): Likewise. * rtl.h (global_rtl): Add cfa entry. (virtual_cfa_rtx, VIRTUAL_CFA_REGNUM): New. (LAST_VIRTUAL_REGISTER): Update. * emit-rtl.c (global_rtl): Add cfa entry. (init_emit): Initialize it. * function.c (cfa_offset): New. (instantiate_virtual_regs): Initialize it. (instantiate_virtual_regs_1): Instantiate virtual_cfa_rtx. (expand_function_end): Call expand_eh_return. * tm.texi (ARG_POINTER_CFA_OFFSET): New. * except.c (current_function_eh_stub_label): Kill. (current_function_eh_old_stub_label): Likwise; update all references. (expand_builtin_set_return_addr_reg): Kill. (expand_builtin_eh_stub_old, expand_builtin_eh_stub): Kill. (expand_builtin_set_eh_regs): Kill. (eh_regs): Produce a third reg for the actual handler address. (eh_return_context, eh_return_stack_adjust): New. (eh_return_handler, eh_return_stub_label): New. (init_eh_for_function): Initialize them. (expand_builtin_eh_return, expand_eh_return): New. * except.h: Update prototypes. * flow.c (find_basic_blocks_1): Update references to the stub label. * function.h (struct function): Kill stub label elements. * libgcc2.c (in_reg_window): For REG_SAVED_REG, check that the register number is one that would be in the previous window. Provide a dummy definition for non-windowed targets. (get_reg_addr): New function. (get_reg, put_reg, copy_reg): Use it. (__throw): Rely on in_reg_window, not INCOMING_REGNO. Kill stub generating code and use __builtin_eh_return. Use __builtin_dwarf_cfa. * alpha.c (alpha_eh_epilogue_sp_ofs): New. (alpha_init_expanders): Initialize it. (alpha_expand_epilogue): Use it. * alpha.h: Declare it. * alpha.md (eh_epilogue): New. * m68h.h (ARG_POINTER_CFA_OFFSET): New. * sparc.h (ARG_POINTER_CFA_OFFSET): New. From-SVN: r22436
1998-07-30Function entry/exit profiling instrumentation:Ken Raeburn1-1/+42
* expr.h (profile_function_entry_libfunc, profile_function_exit_libfunc): Declare new variables. * optabs.c: Define them here. (init_optabs): Initialize them. * tree.h (struct tree_decl): New flag no_instrument_function_entry_exit. (DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT): New accessor macro. * c-decl.c (duplicate_decls): Merge it. * c-common.c (enum attrs): New value A_NO_INSTRUMENT_FUNCTION. (init_attributes): Use it for "no_instrument_function". (decl_attributes): Handle it, for functions that have not yet been compiled. Set decl flag. * flags.h (flag_instrument_function_entry_exit): Declare new variable. * toplev.c (flag_instrument_function_entry_exit): Define it here. (f_options): New option "instrument-functions". * function.h (struct function): New field instrument_entry_exit. * function.c (current_function_instrument_entry_exit): New variable. (push_function_context_to, pop_function_context_from): Save and restore. (expand_function_start): Set current_ variable, maybe emit return label and entry profile call. (expand_function_end): Maybe emit exit profile call. Testsuite: * gcc.c-torture/special/eeprof-1.c: New test, for -finstrument-functions. * gcc.c-torture/special/special.exp: Run it. From-SVN: r21495
1998-07-17Fix some sparc complex testsuite failures.Jim Wilson1-1/+4
* function.c (fixup_var_refs_insns): Handle CLOBBER of a CONCAT. From-SVN: r21251
1998-06-30expr.c (emit_group_load, [...]): Rewrite considering the size and alignment ↵Richard Henderson1-3/+8
of the structure being manipulated. * expr.c (emit_group_load, emit_group_store): Rewrite considering the size and alignment of the structure being manipulated. * expr.c, calls.c, function.c: Update all callers. * expr.h: Update prototypes. * cse.c (invalidate): Cope with parallels. From-SVN: r20867
1998-06-29* Merge from gcc2 June 9, 1998 snapshot. See ChangeLog.13 forJeff Law1-2/+2
details. From-SVN: r20808
1998-06-25invoke.texi (-fstrict-aliasing): Document.Mark Mitchell1-0/+4
* invoke.texi (-fstrict-aliasing): Document. * rtl.texi (MEM_ALIAS_SET): Document. * flags.h (flag_strict_aliasing): Declare. * toplev.c (flag_strict_aliasing): Define. (f_options): Add -strict-aliasing. (main): Set flag_strict_aliasing if -O2 or higher. * tree.h (tree_type): Add alias_set field. (TYPE_ALIAS_SET): New macro. (TYPE_ALIAS_SET_KNOWN_P): Likewise. (get_alias_set): Declare. * tree.c (lang_get_alias_set): Define. (make_node): Initialize TYPE_ALIAS_SET. (get_alias_set): New function. * print-tree.c (print_node): Dump the alias set for a type. * c-tree.h (c_get_alias_set): Declare. * c-common.c (c_get_alias_set): New function. * c-decl.c (init_decl_processing): Set lang_get_alias_set. * expr.c (protect_from_queue): Propogage alias sets. (expand_assignment): Calculate alias set for new MEMs. (expand_expr): Likewise. * function.c (put_var_into_stack): Likewise. (put_reg_into_stack): Likewise. (gen_mem_addressof): Likewise. (assign_parms): Likewise. * stmt.c (expand_decl): Likewise. * varasm.c (make_decl_rtl): Eliminate redundant clearing of DECL_RTL. Calculate alias set for new MEMs. * rtl.def (REG): Add dummy operand. (MEM): Add extra operand to store the MEM_ALIAS_SET. * rtl.h (MEM_ALIAS_SET): New macro. (gen_rtx_MEM): Declare. * emit-rtl.c (gen_rtx_MEM): New function. * gengenrtl.c (sepcial_rtx): Make MEMs special. * alias.c (CHECK_ALIAS_SETS_FOR_CONSISTENCY): New macro. (DIFFERENT_ALIAS_SETS_P): Likewise. (canon_rtx): Propogate the alias set to the new MEM. (true_dependence): Check the alias sets. (anti_dependence): Likewise. (output_dependence): Likewise. * explow.c (stabilize): Progoate alias sets. * integrate.c (copy_rtx_and_substitute): Likewise. * final.c (alter_subreg): Make sure not to leave MEM_IN_STRUCT_P in an unpredictable state. Propogate alias sets. * reload1.c (reload): Clear MEM_ALIAS_SET for new MEMs about which we have no alias information. From-SVN: r20719
1998-06-08function.c: Define current_function_cannot_inline.Jason Merrill1-0/+6
* function.c: Define current_function_cannot_inline. (push_function_context_to): Save it. (pop_function_context_from): Restore it. * function.h (struct function): Provide it a home. * output.h: Declare it. * integrate.c (function_cannot_inline_p): Check it. * decl.c (cp_finish_decl): Disable inlining of extern inlines with static variables. From-SVN: r20332