This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: Preserving order of functions and top-level asms via cgraph



On 2005-04-11, at 14:43, Giovanni Bajo wrote:


Marcin Dalecki <martin@dalecki.de> wrote:

On i386 you will find:

# Disable unit-at-a-time mode, it makes gcc use a lot more stack
# due to the lack of sharing of stacklots.
CFLAGS += $(call cc-option,-fno-unit-at-a-time)

This is no longer true in 4.0, because of this patch:


2004-09-03 Richard Henderson <rth@redhat.com>

PR middle-end/9997
* cfgexpand.c (LOCAL_ALIGNMENT): Provide default.
(STACK_ALIGNMENT_NEEDED, FRAME_GROWS_DOWNWARD): Likewise.
(struct stack_var, EOC, stack_vars, stack_vars_alloc,
stack_vars_num,
stack_vars_sorted, stack_vars_conflict, stack_vars_conflict_alloc,
frame_phase, get_decl_align_unit, add_stack_var, triangular_index,
resize_stack_vars_conflict, add_stack_var_conflict,
stack_var_conflict_p, add_alias_set_conflicts, stack_var_size_cmp,
union_stack_vars, partition_stack_vars, dump_stack_var_partition,
expand_one_stack_var_at, expand_stack_vars, expand_one_stack_var,
expand_one_static_var, expand_one_hard_reg_var,
expand_one_register_var, expand_one_error_var,
defer_stack_allocation,
expand_one_var, expand_used_vars_for_block, clear_tree_used): New.
(expand_used_vars): Rewrite.
* Makefile.in (cfgexpand.o): Update dependencies.


We now coalesce stack slots again and better than what GCC ever did.

OK thanks for confirming my suspicion that this was just an confused micro-optimization.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]