aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorCaroline Tice <ctice@apple.com>2005-04-12 22:38:06 +0000
committerCaroline Tice <ctice@gcc.gnu.org>2005-04-12 15:38:06 -0700
commitb3b51ded80e74bced9ece3be87ff3bfc05bc7b70 (patch)
tree56cdf484a252e0eedc8fc6a0c0c10394585edb68 /gcc
parent997de8ed6b50b6e24573e6bf562f2845b1660088 (diff)
downloadgcc-b3b51ded80e74bced9ece3be87ff3bfc05bc7b70.zip
gcc-b3b51ded80e74bced9ece3be87ff3bfc05bc7b70.tar.gz
gcc-b3b51ded80e74bced9ece3be87ff3bfc05bc7b70.tar.bz2
Temporary fix for partitioning problems; real fix coming soon.
From-SVN: r98051
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog10
-rw-r--r--gcc/passes.c3
-rw-r--r--gcc/varasm.c20
3 files changed, 23 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5febe1d..bbc317e 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,13 @@
+2005-04-12 Caroline Tice <ctice@apple.com>
+
+ Temporary fix for partitioning problems.
+ * passes.c (rest_of_handle_final): Remove code that
+ frees unlikely_text_section_name,
+ * varasm.c (assemble_start_function): Test for partitioning
+ flag before writing out section labels.
+ (assemble_end_function): Test for partitioning flag before
+ writing out section labels.
+
2005-04-12 Steven Bosscher <stevenb@suse.de>
Stuart Hastings <stuart@apple.com>
Jan Hubicka <jh@suse.cz>
diff --git a/gcc/passes.c b/gcc/passes.c
index 8ae8b31..c2cbefb 100644
--- a/gcc/passes.c
+++ b/gcc/passes.c
@@ -328,8 +328,7 @@ rest_of_handle_final (void)
timevar_push (TV_SYMOUT);
(*debug_hooks->function_decl) (current_function_decl);
- if (unlikely_text_section_name)
- free (unlikely_text_section_name);
+
timevar_pop (TV_SYMOUT);
ggc_collect ();
diff --git a/gcc/varasm.c b/gcc/varasm.c
index b8c9826..16f6d3b 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -1303,7 +1303,8 @@ assemble_start_function (tree decl, const char *fnname)
/* Switch to the correct text section for the start of the function. */
function_section (decl);
- if (!hot_label_written)
+ 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. */
@@ -1377,13 +1378,16 @@ assemble_end_function (tree decl, const char *fnname)
}
/* Output labels for end of hot/cold text sections (to be used by
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 ();
+ if (flag_reorder_blocks_and_partition)
+ {
+ 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 ();
+ }
}
/* Assemble code to leave SIZE bytes of zeros. */