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: AIX bootstrap failure (was Re: Hot/cold partitioning fixes)



On Apr 1, 2005, at 8:43 AM, David Edelsohn wrote:


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.



I apologize for this. I was under the impression, from some of the messages I had
received before, that emitting extra labels would not ever be a problem, so it
seemed simplest to me not to put the checks in.


	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.


I was unaware that this was not portable. If you could explain exactly what the
problem is and/or suggest a better way to do this, I will fix this problem. Again, I
apologize for this problem.


-- Caroline Tice
ctice@apple.com

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 ();
}




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