diff options
author | Steven Bosscher <stevenb@suse.de> | 2005-07-27 21:02:55 +0000 |
---|---|---|
committer | Steven Bosscher <steven@gcc.gnu.org> | 2005-07-27 21:02:55 +0000 |
commit | e4598783b440d7623b27dd05994ec131d697ced0 (patch) | |
tree | ebc825fdd7e02c2724f1fcafb2040f14c3830571 /gcc/varasm.c | |
parent | e37912437faec1dfed41ccd139cbec09879bac11 (diff) | |
download | gcc-e4598783b440d7623b27dd05994ec131d697ced0.zip gcc-e4598783b440d7623b27dd05994ec131d697ced0.tar.gz gcc-e4598783b440d7623b27dd05994ec131d697ced0.tar.bz2 |
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
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r-- | gcc/varasm.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c index 3ef8146..88068b5 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -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 |