2003-01-31 Naveen Sharma * gcc/stack_reorg.c: New file. * gcc/Makefile.in: Add new object file (stack_reorg.o). GTFILES: Likewise. * gcc/alias.c (memrefs_conflict_p): Return zero if two distinct stack slots are being checked for aliasing. * gcc/flags.h (flag_stack_reorg): Declare. (flag_new_regalloc): Add Declaration. * gcc/flow.c (calculate_global_regs_live): Mark all stack pseudos live at end of basic blocks. * gcc/function.c: Include target.h (stack_pseudo_generated): Declare and initialize. (assign_stack_local_1): Return a (mem:mode reg/f/c) rtx for a requested stack slot. (assign_stack_temp_for_type): Update cfun->x_initial_slot_list for correct debugging information. (find_initial_stack_offset): New Function. (put_reg_into_stack): Return if reg is already a stack pseudo. (fix_lexical_address): Handle the case when variable address in parent function is a stack pseudo. (prepare_function_start): Initialize cfun->x_initial_slot_list. * gcc/function.h (slot_node_def): New structure for a stack slot. (struct function): Add new member x_initial_slot_list. (find_initial_stack_offset): Declare. * gcc/global.c (global_alloc): Do not try to allocate stack pseudos as they are to be handled after register allocation. * gcc/local_alloc.c (local_alloc): Likewise. * gcc/reload.c (refers_to_regno_for_reload_p): Return if register is a stack pseudo. (reg_overlap_mentioned_for_reload_p): Likewise. * gcc/reload1.c: Include target.h (num_eliminable_invariants) : Make non static. (reload): Initialize max_pre_reload_pseudo. Call the stack reorganization phase after pseudo registers have been assigned stack slots. (alter_reg): Return if "i" already corresponds to stack pseudo. * gcc/rtl.h (rtx_def): Update comment that call flag for a REG would mean that it is a stack pseudo. (STACK_SLOT_P): New Macro. (int stack_reorg_completed): New extern variable. (stack_reorg): Declare. * gcc/stmt.c (expand_goto): Handle the case when non-local label is a stack pseudo. * gcc/target-def.h (TARGET_REORGANIZE_STACK_P): New Macro. (TARGET_INITIALIZER): Add new member TARGET_REORGANIZE_STACK_P. * gcc/target.h (struct gcc_target): Add reorganize_stack_p as new member. * gcc/toplev.c (flag_stack_reorg): New compiler option for initial testing. (rest_of_compilation): Reset stack_reorg_completed before finishing exiting. * gcc/config/sh/sh.c (TARGET_REORGANIZE_STACK_P): Define. (sh_reorganize_stack_p): New Function to enable stack reorganization. * gcc/doc/rtl.texi: Document use of /c flag of rtx. * gcc/doc/invoke.texi: Document -fstack-reorg option. * gcc/doc/tm.texi: Document use of TARGET_REORGANIZE_STACK_P macro.