Ejemplo n.º 1
0
rtx
rtx_alloc_stat_v (RTX_CODE code MEM_STAT_DECL, int extra)
{
  rtx rt = ggc_alloc_rtx_def_stat (RTX_CODE_SIZE (code) + extra
				   PASS_MEM_STAT);

  /* We want to clear everything up to the FLD array.  Normally, this
     is one int, but we don't want to assume that and it isn't very
     portable anyway; this is.  */

  memset (rt, 0, RTX_HDR_SIZE);
  PUT_CODE (rt, code);

  if (GATHER_STATISTICS)
    {
      rtx_alloc_counts[code]++;
      rtx_alloc_sizes[code] += RTX_CODE_SIZE (code);
    }

  return rt;
}
Ejemplo n.º 2
0
rtx
rtx_alloc_stat (RTX_CODE code MEM_STAT_DECL)
{
  rtx rt;

  rt = (rtx) ggc_alloc_zone_pass_stat (RTX_CODE_SIZE (code), &rtl_zone);

  /* We want to clear everything up to the FLD array.  Normally, this
     is one int, but we don't want to assume that and it isn't very
     portable anyway; this is.  */

  memset (rt, 0, RTX_HDR_SIZE);
  PUT_CODE (rt, code);

#ifdef GATHER_STATISTICS
  rtx_alloc_counts[code]++;
  rtx_alloc_sizes[code] += RTX_CODE_SIZE (code);
#endif

  return rt;
}
Ejemplo n.º 3
0
unsigned int
rtx_size (const_rtx x)
{
  if (CONST_WIDE_INT_P (x))
    return (RTX_HDR_SIZE
	    + sizeof (struct hwivec_def)
	    + ((CONST_WIDE_INT_NUNITS (x) - 1)
	       * sizeof (HOST_WIDE_INT)));
  if (CONST_POLY_INT_P (x))
    return (RTX_HDR_SIZE
	    + sizeof (struct const_poly_int_def)
	    + CONST_POLY_INT_COEFFS (x).extra_size ());
  if (GET_CODE (x) == SYMBOL_REF && SYMBOL_REF_HAS_BLOCK_INFO_P (x))
    return RTX_HDR_SIZE + sizeof (struct block_symbol);
  return RTX_CODE_SIZE (GET_CODE (x));
}