+2012-10-20 Joern Rennecke <joern.rennecke@embecosm.com>
+ Richard Sandiford <rdsandiford@googlemail.com>
+
+ * emit-rtl.c (copy_delay_slot_insn): New function.
+ * emit-rtl.h (copy_delay_slot_insn): Declare.
+ * reorg.c: Include "emit-rtl.h".
+ (steal_delay_list_from_target): Use copy_delay_slot_insn.
+ (fill_slots_from_thread, fill_simple_delay_slots): Likewise.
+
2012-10-19 Jan Hubicka <jh@suse.cz>
* builtins.def (BUILT_IN_UNREACHABLE): Make ATTR_CONST_NORETURN_NOTHROW_LEAF_LIST.
/* Emit RTL for the GCC expander.
- Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
- 2010, 2011
- Free Software Foundation, Inc.
+ Copyright (C) 1987, 1988, 1992-2012 Free Software Foundation, Inc.
This file is part of GCC.
return copy_insn_1 (insn);
}
+/* Return a copy of INSN that can be used in a SEQUENCE delay slot,
+ on that assumption that INSN itself remains in its original place. */
+
+rtx
+copy_delay_slot_insn (rtx insn)
+{
+ /* Copy INSN with its rtx_code, all its notes, location etc. */
+ insn = copy_rtx (insn);
+ INSN_UID (insn) = cur_insn_uid++;
+ return insn;
+}
+
/* Initialize data structures and variables in this file
before generating rtl for each function. */
/* Exported functions from emit-rtl.c
- Copyright (C) 2004, 2007, 2008, 2010 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2007, 2008, 2010, 2012 Free Software Foundation, Inc.
This file is part of GCC.
extern rtvec gen_rtvec (int, ...);
extern rtx copy_insn_1 (rtx);
extern rtx copy_insn (rtx);
+extern rtx copy_delay_slot_insn (rtx);
extern rtx gen_int_mode (HOST_WIDE_INT, enum machine_mode);
extern rtx emit_copy_of_insn_after (rtx, rtx);
extern void set_reg_attrs_from_value (rtx, rtx);
/* Perform instruction reorganizations for delay slot filling.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+ 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012
Free Software Foundation, Inc.
Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu).
Hacked by Michael Tiemann (tiemann@cygnus.com).
#include "params.h"
#include "target.h"
#include "tree-pass.h"
+#include "emit-rtl.h"
#ifdef DELAY_SLOTS
{
if (must_annul)
used_annul = 1;
- temp = copy_rtx (trial);
+ temp = copy_delay_slot_insn (trial);
INSN_FROM_TARGET_P (temp) = 1;
new_delay_list = add_to_delay_list (temp, new_delay_list);
total_slots_filled++;
if (new_label)
{
delay_list
- = add_to_delay_list (copy_rtx (next_trial), delay_list);
+ = add_to_delay_list (copy_delay_slot_insn (next_trial),
+ delay_list);
slots_filled++;
reorg_redirect_jump (trial, new_label);
else
new_thread = next_active_insn (trial);
- temp = own_thread ? trial : copy_rtx (trial);
+ temp = own_thread ? trial : copy_delay_slot_insn (trial);
if (thread_if_true)
INSN_FROM_TARGET_P (temp) = 1;
else
new_thread = next_active_insn (trial);
- ninsn = own_thread ? trial : copy_rtx (trial);
+ ninsn = own_thread ? trial : copy_delay_slot_insn (trial);
if (thread_if_true)
INSN_FROM_TARGET_P (ninsn) = 1;