Commit fcc74520 by Richard Sandiford Committed by Richard Sandiford

rtl.def (VAR_LOCATION): Remove "i" field.

gcc/
	* rtl.def (VAR_LOCATION): Remove "i" field.
	* rtl.h (rtx_def): Add u2.var_location_status.
	(PAT_VAR_LOCATION_STATUS): Use it.
	(gen_rtx_VAR_LOCATION): Declare.
	* gengenrtl.c (excluded_rtx): Add VAR_LOCATION.
	* emit-rtl.c (gen_rtx_VAR_LOCATION): New function.
	* var-tracking.c (emit_note_insn_var_location): Remove casts.

From-SVN: r210362
parent feb09dd9
2014-05-13 Richard Sandiford <rdsandiford@googlemail.com> 2014-05-13 Richard Sandiford <rdsandiford@googlemail.com>
* rtl.def (VAR_LOCATION): Remove "i" field.
* rtl.h (rtx_def): Add u2.var_location_status.
(PAT_VAR_LOCATION_STATUS): Use it.
(gen_rtx_VAR_LOCATION): Declare.
* gengenrtl.c (excluded_rtx): Add VAR_LOCATION.
* emit-rtl.c (gen_rtx_VAR_LOCATION): New function.
* var-tracking.c (emit_note_insn_var_location): Remove casts.
2014-05-13 Richard Sandiford <rdsandiford@googlemail.com>
* rtl.def (scratch): Fix outdated comment and remove "0" field. * rtl.def (scratch): Fix outdated comment and remove "0" field.
* gengtype.c (adjust_field_rtx_def): Update accordingly. * gengtype.c (adjust_field_rtx_def): Update accordingly.
......
...@@ -859,6 +859,15 @@ gen_lowpart_SUBREG (enum machine_mode mode, rtx reg) ...@@ -859,6 +859,15 @@ gen_lowpart_SUBREG (enum machine_mode mode, rtx reg)
return gen_rtx_SUBREG (mode, reg, return gen_rtx_SUBREG (mode, reg,
subreg_lowpart_offset (mode, inmode)); subreg_lowpart_offset (mode, inmode));
} }
rtx
gen_rtx_VAR_LOCATION (enum machine_mode mode, tree decl, rtx loc,
enum var_init_status status)
{
rtx x = gen_rtx_fmt_te (VAR_LOCATION, mode, decl, loc);
PAT_VAR_LOCATION_STATUS (x) = status;
return x;
}
/* Create an rtvec and stores within it the RTXen passed in the arguments. */ /* Create an rtvec and stores within it the RTXen passed in the arguments. */
......
...@@ -141,9 +141,10 @@ special_rtx (int idx) ...@@ -141,9 +141,10 @@ special_rtx (int idx)
static int static int
excluded_rtx (int idx) excluded_rtx (int idx)
{ {
return ((strcmp (defs[idx].enumname, "CONST_DOUBLE") == 0) return (strcmp (defs[idx].enumname, "VAR_LOCATION") == 0
|| (strcmp (defs[idx].enumname, "CONST_WIDE_INT") == 0) || strcmp (defs[idx].enumname, "CONST_DOUBLE") == 0
|| (strcmp (defs[idx].enumname, "CONST_FIXED") == 0)); || strcmp (defs[idx].enumname, "CONST_WIDE_INT") == 0
|| strcmp (defs[idx].enumname, "CONST_FIXED") == 0);
} }
/* Place a list of all format specifiers we use into the array FORMAT. */ /* Place a list of all format specifiers we use into the array FORMAT. */
......
...@@ -747,9 +747,7 @@ DEF_RTL_EXPR(US_TRUNCATE, "us_truncate", "e", RTX_UNARY) ...@@ -747,9 +747,7 @@ DEF_RTL_EXPR(US_TRUNCATE, "us_truncate", "e", RTX_UNARY)
DEF_RTL_EXPR(FMA, "fma", "eee", RTX_TERNARY) DEF_RTL_EXPR(FMA, "fma", "eee", RTX_TERNARY)
/* Information about the variable and its location. */ /* Information about the variable and its location. */
/* Changed 'te' to 'tei'; the 'i' field is for recording DEF_RTL_EXPR(VAR_LOCATION, "var_location", "te", RTX_EXTRA)
initialization status of variables. */
DEF_RTL_EXPR(VAR_LOCATION, "var_location", "tei", RTX_EXTRA)
/* Used in VAR_LOCATION for a pointer to a decl that is no longer /* Used in VAR_LOCATION for a pointer to a decl that is no longer
addressable. */ addressable. */
......
...@@ -362,6 +362,9 @@ struct GTY((chain_next ("RTX_NEXT (&%h)"), ...@@ -362,6 +362,9 @@ struct GTY((chain_next ("RTX_NEXT (&%h)"),
/* The INSN_UID of an RTX_INSN-class code. */ /* The INSN_UID of an RTX_INSN-class code. */
int insn_uid; int insn_uid;
/* The PAT_VAR_LOCATION_STATUS of a VAR_LOCATION. */
enum var_init_status var_location_status;
/* In a CONST_WIDE_INT (aka hwivec_def), this is the number of /* In a CONST_WIDE_INT (aka hwivec_def), this is the number of
HOST_WIDE_INTs in the hwivec_def. */ HOST_WIDE_INTs in the hwivec_def. */
unsigned int num_elem; unsigned int num_elem;
...@@ -1055,7 +1058,8 @@ extern const char * const reg_note_name[]; ...@@ -1055,7 +1058,8 @@ extern const char * const reg_note_name[];
can be unknown, uninitialized or initialized. See enumeration can be unknown, uninitialized or initialized. See enumeration
type below. */ type below. */
#define PAT_VAR_LOCATION_STATUS(PAT) \ #define PAT_VAR_LOCATION_STATUS(PAT) \
((enum var_init_status) (XCINT ((PAT), 2, VAR_LOCATION))) (RTL_FLAG_CHECK1 ("PAT_VAR_LOCATION_STATUS", PAT, VAR_LOCATION) \
->u2.var_location_status)
/* Accessors for a NOTE_INSN_VAR_LOCATION. */ /* Accessors for a NOTE_INSN_VAR_LOCATION. */
#define NOTE_VAR_LOCATION_DECL(NOTE) \ #define NOTE_VAR_LOCATION_DECL(NOTE) \
...@@ -2561,6 +2565,8 @@ extern rtx gen_raw_REG (enum machine_mode, int); ...@@ -2561,6 +2565,8 @@ extern rtx gen_raw_REG (enum machine_mode, int);
extern rtx gen_rtx_REG (enum machine_mode, unsigned); extern rtx gen_rtx_REG (enum machine_mode, unsigned);
extern rtx gen_rtx_SUBREG (enum machine_mode, rtx, int); extern rtx gen_rtx_SUBREG (enum machine_mode, rtx, int);
extern rtx gen_rtx_MEM (enum machine_mode, rtx); extern rtx gen_rtx_MEM (enum machine_mode, rtx);
extern rtx gen_rtx_VAR_LOCATION (enum machine_mode, tree, rtx,
enum var_init_status);
#define GEN_INT(N) gen_rtx_CONST_INT (VOIDmode, (N)) #define GEN_INT(N) gen_rtx_CONST_INT (VOIDmode, (N))
......
...@@ -8748,8 +8748,7 @@ emit_note_insn_var_location (variable_def **varp, emit_note_data *data) ...@@ -8748,8 +8748,7 @@ emit_note_insn_var_location (variable_def **varp, emit_note_data *data)
note_vl = NULL_RTX; note_vl = NULL_RTX;
if (!complete) if (!complete)
note_vl = gen_rtx_VAR_LOCATION (VOIDmode, decl, NULL_RTX, note_vl = gen_rtx_VAR_LOCATION (VOIDmode, decl, NULL_RTX, initialized);
(int) initialized);
else if (n_var_parts == 1) else if (n_var_parts == 1)
{ {
rtx expr_list; rtx expr_list;
...@@ -8759,8 +8758,7 @@ emit_note_insn_var_location (variable_def **varp, emit_note_data *data) ...@@ -8759,8 +8758,7 @@ emit_note_insn_var_location (variable_def **varp, emit_note_data *data)
else else
expr_list = loc[0]; expr_list = loc[0];
note_vl = gen_rtx_VAR_LOCATION (VOIDmode, decl, expr_list, note_vl = gen_rtx_VAR_LOCATION (VOIDmode, decl, expr_list, initialized);
(int) initialized);
} }
else if (n_var_parts) else if (n_var_parts)
{ {
...@@ -8773,7 +8771,7 @@ emit_note_insn_var_location (variable_def **varp, emit_note_data *data) ...@@ -8773,7 +8771,7 @@ emit_note_insn_var_location (variable_def **varp, emit_note_data *data)
parallel = gen_rtx_PARALLEL (VOIDmode, parallel = gen_rtx_PARALLEL (VOIDmode,
gen_rtvec_v (n_var_parts, loc)); gen_rtvec_v (n_var_parts, loc));
note_vl = gen_rtx_VAR_LOCATION (VOIDmode, decl, note_vl = gen_rtx_VAR_LOCATION (VOIDmode, decl,
parallel, (int) initialized); parallel, initialized);
} }
if (where != EMIT_NOTE_BEFORE_INSN) if (where != EMIT_NOTE_BEFORE_INSN)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment