From 8020a4d5c58aed7abfe15c681e62f133f87e788e Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Tue, 19 Aug 2014 15:18:42 +0000 Subject: Convert DF_REF_INSN to a function for now gcc/ 2014-08-19 David Malcolm * df-core.c (DF_REF_INSN): New, using a checked cast for now. * df.h (DF_REF_INSN): Convert from a macro to a function, so that we can return an rtx_insn *. / 2014-08-19 David Malcolm * rtx-classes-status.txt (TODO): Add DF_REF_INSN. From-SVN: r214160 --- gcc/ChangeLog | 6 ++++++ gcc/df-core.c | 6 ++++++ gcc/df.h | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a4d6c72..bdc40fe 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2014-08-19 David Malcolm + + * df-core.c (DF_REF_INSN): New, using a checked cast for now. + * df.h (DF_REF_INSN): Convert from a macro to a function, so + that we can return an rtx_insn *. + 2014-08-19 Yaakov Selkowitz * config/i386/cygwin.h (LINK_SPEC): Pass --tsaware flag only diff --git a/gcc/df-core.c b/gcc/df-core.c index ae0d233..5d32fa3 100644 --- a/gcc/df-core.c +++ b/gcc/df-core.c @@ -2502,3 +2502,9 @@ debug_df_chain (struct df_link *link) df_chain_dump (link, stderr); fputc ('\n', stderr); } + +rtx_insn *DF_REF_INSN (df_ref ref) +{ + rtx insn = ref->base.insn_info->insn; + return safe_as_a (insn); +} diff --git a/gcc/df.h b/gcc/df.h index ca0f228..9f54023 100644 --- a/gcc/df.h +++ b/gcc/df.h @@ -649,7 +649,7 @@ struct df_d : BLOCK_FOR_INSN (DF_REF_INSN (REF))) #define DF_REF_BBNO(REF) (DF_REF_BB (REF)->index) #define DF_REF_INSN_INFO(REF) ((REF)->base.insn_info) -#define DF_REF_INSN(REF) ((REF)->base.insn_info->insn) +extern rtx_insn *DF_REF_INSN (df_ref ref); #define DF_REF_INSN_UID(REF) (INSN_UID (DF_REF_INSN(REF))) #define DF_REF_CLASS(REF) ((REF)->base.cl) #define DF_REF_TYPE(REF) ((REF)->base.type) -- cgit v1.1