re PR c++/22003 (-freorder-blocks-and-partition and thunks)

PR c++/22003
	* varasm.c (assemble_start_function): Don't do anything that may
	require a CFG if the current function is a thunk.

From-SVN: r102444
This commit is contained in:
Steven Bosscher 2005-07-27 21:02:55 +00:00 committed by Steven Bosscher
parent e37912437f
commit e4598783b4
2 changed files with 16 additions and 5 deletions

View File

@ -1,3 +1,9 @@
2005-07-27 Steven Bosscher <stevenb@suse.de>
PR c++/22003
* varasm.c (assemble_start_function): Don't do anything that may
require a CFG if the current function is a thunk.
2005-07-25 Geoffrey Keating <geoffk@apple.com>
* doc/install.texi (Prerequisites): Mention that perl is needed

View File

@ -1274,11 +1274,13 @@ assemble_start_function (tree decl, const char *fnname)
unlikely_text_section ();
assemble_align (FUNCTION_BOUNDARY);
ASM_OUTPUT_LABEL (asm_out_file, cfun->cold_section_label);
if (BB_PARTITION (ENTRY_BLOCK_PTR->next_bb) == BB_COLD_PARTITION)
/* When the function starts with a cold section, we need to explicitly
align the hot section and write out the hot section label.
But if the current function is a thunk, we do not have a CFG. */
if (!current_function_is_thunk
&& BB_PARTITION (ENTRY_BLOCK_PTR->next_bb) == BB_COLD_PARTITION)
{
/* Since the function starts with a cold section, we need to
explicitly align the hot section and write out the hot
section label. */
text_section ();
assemble_align (FUNCTION_BOUNDARY);
ASM_OUTPUT_LABEL (asm_out_file, cfun->hot_section_label);
@ -1361,7 +1363,10 @@ assemble_start_function (tree decl, const char *fnname)
ASM_OUTPUT_LABEL (asm_out_file, fnname);
#endif /* ASM_DECLARE_FUNCTION_NAME */
insert_section_boundary_note ();
/* Add NOTE_INSN_SWITCH_TEXT_SECTIONS notes. Don't do this if the current
function is a thunk, because we don't have a CFG in that case. */
if (!current_function_is_thunk)
insert_section_boundary_note ();
}
/* Output assembler code associated with defining the size of the