aboutsummaryrefslogtreecommitdiff
path: root/gcc/local-alloc.c
AgeCommit message (Collapse)AuthorFilesLines
1997-11-02Update mainline egcs to gcc2 snapshot 971021.Jeff Law1-4/+5
From-SVN: r16278
1997-10-22local-alloc.c (block_alloc): Don't lose if two SCRATCH expressions are shared.Jeffrey A Law1-8/+3
* local-alloc.c (block_alloc): Don't lose if two SCRATCH expressions are shared. From-SVN: r16147
1997-09-02Fix i386 code generation error reported by Mumit Khan.Jim Wilson1-1/+60
* local-alloc.c (contains_replace_regs): New function. (update_equiv_regs): When adding a REG_EQUIV note for a set of a MEM, verify that there is no existing REG_EQUIV note, and add a call to contains_place_regs. From-SVN: r15041
1997-08-25version.c: Bump for new snapshot.Jeff Law1-0/+16
* version.c: Bump for new snapshot. * local-alloc.c (update_equiv_regs): All the target to reject promotion of some REG_EQUAL to REG_EQUIV notes. * pa.h (DONT_RECORD_EQUIVALENCE): Define. Fixes some c-torture failures, also improves generated code. * pa.c (secondary_reload_class): (mem (mem ... )) does not need secondary reloads. Fixes 094.fpppp/twldrv.f abort. * pa.c (hppa_builtin_saveregs): Emit a blockage insn after the store of the argument registers. Fixes c-torture failure. * fold-const.c (multiple_of_p): New function. (fold): Turn some cases of *_DIV_EXPR into EXACT_DIV_EXPR. One of the performance patches from the g77 folks. From-SVN: r14915
1997-08-11* Integrate alias analysis changes from jfc@mit.eduJeffrey A Law1-2/+2
* Makefile.in (OBJS): Add alias.o (alias.o): Add dependencies. * alias.c: New file. * sched.c: Remove alias analysis code. It lives in alias.c now. (reg_last_uses_size): Declare. (sched_analyze_2): Add new arguments to true_dependence. (sched_analyze_insn): Use reg_last_uses_size instead of max_reg. (schedule_block): Initialize reg_last_uses_size. (schedule_insns): Always call init_alias_analysis. * calls.c (expand_call): Note calls to malloc, calloc, and realloc; mark return value from such functions as a pointer and keep track of them for alias analysis. If a return value from a function is a pointer, mark it as such. * combine.c (distribute_notes): Handle REG_NOALIAS. * cse.c (struct write_data): Delete. No longer needed. (invalidate): Don't call set_nonvarying_address_components anymore. Use true_dependence to decide if an entry should be removed from the hash table. (invalidate_memory): Remove WRITES argument, simplify appropriately. Fix all callers. (note_mem_written): Similarly for WRITE_PTR argument. (invalidate_from_clobbers): Similarly for W argument. (invalidate_for_call): Remove memory elements from the hash table. (refers_to_mem_p, cse_rtx_addr_varies_p): Deleted. (cse_rtx_varies_p): New function. Derived from old cse_rtx_addr_varies_p. (cse_insn): Remove WRITES_MEMORY and INIT variables and all references. Don't call note_mem_written anymore. Stack pushes invalidate the stack pointer if PUSH_ROUNDING is defined. No longer need to call cse_rtx_addr_varies_p to decide if a MEM should be invalidated. (skipped_writes_memory): Remove variable. (invalidate_skipped_set): Simplify and wewrite to use invalidate_memory. (invalidate_skipped_block): Simplify for new alias analysis code. (cse_set_around_loop): Likewise. (cse_main): Call init_alias_analysis. * flags.h (flag_alias_check, flag_argument_noalias): Declare. * toplev.c (flag_alias_check, flag_argument_noalias): Define. (f_options): Add new alias checking arguments. (main): Set flag_alias_check when optimizing. * local_alloc (validate_equiv_mem_from_store): Add new arguments to true_dependence. (memref_referenced_p): Likewise. * loop.c (NUM_STORES): Increase to 30. (prescan_loop): Only non-constant calls set unknown_address_altered. (invariant_p): Add new arguments to true_dependence. (record_giv): Initialize unrolled and shared fields. (emit_iv_add_mult): Call record_base_value as needed. * loop.h (struct induction): Add unrolled and shared fields. * unroll.c (unroll_loop): Call record_base_value as needed. (copy_loop_body): Likewise. (final_biv_value): Likewise. (final_giv_value): Likewise. (find_splittable_regs): Likewise. Only create one new pseudo if we have multiple address GIVs that were combined with the same dst_reg GIV. Note when a new register is created due to unrolling. * rtl.c (reg_note_name): Add REG_NOALIAS. * rtl.h (enum reg_note): Similarly. (rtx_varies_p, may_trap_p, side_effects_p): Declare. (volatile_refs_p, volatile_insn_p, remove_note): Likewise. (note_stores, refers_to_regno_p, reg_overlap_mentioned_p): Likewise. (true_dependence, read_dependence, anti_dependence): Likewise. (output_dependence, init_alias_analysis, end_alias_analysis): Likewise. (mark_user_reg, mark_reg_pointer): Likewise. jfc's alias analysis code. From-SVN: r14768
1997-06-16Use REG_SET macrosMichael Meissner1-11/+3
From-SVN: r14250
1997-06-02Widen some short fields to int; Use allocate_reg_info to allocate the ↵Michael Meissner1-3/+2
reg_renumber array From-SVN: r14142
1997-05-30Use accessor macros to access arrays based on regno; move many of the arrays ↵Michael Meissner1-39/+39
into a single structure. From-SVN: r14140
1997-04-03(no_conflict_p): Reject sequences with foreign insns.Jim Wilson1-2/+6
From-SVN: r13838
1997-02-08(update_equiv_regs): Fix error in last change.Richard Kenner1-5/+4
From-SVN: r13622
1997-01-31If we can't substitute an equiv reg only used once, move theIan Lance Taylor1-25/+93
assignment From-SVN: r13572
1996-12-13Check SMALL_REGISTER_CLASSES at runtimeIan Lance Taylor1-1/+3
From-SVN: r13302
1996-11-12(qty_compare_1, qty_sugg_compare_1): Use `const void *' arguments.Richard Kenner1-89/+49
(QTY_CMP_PRI, QTY_CMP_SUGG): New macros. (qty_compare_1, qty_sugg_compare_1): Use them. From-SVN: r13134
1996-08-11(reg_equiv_replace): New variable.Richard Kenner1-21/+35
(update_equiv_regs): Set reg_equiv_replacement for all REG_EQUIV notes encountered or generated. From-SVN: r12618
1996-07-03formatting tweaksMike Stump1-8/+8
From-SVN: r12390
1996-06-10local-alloc.c (update_equiv_regs): Ignore insns that read or write registers ↵Jeff Law1-3/+9
that are likely to be spilled. * local-alloc.c (update_equiv_regs): Ignore insns that read or write registers that are likely to be spilled. From-SVN: r12272
1996-03-22(optimize_reg_copy_1): Only update reg_live_length if it isRichard Kenner1-7/+13
non-negative. From-SVN: r11596
1996-01-16(memref_referenced_p, case REG): Fix last change.Richard Kenner1-2/+2
From-SVN: r11020
1996-01-06Fix formatting.Richard Kenner1-1/+1
From-SVN: r10948
1996-01-01(reg_equiv_replacement): New variable.Richard Kenner1-3/+12
(memref_referenced_p, case REG): Check for reg_equiv_replacement. (update_equiv_regs): reg_equiv_replacement now file-scope. From-SVN: r10930
1995-12-31hard-reg-set.h (losing_caller_save_reg_set): Declare.Jeff Law1-11/+7
* hard-reg-set.h (losing_caller_save_reg_set): Declare. * regclass.c (losing_caller_save_reg_set): Define. (init_reg_sets_1): Initialize losing_caller_save_reg_set. * global.c (find_reg): Avoid caller-saving registers in LOSING_CALLER_SAVE_REGS if it's defined. * local-alloc.c (find_free_reg): Avoid caller-saving registers in losing_caller_save_reg_set. (CLASS_LIKELY_SPILLED_P): Delete definition. Moved into regs.h. * regs.h (CLASS_LIKELY_SPILLED_P): Define if not already defined. From-SVN: r10926
1995-12-16(optimize_reg_copy_2): Don't attempt optimization if destinationRichard Kenner1-1/+2
register dies. From-SVN: r10780
1995-08-21(wipe_dead_reg): Make a register mentioned in a REG_INC note die afterRichard Kenner1-1/+7
the instruction. From-SVN: r10264
1995-06-15Update FSF address.Richard Kenner1-1/+2
From-SVN: r9961
1995-05-16Fix typos in comments.Richard Kenner1-1/+1
From-SVN: r9712
1995-02-21local-alloc.c (block_alloc): Stop looping over the input operands once we ↵Jeff Law1-0/+2
find an input/output register pair... * local-alloc.c (block_alloc): Stop looping over the input operands once we find an input/output register pair which can be combined into a single qty. From-SVN: r8990
1994-08-08(find_free_reg): Fix typo in last change.Richard Kenner1-1/+1
From-SVN: r7871
1994-08-07(qty_changes_size): New variable.Richard Kenner1-0/+17
(alloc_qty{,_for_scratch}, update_qty_class): Set it. (local_alloc): Allocate it. (find_free_reg): If CLASS_CANNOT_CHANGE_SIZE, avoid its registers if qty_changes_size. From-SVN: r7865
1994-06-14Cast pointer operands to bzero, bcopy, and bcmp to (char *).Richard Kenner1-10/+14
From-SVN: r7472
1994-05-27(local_alloc): Fix typo in last change.Richard Kenner1-2/+2
From-SVN: r7361
1994-05-27(requires_inout): Renamed from requires_inout_p and returns number of ↵Richard Kenner1-16/+47
alternatives that require a match. (requires_inout): Renamed from requires_inout_p and returns number of alternatives that require a match. (block_alloc): Use new function and handle case where all alternatives have some operand that must match operand 0. From-SVN: r7358
1994-05-27(qty_sugg_compare_1): Fix typo in last change.Richard Kenner1-1/+1
From-SVN: r7357
1994-05-27(qty_phys_num{,_copy}_sugg): New variables.Richard Kenner1-31/+143
(qty_phys_has{,_copy}_sugg): Deleted. (qty_sugg_compare{,_1}): New functions. (local_alloc): Allocate and init new vars instead of deleted ones. (block_alloc): Update and use new vars. Order quantities using new functions when allocating quantities with suggested registers. (combine_regs, find_free_reg): Use new vars to count number of suggestions. From-SVN: r7356
1994-04-21Add prototypes for static functions.Richard Kenner1-18/+29
From-SVN: r7118
1994-04-08Remove previous Berg change.Richard Kenner1-1/+5
From-SVN: r6998
1994-04-06(block_alloc): Avoid #ifdef HARD_REG_SET.Richard Kenner1-5/+1
From-SVN: r6976
1994-02-27(qty_compare{,_1}): Give multi-word regs higher priority, as stated inRichard Kenner1-8/+10
the comments. From-SVN: r6649
1994-02-14(optimize_reg_copy): A register that dies in a CALL_INSN doesn't crossRichard Kenner1-2/+4
that call. From-SVN: r6555
1993-12-23(optimize_reg_copy_1): After decreasing sregno'sJim Wilson1-0/+5
reg_live_length, correct it if it is now obviously too small. From-SVN: r6291
1993-09-24local-alloc.c: (find_free_reg): Make sure we will always be able to eliminate...Doug Evans1-0/+5
* local-alloc.c: (find_free_reg): Make sure we will always be able to eliminate FRAME_POINTER_REGNUM into HARD_FRAME_POINTER_REGNUM. From-SVN: r5460
1993-08-03(block_alloc): Don't attempt to allocate aJim Wilson1-1/+4
SCRATCH if it will not fit in scratch_list. From-SVN: r5058
1993-06-23(alloc_qty_for_scratch): Can allocate likely-spilled register classes for ↵Richard Kenner1-14/+8
SCRATCH. (alloc_qty_for_scratch): Can allocate likely-spilled register classes for SCRATCH. (block_alloc): Likewise for regs in small register classes. From-SVN: r4719
1993-06-23(scratch_block, scratch_list{,_length}, scratch_index): New variables.Richard Kenner1-5/+18
(local_alloc): Allocate and initialize them. (block_alloc): Only allocate a SCRATCH if it can fit in the block we make. Don't mark regs used in SCRATCH live here; instead, make entry in new tables. From-SVN: r4713
1993-05-11(block_alloc): Don't dereference a NULL pointer.Richard Stallman1-0/+1
From-SVN: r4425
1993-04-16(qty_n_refs): Make int, like reg_n_refs.Richard Kenner1-10/+10
(qty_first_reg, reg_next_in_qty): Make int, not short. (local_alloc): Allocate these as arrays of ints. (block_alloc, qty_compare_1): qty_order is now array of ints. From-SVN: r4167
1993-03-31(optimize_reg_copy_1): Don't increment n_calls specially if P is a call_insn.Richard Stallman1-6/+0
From-SVN: r3948
1993-01-24(CLASS_LIKELY_SPILLED_P): Add default definition.Richard Kenner1-4/+15
(alloc_qty_for_scratch, local_alloc): Use CLASS_LIKELY_SPILLED_P. From-SVN: r3319
1993-01-19(find_free_reg): Add comment about nonlocal labels.Richard Kenner1-0/+4
From-SVN: r3283
1993-01-03(block_alloc): Generalize tying so we can tie any operand with the output ↵Richard Kenner1-40/+56
unless some operand must be in the same register as the output... (block_alloc): Generalize tying so we can tie any operand with the output unless some operand must be in the same register as the output, in which case only try tying that operand. From-SVN: r3075
1992-12-01(optimize_reg_copy_2): Correct reg_n_refs updates.Jim Wilson1-2/+2
From-SVN: r2829