From 3d30f4e815a41fdf2d4a9bf37223281f5f8a06dc Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Tue, 26 Aug 2014 17:45:50 +0000 Subject: [PATCH] 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 (TODO): Remove SET_VINSN_INSN_RTX. From-SVN: r214529 --- ChangeLog | 4 ++++ gcc/ChangeLog | 13 +++++++++++++ gcc/sel-sched-ir.c | 12 +----------- gcc/sel-sched-ir.h | 5 ++--- rtx-classes-status.txt | 1 - 5 files changed, 20 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index 337c3a52d35..4c3e1f14804 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2014-08-26 David Malcolm + + * rtx-classes-status.txt (TODO): Remove SET_VINSN_INSN_RTX. + 2014-08-26 David Malcolm * rtx-classes-status.txt (TODO): Remove SET_BND_TO. diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d315fac52de..02220a122fd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,16 @@ +2014-08-26 David Malcolm + + * 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. + 2014-08-26 David Malcolm * sel-sched-ir.h (insn_t): Strengthen from rtx to rtx_insn *. diff --git a/gcc/sel-sched-ir.c b/gcc/sel-sched-ir.c index 8d699160843..3cc51cb7346 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; @@ -6449,14 +6449,4 @@ sel_remove_loop_preheader (void) preheader_blocks); } -rtx_insn *VINSN_INSN_RTX (vinsn_t vi) -{ - return safe_as_a (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 118e001a56f..9f1fb6b5263 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 e44e115aaa8..3d59a8cfc78 100644 --- a/rtx-classes-status.txt +++ b/rtx-classes-status.txt @@ -18,4 +18,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 -- 2.30.2