aboutsummaryrefslogtreecommitdiff
path: root/gcc/toplev.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r--gcc/toplev.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c
index ada79f9..058ccfa 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -3311,7 +3311,21 @@ rest_of_compilation (decl)
if (optimize > 0)
{
- TIMEVAR (combine_time, combine_instructions (insns, max_reg_num ()));
+ int rebuild_jump_labels_after_combine = 0;
+
+ TIMEVAR (combine_time,
+ {
+ rebuild_jump_labels_after_combine =
+ combine_instructions (insns, max_reg_num ());
+ });
+
+ /* Combining insns may have turned an indirect jump into a
+ direct jump. Rebuid the JUMP_LABEL fields of jumping
+ instructions. */
+ if (rebuild_jump_labels_after_combine)
+ {
+ TIMEVAR (jump_time, rebuild_jump_labels (insns));
+ }
/* Dump rtl code after insn combination. */