Пример #1
0
Файл: rtl.c Проект: keparo/gcc
rtx
shallow_copy_rtx_stat (const_rtx orig MEM_STAT_DECL)
{
  const unsigned int size = rtx_size (orig);
  rtx const copy = ggc_alloc_zone_rtx_def_stat (&rtl_zone, size PASS_MEM_STAT);
  return (rtx) memcpy (copy, orig, size);
}
Пример #2
0
rtx
shallow_copy_rtx (const_rtx orig MEM_STAT_DECL)
{
  const unsigned int size = rtx_size (orig);
  rtx const copy = ggc_alloc_rtx_def_stat (size PASS_MEM_STAT);
  memcpy (copy, orig, size);
  switch (GET_CODE (orig))
    {
      /* RTX codes copy_rtx_if_shared_1 considers are shareable,
	 the used flag is often used for other purposes.  */
    case REG:
    case DEBUG_EXPR:
    case VALUE:
    CASE_CONST_ANY:
    case SYMBOL_REF:
    case CODE_LABEL:
    case PC:
    case CC0:
    case RETURN:
    case SIMPLE_RETURN:
    case SCRATCH:
      break;
    default:
      /* For all other RTXes clear the used flag on the copy.  */
      RTX_FLAG (copy, used) = 0;
      break;
    }
  return copy;
}
Пример #3
0
rtx
shallow_copy_rtx_stat (const_rtx orig MEM_STAT_DECL)
{
  const unsigned int size = rtx_size (orig);
  rtx const copy = (rtx) ggc_alloc_zone_pass_stat (size, &rtl_zone);
  return (rtx) memcpy (copy, orig, size);
}
Пример #4
0
rtx
shallow_copy_rtx_stat (rtx orig MEM_STAT_DECL)
{
  unsigned int size;
  rtx copy;

  size = rtx_size (orig);
  copy = (rtx) ggc_alloc_zone_pass_stat (size, &rtl_zone);
  memcpy (copy, orig, size);
  return copy;
}