参照元

説明

引数

返り値

参考

実装

/* Dump the call statement GS.  BUFFER, SPC and FLAGS are as in
   pp_gimple_stmt_1.  */

static void
dump_gimple_call (pretty_printer *buffer, gcall *gs, int spc,
		  dump_flags_t flags)
{
  tree lhs = gimple_call_lhs (gs);
  tree fn = gimple_call_fn (gs);
  if (flags & TDF_ALIAS)
    {
      struct pt_solution *pt;
      pt = gimple_call_use_set (gs);
      if (!pt_solution_empty_p (pt))
	{
	  pp_string (buffer, "# USE = ");
	  pp_points_to_solution (buffer, pt);
	  newline_and_indent (buffer, spc);
	}
      pt = gimple_call_clobber_set (gs);
      if (!pt_solution_empty_p (pt))
	{
	  pp_string (buffer, "# CLB = ");
	  pp_points_to_solution (buffer, pt);
	  newline_and_indent (buffer, spc);
	}
    }

  if (flags & TDF_RAW)
    {
      if (gimple_call_internal_p (gs))
	dump_gimple_fmt (buffer, spc, flags, "%G <%s, %T", gs,
			 internal_fn_name (gimple_call_internal_fn (gs)), lhs);
      else
	dump_gimple_fmt (buffer, spc, flags, "%G <%T, %T", gs, fn, lhs);
      if (gimple_call_num_args (gs) > 0)
        {
          pp_string (buffer, ", ");
          dump_gimple_call_args (buffer, gs, flags);
        }
      pp_greater (buffer);
    }
  else
    {
      if (lhs && !(flags & TDF_RHS_ONLY))
        {
          dump_generic_node (buffer, lhs, spc, flags, false);
          pp_string (buffer, " =");

	  if (gimple_has_volatile_ops (gs))
	    pp_string (buffer, "{v}");

	  pp_space (buffer);
        }
      if (gimple_call_internal_p (gs))
	pp_string (buffer, internal_fn_name (gimple_call_internal_fn (gs)));
      else
	print_call_name (buffer, fn, flags);
      pp_string (buffer, " (");
      dump_gimple_call_args (buffer, gs, flags);
      pp_right_paren (buffer);
      if (!(flags & TDF_RHS_ONLY))
	pp_semicolon (buffer);
    }

  if (gimple_call_chain (gs))
    {
      pp_string (buffer, " [static-chain: ");
      dump_generic_node (buffer, gimple_call_chain (gs), spc, flags, false);
      pp_right_bracket (buffer);
    }
  if (gimple_call_return_slot_opt_p (gs))
    pp_string (buffer, " [return slot optimization]");
  if (gimple_call_tail_p (gs))
    pp_string (buffer, " [tail call]");
  if (gimple_call_must_tail_p (gs))
    pp_string (buffer, " [must tail call]");
  if (fn == NULL)
    return;

  /* Dump the arguments of _ITM_beginTransaction sanely.  */
  if (TREE_CODE (fn) == ADDR_EXPR)
    fn = TREE_OPERAND (fn, 0);
  if (TREE_CODE (fn) == FUNCTION_DECL && decl_is_tm_clone (fn))
    pp_string (buffer, " [tm-clone]");
  if (TREE_CODE (fn) == FUNCTION_DECL
      && DECL_BUILT_IN_CLASS (fn) == BUILT_IN_NORMAL
      && DECL_FUNCTION_CODE (fn) == BUILT_IN_TM_START
      && gimple_call_num_args (gs) > 0)
    {
      tree t = gimple_call_arg (gs, 0);
      unsigned HOST_WIDE_INT props;
      gcc_assert (TREE_CODE (t) == INTEGER_CST);

      pp_string (buffer, " [ ");
      /* Get the transaction code properties.  */
      props = TREE_INT_CST_LOW (t);
      if (props & PR_INSTRUMENTEDCODE)
	pp_string (buffer, "instrumentedCode ");
      if (props & PR_UNINSTRUMENTEDCODE)
	pp_string (buffer, "uninstrumentedCode ");
      if (props & PR_HASNOXMMUPDATE)
	pp_string (buffer, "hasNoXMMUpdate ");
      if (props & PR_HASNOABORT)
	pp_string (buffer, "hasNoAbort ");
      if (props & PR_HASNOIRREVOCABLE)
	pp_string (buffer, "hasNoIrrevocable ");
      if (props & PR_DOESGOIRREVOCABLE)
	pp_string (buffer, "doesGoIrrevocable ");
      if (props & PR_HASNOSIMPLEREADS)
	pp_string (buffer, "hasNoSimpleReads ");
      if (props & PR_AWBARRIERSOMITTED)
	pp_string (buffer, "awBarriersOmitted ");
      if (props & PR_RARBARRIERSOMITTED)
	pp_string (buffer, "RaRBarriersOmitted ");
      if (props & PR_UNDOLOGCODE)
	pp_string (buffer, "undoLogCode ");
      if (props & PR_PREFERUNINSTRUMENTED)
	pp_string (buffer, "preferUninstrumented ");
      if (props & PR_EXCEPTIONBLOCK)
	pp_string (buffer, "exceptionBlock ");
      if (props & PR_HASELSE)
	pp_string (buffer, "hasElse ");
      if (props & PR_READONLY)
	pp_string (buffer, "readOnly ");

      pp_right_bracket (buffer);
    }
}

コメント


トップ   編集 凍結 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2021-03-22 (月) 17:17:45