aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2014-08-19 15:42:24 +0000
committerDavid Malcolm <dmalcolm@gcc.gnu.org>2014-08-19 15:42:24 +0000
commit689756831c96b68797acd8ad7a2d701d0ecc1932 (patch)
tree6db3825b89976c2ce41fe18e2fd5d99301bd5601 /gcc
parentd914bc6b3af67052b8f2357920e68b99091ecf91 (diff)
downloadgcc-689756831c96b68797acd8ad7a2d701d0ecc1932.zip
gcc-689756831c96b68797acd8ad7a2d701d0ecc1932.tar.gz
gcc-689756831c96b68797acd8ad7a2d701d0ecc1932.tar.bz2
VINSN_INSN_RTX scaffolding
gcc/ 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> * rtx-classes-status.txt (TODO): Add SET_VINSN_INSN_RTX. From-SVN: r214165
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog14
-rw-r--r--gcc/sel-sched-ir.c13
-rw-r--r--gcc/sel-sched-ir.h3
3 files changed, 28 insertions, 2 deletions
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))