aboutsummaryrefslogtreecommitdiff
path: root/gcc/final.c
diff options
context:
space:
mode:
authorCaroline Tice <cmtice@google.com>2015-04-27 09:44:35 -0700
committerCaroline Tice <ctice@gcc.gnu.org>2015-04-27 09:44:35 -0700
commit16d710b164529c81929bcb8bb55eea1b758b070e (patch)
treedf19ff6f9889f28dc41876292756363a07ed31ca /gcc/final.c
parent0a48088a0b7339e8f1d000aee282cfb7e394938d (diff)
downloadgcc-16d710b164529c81929bcb8bb55eea1b758b070e.zip
gcc-16d710b164529c81929bcb8bb55eea1b758b070e.tar.gz
gcc-16d710b164529c81929bcb8bb55eea1b758b070e.tar.bz2
Give proper type and size to named cold partitions.
2015-04-27 Caroline Tice <cmtice@google.com> * final.c (final_scan_insn): Output cold_function_nmae as function type. * varasm.c (cold_function_name): Make gloval. (assemble_start_function): Re-set cold_function_name. (assemble_end_function): Output cold partition size. * varasm.h (cold_fun ction_name): Declare global. 2015-04-27 Caroline Tice <cmtice@google.com> * gcc.dg/tree-prof/cold_partition_label.c (main): Check for cold partition size. From-SVN: r222473
Diffstat (limited to 'gcc/final.c')
-rw-r--r--gcc/final.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/final.c b/gcc/final.c
index 231cfe5..968e525 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -2233,10 +2233,16 @@ final_scan_insn (rtx_insn *insn, FILE *file, int optimize_p ATTRIBUTE_UNUSED,
suffixing "cold" to the original function's name. */
if (in_cold_section_p)
{
- tree cold_function_name
+ cold_function_name
= clone_function_name (current_function_decl, "cold");
+#ifdef ASM_DECLARE_FUNCTION_NAME
+ ASM_DECLARE_FUNCTION_NAME (asm_out_file,
+ IDENTIFIER_POINTER (cold_function_name),
+ current_function_decl);
+#else
ASM_OUTPUT_LABEL (asm_out_file,
IDENTIFIER_POINTER (cold_function_name));
+#endif
}
break;