This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: AIX bootstrap failure (was Re: Hot/cold partitioning fixes)
- From: David Edelsohn <dje at watson dot ibm dot com>
- To: Caroline Tice <ctice at apple dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 01 Apr 2005 11:43:51 -0500
- Subject: Re: AIX bootstrap failure (was Re: Hot/cold partitioning fixes)
- References: <e73c24f7140876dd92a5ed1d6c8733dd@apple.com> <200504011355.j31DtLD25496@makai.watson.ibm.com>
The hot/cold partitioning patch is emitting hot and cold section
labels unconditionally, regardless whether reorder_blocks_and_partition is
enabled. The appended patch addresses that problem. I am attempting
another bootstrap now.
Also, the implementation assumes that it can manipulate section
names by appending strings, which is fundamentally not portable. This
functionality was not implemented portably for inclusion in GCC.
David
* varasm.c (assemble_start_function): Only emit hot_section_label
if reorder_blocks_and_partition is enabled.
(assemble_end_function): Only emit cold_section_end_label and
hot_section_end_label if reorder_blocks_and_partition is enabled.
Index: varasm.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/varasm.c,v
retrieving revision 1.492
diff -c -p -r1.492 varasm.c
*** varasm.c 1 Apr 2005 03:42:45 -0000 1.492
--- varasm.c 1 Apr 2005 16:37:59 -0000
*************** assemble_start_function (tree decl, cons
*** 1303,1309 ****
/* Switch to the correct text section for the start of the function. */
function_section (decl);
! if (!hot_label_written)
ASM_OUTPUT_LABEL (asm_out_file, hot_section_label);
/* Tell assembler to move to target machine's alignment for functions. */
--- 1303,1309 ----
/* Switch to the correct text section for the start of the function. */
function_section (decl);
! if (flag_reorder_blocks_and_partition && !hot_label_written)
ASM_OUTPUT_LABEL (asm_out_file, hot_section_label);
/* Tell assembler to move to target machine's alignment for functions. */
*************** assemble_end_function (tree decl, const
*** 1379,1387 ****
debug info.) */
save_text_section = in_section;
unlikely_text_section ();
! ASM_OUTPUT_LABEL (asm_out_file, cold_section_end_label);
text_section ();
! ASM_OUTPUT_LABEL (asm_out_file, hot_section_end_label);
if (save_text_section == in_unlikely_executed_text)
unlikely_text_section ();
}
--- 1379,1389 ----
debug info.) */
save_text_section = in_section;
unlikely_text_section ();
! if (flag_reorder_blocks_and_partition)
! ASM_OUTPUT_LABEL (asm_out_file, cold_section_end_label);
text_section ();
! if (flag_reorder_blocks_and_partition)
! ASM_OUTPUT_LABEL (asm_out_file, hot_section_end_label);
if (save_text_section == in_unlikely_executed_text)
unlikely_text_section ();
}