+2017-09-18 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/82145
+ * config/i386/i386.c (ix86_init_large_pic_reg): Revert 2017-09-01
+ changes. Turn CODE_LABEL into NOTE_INSN_DELETED_LABEL immediately.
+ (ix86_init_pic_reg): Revert 2017-09-01 changes.
+
2017-09-18 Eric Botcazou <ebotcazou@adacore.com>
PR target/81361
/* Initialize large model PIC register. */
-static rtx_code_label *
+static void
ix86_init_large_pic_reg (unsigned int tmp_regno)
{
rtx_code_label *label;
emit_insn (gen_set_got_offset_rex64 (tmp_reg, label));
emit_insn (ix86_gen_add3 (pic_offset_table_rtx,
pic_offset_table_rtx, tmp_reg));
- return label;
+ const char *name = LABEL_NAME (label);
+ PUT_CODE (label, NOTE);
+ NOTE_KIND (label) = NOTE_INSN_DELETED_LABEL;
+ NOTE_DELETED_LABEL_NAME (label) = name;
}
/* Create and initialize PIC register if required. */
{
edge entry_edge;
rtx_insn *seq;
- rtx_code_label *label = NULL;
if (!ix86_use_pseudo_pic_reg ())
return;
if (TARGET_64BIT)
{
if (ix86_cmodel == CM_LARGE_PIC)
- label = ix86_init_large_pic_reg (R11_REG);
+ ix86_init_large_pic_reg (R11_REG);
else
emit_insn (gen_set_got_rex64 (pic_offset_table_rtx));
}
entry_edge = single_succ_edge (ENTRY_BLOCK_PTR_FOR_FN (cfun));
insert_insn_on_edge (seq, entry_edge);
commit_one_edge_insertion (entry_edge);
-
- if (label)
- {
- basic_block bb = BLOCK_FOR_INSN (label);
- rtx_insn *bb_note = PREV_INSN (label);
- /* If the note preceding the label starts a basic block, and the
- label is a member of the same basic block, interchange the two. */
- if (bb_note != NULL_RTX
- && NOTE_INSN_BASIC_BLOCK_P (bb_note)
- && bb != NULL
- && bb == BLOCK_FOR_INSN (bb_note))
- {
- reorder_insns_nobb (bb_note, bb_note, label);
- BB_HEAD (bb) = label;
- }
- }
}
/* Initialize a variable CUM of type CUMULATIVE_ARGS