This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 174/236] Remove VINSN_INSN_RTX scaffolding


gcc/
	* sel-sched-ir.h (struct vinsn_def): Strengthen field "insn_rtx"
	from rtx to rtx_insn *.
        (VINSN_INSN_RTX): Eliminate rvalue function and...
	(SET_VINSN_INSN): ...lvalue function in favor of...
	(VINSN_INSN_RTX): reinstate this old macro.

	* sel-sched-ir.c (vinsn_init): Eliminate use of SET_VINSN_INSN_RTX
	in favor of VINSN_INSN_RTX.
	(VINSN_INSN_RTX): Delete this function.
	(SET_VINSN_INSN_RTX): Likewise.

/
	* rtx-classes-status.txt: Delete SET_VINSN_INSN_RTX.
---
 gcc/sel-sched-ir.c     | 12 +-----------
 gcc/sel-sched-ir.h     |  5 ++---
 rtx-classes-status.txt |  1 -
 3 files changed, 3 insertions(+), 15 deletions(-)

diff --git a/gcc/sel-sched-ir.c b/gcc/sel-sched-ir.c
index a15bfc0..a996cc8 100644
--- a/gcc/sel-sched-ir.c
+++ b/gcc/sel-sched-ir.c
@@ -1182,7 +1182,7 @@ vinsn_init (vinsn_t vi, insn_t insn, bool force_unique_p)
   hash_rtx_callback_function hrcf;
   int insn_class;
 
-  SET_VINSN_INSN_RTX (vi) = insn;
+  VINSN_INSN_RTX (vi) = insn;
   VINSN_COUNT (vi) = 0;
   vi->cost = -1;
 
@@ -6454,14 +6454,4 @@ sel_remove_loop_preheader (void)
 			       preheader_blocks);
 }
 
-rtx_insn *VINSN_INSN_RTX (vinsn_t vi)
-{
-  return as_a_nullable <rtx_insn *> (vi->insn_rtx);
-}
-
-rtx& SET_VINSN_INSN_RTX (vinsn_t vi)
-{
-  return vi->insn_rtx;
-}
-
 #endif
diff --git a/gcc/sel-sched-ir.h b/gcc/sel-sched-ir.h
index 118e001..9f1fb6b 100644
--- a/gcc/sel-sched-ir.h
+++ b/gcc/sel-sched-ir.h
@@ -655,7 +655,7 @@ struct idata_def
 struct vinsn_def
 {
   /* Associated insn.  */
-  rtx insn_rtx;
+  rtx_insn *insn_rtx;
 
   /* Its description.  */
   struct idata_def id;
@@ -677,8 +677,7 @@ struct vinsn_def
   bool may_trap_p;
 };
 
-extern rtx_insn *VINSN_INSN_RTX (vinsn_t);
-extern rtx& SET_VINSN_INSN_RTX (vinsn_t);
+#define VINSN_INSN_RTX(VI) ((VI)->insn_rtx)
 #define VINSN_PATTERN(VI) (PATTERN (VINSN_INSN_RTX (VI)))
 
 #define VINSN_ID(VI) (&((VI)->id))
diff --git a/rtx-classes-status.txt b/rtx-classes-status.txt
index 29d445f..347114b 100644
--- a/rtx-classes-status.txt
+++ b/rtx-classes-status.txt
@@ -14,4 +14,3 @@ TODO: "Scaffolding" to be removed
 * SET_BB_HEAD, SET_BB_END, SET_BB_HEADER
 * SET_DEP_PRO, SET_DEP_CON
 * SET_NEXT_INSN, SET_PREV_INSN
-* SET_VINSN_INSN_RTX
-- 
1.8.5.3


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]