diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | gcc/ChangeLog | 14 | ||||
-rw-r--r-- | gcc/sel-sched-ir.c | 13 | ||||
-rw-r--r-- | gcc/sel-sched-ir.h | 3 | ||||
-rw-r--r-- | rtx-classes-status.txt | 1 |
5 files changed, 33 insertions, 2 deletions
@@ -1,5 +1,9 @@ 2014-08-19 David Malcolm <dmalcolm@redhat.com> + * rtx-classes-status.txt (TODO): Add SET_VINSN_INSN_RTX. + +2014-08-19 David Malcolm <dmalcolm@redhat.com> + * rtx-classes-status.txt (TODO): Add SET_DEP_PRO, SET_DEP_CON. 2014-08-19 David Malcolm <dmalcolm@redhat.com> diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 14b9a38..5644066 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,19 @@ 2014-08-19 David Malcolm <dmalcolm@redhat.com> + * sel-sched-ir.h (VINSN_INSN_RTX): struct vinsn_def's "insn_rtx" + field will eventually be an rtx_insn *. To help with transition, + for now, convert from an access macro into a pair of functions: + VINSN_INSN_RTX, returning an rtx_insn *, and... + (SET_VINSN_INSN_RTX): New function, for use where VINSN_INSN_RTX + is used as an lvalue. + + * sel-sched-ir.c (vinsn_init): Replace VINSN_INSN_RTX with + SET_VINSN_INSN_RTX where it's used as an lvalue. + (VINSN_INSN_RTX): New function. + (SET_VINSN_INSN_RTX): New function. + +2014-08-19 David Malcolm <dmalcolm@redhat.com> + * sched-int.h (DEP_PRO): struct _dep's "pro" and "con" fields will eventually be rtx_insn *, but to help with transition, for now, convert from an access macro into a pair of functions: DEP_PRO diff --git a/gcc/sel-sched-ir.c b/gcc/sel-sched-ir.c index 0624520..f5e0d55 100644 --- a/gcc/sel-sched-ir.c +++ b/gcc/sel-sched-ir.c @@ -1179,7 +1179,7 @@ vinsn_init (vinsn_t vi, insn_t insn, bool force_unique_p) hash_rtx_callback_function hrcf; int insn_class; - VINSN_INSN_RTX (vi) = insn; + SET_VINSN_INSN_RTX (vi) = insn; VINSN_COUNT (vi) = 0; vi->cost = -1; @@ -6441,4 +6441,15 @@ sel_remove_loop_preheader (void) SET_LOOP_PREHEADER_BLOCKS (loop_outer (current_loop_nest), preheader_blocks); } + +rtx_insn *VINSN_INSN_RTX (vinsn_t vi) +{ + return safe_as_a <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 f63d571..7aef287 100644 --- a/gcc/sel-sched-ir.h +++ b/gcc/sel-sched-ir.h @@ -645,7 +645,8 @@ struct vinsn_def bool may_trap_p; }; -#define VINSN_INSN_RTX(VI) ((VI)->insn_rtx) +extern rtx_insn *VINSN_INSN_RTX (vinsn_t); +extern rtx& SET_VINSN_INSN_RTX (vinsn_t); #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 b93ee59..f4bb9a0 100644 --- a/rtx-classes-status.txt +++ b/rtx-classes-status.txt @@ -18,3 +18,4 @@ TODO: "Scaffolding" to be removed * SET_BB_HEAD, SET_BB_END, SET_BB_HEADER, SET_BB_FOOTER * SET_DEP_PRO, SET_DEP_CON * SET_NEXT_INSN, SET_PREV_INSN +* SET_VINSN_INSN_RTX |