summaryrefslogtreecommitdiff
path: root/gcc/global.c
Commit message (Collapse)AuthorAgeFilesLines
...
* * Makefile.in (stupid.o): Update dependencies.law1998-10-061-1/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (global.o): Likewise. * global.c: Include reload.h (reg_becomes_live): New function. (reg_dies): New function. (build_insn_chain): New function. (global_alloc): Call build_insn_chain before calling reload. * reload.h (struct needs): New structure definition. (struct insn_chain): Likewise. (reload_insn_chain): Declare variable. (new_insn_chain): Declare function. * reload1.c (reload_startobj): New variable. (reload_insn_chain): New variable. (unused_insn_chains): New variable. (new_insn_chain): New function. (init_reload): Initialize reload_startobj, not reload_firstobj. (reload): Initialize reload_firstobj. Before returning, free everything on the reload_obstack. * stupid.c: Include insn-config.h, reload.h and basic-block.h. (reg_where_dead_chain, reg_where_born_exact, reg_where_born_clobber, current_chain): New variables. (reg_where_born): Delete variable. (REG_WHERE_BORN): New macro. (find_clobbered_regs): New function. (stupid_life_analysis): Don't allocate/free reg_where_born. Allocate and free reg_where_born_exact, reg_where_born_clobber, reg_where_dead_chain. Use REG_WHERE_BORN instead of reg_where_born. While processing the insns, build the reload_insn_chain with information about register lifetimes. (stupid_reg_compare): Use REG_WHERE_BORN instead of reg_where_born. (stupid_mark_refs): Replace arg INSN with arg CHAIN. All callers changed. Compute and information about birth and death of pseudo registers in reg_where_dead_chain, reg_where_born_exact and reg_where_born_clobber. Delete code to set elements of reg_where_born. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@22862 138bc75d-0d04-0410-961f-82ee72b054a4
* * global.c (global_alloc): Delete code to manage the scratch_list.law1998-10-021-12/+0
| | | | | | | | | | | | | | | | | | | | | | | * local-alloc.c (qty_scratch_rtx): Delete. (scratch_block): Delete. (scratch_list): Delete. (scratch_list_length): Delete. (scratch_index): Delete. (alloc_qty_for_scratch): Delete. (local-alloc): Update initialization of max_qty. Delete code to manage the scratch list. Delete code to allocate/initialize qty_scratch_rtx. (block_alloc): Don't allocate quantities for scratches. Delete code to manage the scratch list. * regs.h (scratch_list): Delete declaration. (scratch_block): Delete declaration. (scratch_list_length): Delete declaration. * reload1.c (reload): Delete code to manage the scratch list. (spill_hard_reg): Likewise. (mark_scratch_live): Delete. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@22751 138bc75d-0d04-0410-961f-82ee72b054a4
* * regs.h (HARD_REGNO_CALL_PART_CLOBBERED): New macro.law1998-09-301-1/+4
| | | | | | | | | * local-alloc.c (find_free_reg): Use it. * global.c (find_reg): Likewise. * tm.texi: Document HARD_REGNO_CALL_PART_CLOBBERED. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@22688 138bc75d-0d04-0410-961f-82ee72b054a4
* * global.c (reg_allocno): Now static.law1998-09-161-1/+1
| | | | | | | | | * reload1.c (reg_allocno): Delete declaration. (order_regs_for_reload): Take no arguments. Don't treat regs allocated by global differently than those allocated by local-alloc. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@22446 138bc75d-0d04-0410-961f-82ee72b054a4
* * global.c: Update comments.law1998-09-081-32/+47
| | | | | | | | | | | | | | | | | (global_alloc): Assign allocation-numbers even for registers allocated by local_alloc in case they are later spilled and retry_global_alloc is called. (mark_reg_store, mark_reg_clobber, mark_reg_conflicts, mark_reg_death): Always record a conflict with a pseudo register even if it has been assigned to a hard register. (dump_conflicts): Don't list pseudo registers already assigned to a hard register as needing to be allocated, but do list their conflicts. * local-alloc.c: Update comment. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@22322 138bc75d-0d04-0410-961f-82ee72b054a4
* * global.c: Include machmode.h amd move hard-reg-set.h beforelaw1998-06-211-1/+2
| | | | | | | rtl.h. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@20643 138bc75d-0d04-0410-961f-82ee72b054a4
* * alias.c: Include toplev.hlaw1998-06-191-0/+1
| | | | | | | | | | | | | | | | | * caller-save.c: Include toplev.h * combine.c: Include toplev.h * flow.c Include toplev.h * global.c: Include toplev.h * jump.c: Include toplev.h * local-alloc.c: Include toplev.h * loop.c: Include toplev.h * regmove.c: Include toplev.h * stupid.c: Include toplev.h * unroll.c: Include toplev.h * Makefile.in: Add toplev.h dependencies. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@20623 138bc75d-0d04-0410-961f-82ee72b054a4
* * global.c (global_alloc): Don't pass HARD_CONST (0) to find_reg,law1998-04-181-2/+2
| | | | | | | just pass zero. That will work regardless of the size of HARD_REG_SET. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@19276 138bc75d-0d04-0410-961f-82ee72b054a4
* * basic-block.h (basic_block_computed_jump_target): Declare.law1998-03-281-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | * flags.h: (current_function_has_computed_jump): Declare. * flow.c: (basic_block_computed_jump_target): Define. (flow_analysis): Allocate it. Set current_function_has_computed_jump to 0. (find_basic_blocks): Set current_function_has_computed_jump and elements of basic_block_computed_jump_target to 1 as appropriate. * function.c: (current_function_has_computed_jump): Define. * global.c (global_conflicts): Don't allocate pseudos into stack regs at the start of a block that is reachable by a computed jump. * reg-stack.c (stack_reg_life_analysis): If must restart, do so immediately. (subst_stack_regs): Undo change from Sep 4 1997. (uses_reg_or_mem): Now unused, deleted. * stupid.c (stupid_life_analysis): Compute current_function_has_computed_jump. (stupid_find_reg): Don't allocate stack regs if the function has a computed goto. * haifa-sched.c (is_cfg_nonregular): Delete code to determine if the current function has a computed jump. Use the global value instead. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@18860 138bc75d-0d04-0410-961f-82ee72b054a4
* Major cutover to using system.h:ghazi1998-03-201-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.in (alias.o, bitmap.o, c-aux-info.o, c-common.o, c-decl.o, c-iterate.o, c-lang.o, c-lex.o, c-pragma.o, c-typeck.o, caller-save.o, calls.o, collect2.o, combine.o, cse.o, dbxout.o, dwarf2out.o, dwarfout.o, emit-rtl.o, except.o, explow.o, expmed.o, expr.o, final.o, flow.o, function.o, getpwd.o, global.o, integrate.o, jump.o, local-alloc.o, loop.o, optabs.o, pexecute.o, prefix.o, print-rtl.o, print-tree.o, profile.o, real.o, recog.o, reg-stack.o, regclass.o, regmove.o, reload.o, reload1.o, reorg.o, rtl.o, rtlanal.o, sdbout.o, stmt.o, stor-layout.o, stupid.o, tlink.o, toplev.o, tree.o, unroll.o, varasm.o, xcoffout.o): Depend on system.h. * alias.c, bitmap.c, c-aux-info.c, c-common.c, c-decl.c, c-iterate.c, c-lang.c, c-lex.c, c-pragma.c, c-typeck.c, caller-save.c, calls.c, collect2.c, combine.c, cse.c, dbxout.c, dwarf2out.c, dwarfout.c, emit-rtl.c, except.c, explow.c, expmed.c, expr.c, final.c, flow.c, function.c, gcc.c, getpwd.c, global.c, integrate.c, jump.c, local-alloc.c, loop.c, optabs.c, pexecute.c, prefix.c, print-rtl.c, print-tree.c, profile.c, real.c, recog.c, reg-stack.c, regclass.c, regmove.c, reload.c, reload1.c, reorg.c, rtl.c, rtlanal.c, sched.c, sdbout.c, stmt.c, stor-layout.c, stupid.c, tlink.c, toplev.c, tree.c, unroll.c, varasm.c, xcoffout.c: Include system.h. Organize include ordering so that stdarg/varargs comes before other system headers. Remove spurious casts of functions assured of a prototype in system.h. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@18726 138bc75d-0d04-0410-961f-82ee72b054a4
* amanfred1998-03-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gcc/ChangeLog: * c-decl (finish_struct): Change type of min_align to unsigned. * cplus-dem.c (demangle_function_name): Change type of variable i to size_t; remove unused variable len. * dwarf2out.c (reg_save): Add explicit cast of -1 to unsigned and a comment indicating this is proper behaviour. (reg_loc_descriptor): Remove redundant comparison of unsigned variable reg >= 0. (based_loc_descr): Likewise. * enquire.c (bitpattern): Change type of variable i to unsigned. * final.c (output_asm_insn): Don't cast insn_noperands to unsigned. * flow.c (life_analysis): Change type of variable i to size_t; remove unused variable insn. * gcc.c (translate_options): Change type of variables optlen, arglen and complen to size_t. (input_filename_length): Change type to size_t. (do_spec_1): Change type of variable bufsize to size_t. (main): Change type of variables i and j to size_t; remove subblock local definition of variable i. (lookup_compiler): Change type of second argument to size_t; change type of variable i to size_t. * genemit.c (output_init_mov_optab): Change type of variable i to size_t. * genopinit.c (get_insn): Change type of variable pindex to size_t. * genrecog.c (add_to_sequence): Change type of variable i to size_t. * global.c (global_alloc): Change type of variable i to size_t. * regclass.c (init_reg_sets): Change type of variables i and j to unsigned. * stmt.c (expand_end_bindings): Change type of variable i to size_t. (expand_end_case): Change type of variable count to size_t. * toplev.c (main): Change type of variable j to size_t. (set_target_switch): Change type of variable j to size_t. (print_switch_values): Change type of variable j to size_t; remove unused variable flags. * varasm.c (assemble_variable): Change type of variable align to size_t. (const_hash_rtx): Change type of variable i to size_t. gcc/cp/ChangeLog: Sun Mar 8 17:13:38 1998 Manfred Hollstein <manfred@s-direktnet.de> * decl2.c (lang_decode_option): Change j's type to size_t. * tree.c (layout_vbasetypes): record_align and desired_align are of type unsigned int; const_size and nonvirtual_const_size likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@18491 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-common.c: Include <stdlib.h> and <string.h>/<strings.h>.law1998-02-071-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | * calls.c (expand_call): Remove unused variables funtree, n_regs, and tmpmode. * dbxout.c, except.c: Include <string.h>/<strings.h>. * explow.c: (plus_constant_for_output_wide) Removed unused variable all_constant. * c-decl.c, genattr.c, genattrtab.c, getconfig.c, genemit.c genextract.c, genflags.c, genopinit.c genoutput.c, genpeep.c, genrecog.c, global.c, integrate.c , stupid.c : Include <stdlib.h>. * genextract.c: (walk_rtx) Remove unused variable link. * genrecog.c: (concat) Remove unreferenced static function. * prefix.c: Include <string.h>/<strings.h>, <stdlib.h> * stmt.c: Include <stdlib.h>. (expand_asm_operands): Remove unused variable val1. (expand_return): Remove unused variable block. (pushcase): Remove unused variables l and n. (pushcaserange): Likewise. * unroll.c (unroll_loop): Remove unused variable temp. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@17766 138bc75d-0d04-0410-961f-82ee72b054a4
* Update mainline egcs to gcc2 snapshot 971021.law1997-11-021-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@16278 138bc75d-0d04-0410-961f-82ee72b054a4
* * global.c (global_alloc): Free the conflict matrix afterlaw1997-10-311-3/+5
| | | | | | | reload has finished. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@16249 138bc75d-0d04-0410-961f-82ee72b054a4
* * global.c (global_alloc): Use xmalloc instead of alloca forbrendan1997-10-281-2/+7
| | | | | | | | CONFLICTS, since max_allocno * allocno_row_words alone can be more than 2.5Mb sometimes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@16223 138bc75d-0d04-0410-961f-82ee72b054a4
* (global_conflicts): Pass FIRST_PSEUDO_REGISTER to call tokenner1997-07-161-3/+4
| | | | | | | EXECUTE_IF_SET_IN_REG_SET. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@14462 138bc75d-0d04-0410-961f-82ee72b054a4
* abstract regset stuff into macrosmeissner1997-06-051-33/+15
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@14147 138bc75d-0d04-0410-961f-82ee72b054a4
* Use accessor macros to access arrays based on regno; move many of the arrays ↵meissner1997-05-301-12/+12
| | | | | | into a single structure. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@14140 138bc75d-0d04-0410-961f-82ee72b054a4
* (prune_references): Add missing symmetic CONFLICTP call.kenner1996-11-121-1/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@13143 138bc75d-0d04-0410-961f-82ee72b054a4
* (allocno_compare): Use `const void *' arguments.kenner1996-11-121-10/+12
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@13131 138bc75d-0d04-0410-961f-82ee72b054a4
* (reg_allocno): No longer static.kenner1996-01-011-2/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@10931 138bc75d-0d04-0410-961f-82ee72b054a4
* * hard-reg-set.h (losing_caller_save_reg_set): Declare.law1996-01-011-1/+8
| | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@10926 138bc75d-0d04-0410-961f-82ee72b054a4
* Update FSF address.kenner1995-06-151-1/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@9961 138bc75d-0d04-0410-961f-82ee72b054a4
* (global_alloc): Mark regs assigned to SCRATCH as used by more thankenner1994-09-161-0/+12
| | | | | | | just local alloc. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@8091 138bc75d-0d04-0410-961f-82ee72b054a4
* (find_reg) If CLASS_CANNOT_CHANGE_SIZE, avoid its registers ifkenner1994-08-071-1/+14
| | | | | | | reg_changes_size. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@7866 138bc75d-0d04-0410-961f-82ee72b054a4
* (find_reg): Store divide results in temporary variables.wilson1994-07-191-19/+27
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@7778 138bc75d-0d04-0410-961f-82ee72b054a4
* (global_alloc): Make a more accurate attempt to see if the frame pointer willkenner1994-06-291-8/+13
| | | | | | | | | be used. If it is, show HARD_FRAME_POINTER_REGNUM used if its not the same as FRAME_POINTER_REGNUM. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@7604 138bc75d-0d04-0410-961f-82ee72b054a4
* Cast pointer operands to bzero, bcopy, and bcmp to (char *).kenner1994-06-141-15/+17
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@7472 138bc75d-0d04-0410-961f-82ee72b054a4
* (find_reg): When looking for locally-allocated hard regs to reclaim,kenner1994-05-041-23/+32
| | | | | | | use REG_ALLOC_ORDER to find least used. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@7210 138bc75d-0d04-0410-961f-82ee72b054a4
* Add prototypes for static functions.kenner1994-04-211-14/+14
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@7118 138bc75d-0d04-0410-961f-82ee72b054a4
* Remove previous Berg change.kenner1994-04-081-2/+5
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@6998 138bc75d-0d04-0410-961f-82ee72b054a4
* (global_conflicts): Avoid #ifdef HARD_REG_SET.kenner1994-04-061-5/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@6975 138bc75d-0d04-0410-961f-82ee72b054a4
* (global_conflicts): Move decl of unused variable I into #if 0 block.kenner1994-03-251-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@6886 138bc75d-0d04-0410-961f-82ee72b054a4
* (allocno_compare): Give multi-word regs higher priority, as stated inkenner1994-02-271-5/+5
| | | | | | | the comments. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@6650 138bc75d-0d04-0410-961f-82ee72b054a4
* * global.c: (global_alloc): Make sure that it is always possible todje1993-09-241-1/+5
| | | | | | | eliminate FRAME_POINTER_REGNUM into HARD_FRAME_POINTER_REGNUM. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@5458 138bc75d-0d04-0410-961f-82ee72b054a4
* (find_reg): Add comment about nonlocal labels.kenner1993-01-191-1/+5
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@3284 138bc75d-0d04-0410-961f-82ee72b054a4
* entered into RCSmycroft1992-07-061-31/+40
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@1472 138bc75d-0d04-0410-961f-82ee72b054a4
* *** empty log message ***rms1992-06-221-3/+6
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@1231 138bc75d-0d04-0410-961f-82ee72b054a4
* *** empty log message ***rms1992-05-071-2/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@930 138bc75d-0d04-0410-961f-82ee72b054a4
* *** empty log message ***rms1992-03-221-0/+65
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@562 138bc75d-0d04-0410-961f-82ee72b054a4
* *** empty log message ***rms1992-03-141-3/+3
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@472 138bc75d-0d04-0410-961f-82ee72b054a4
* *** empty log message ***rms1992-02-171-0/+3
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@336 138bc75d-0d04-0410-961f-82ee72b054a4
* *** empty log message ***rms1992-01-201-4/+22
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223 138bc75d-0d04-0410-961f-82ee72b054a4
* *** empty log message ***rms1992-01-171-5/+21
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204 138bc75d-0d04-0410-961f-82ee72b054a4
* *** empty log message ***rms1991-12-311-27/+99
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151 138bc75d-0d04-0410-961f-82ee72b054a4
* Initial revisionkenner1991-12-141-0/+1470
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@117 138bc75d-0d04-0410-961f-82ee72b054a4