gcc-8.3/gcc/dump_gimple_call()
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
*参照元 [#nb25a552]
#backlinks
*説明 [#w82560cb]
-パス: [[gcc-8.3/gcc/gimple-pretty-print.c]]
-FIXME: これは何?
--説明
**引数 [#wdc57603]
-pretty_printer *buffer
--
--[[gcc-8.3/gcc/pretty_printer]]
-gcall *gs
--
--[[gcc-8.3/gcc/gcall]]
-int spc
-dump_flags_t flags
--
--[[gcc-8.3/gcc/dump_flags_t]]
**返り値 [#s9eadfac]
-なし
**参考 [#s232ac6f]
*実装 [#ba721c14]
/* Dump the call statement GS. BUFFER, SPC and FLAGS ar...
pp_gimple_stmt_1. */
static void
dump_gimple_call (pretty_printer *buffer, gcall *gs, int...
dump_flags_t flags)
{
tree lhs = gimple_call_lhs (gs);
tree fn = gimple_call_fn (gs);
-lhs は op[0], fn は op[1]
--[[gcc-8.3/gcc/gimple_call_lhs()]]
--[[gcc-8.3/gcc/gimple_call_fn()]]
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);
}
-
--[[gcc-8.3/gcc/pt_solution]]
--[[gcc-8.3/gcc/gimple_call_use_set()]]
--[[gcc-8.3/gcc/pt_solution_empty_p()]]
--[[gcc-8.3/gcc/pp_string()]]
--[[gcc-8.3/gcc/pp_points_to_solution()]]
--[[gcc-8.3/gcc/newline_and_indent()]]
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);
}
-
--[[gcc-8.3/gcc/gimple_call_clobber_set()]]
}
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, ...
if (gimple_call_num_args (gs) > 0)
{
pp_string (buffer, ", ");
dump_gimple_call_args (buffer, gs, flags);
}
pp_greater (buffer);
-
--[[gcc-8.3/gcc/gimple_call_internal_p()]]
--[[gcc-8.3/gcc/dump_gimple_fmt()]]
--[[gcc-8.3/gcc/internal_fn_name()]]
--[[gcc-8.3/gcc/gimple_call_internal_fn()]]
--[[gcc-8.3/gcc/gimple_call_num_args()]]
--[[gcc-8.3/gcc/dump_gimple_call_args()]]
--[[gcc-8.3/gcc/pp_greater()]]
}
else
{
if (lhs && !(flags & TDF_RHS_ONLY))
{
dump_generic_node (buffer, lhs, spc, flags, fa...
pp_string (buffer, " =");
if (gimple_has_volatile_ops (gs))
pp_string (buffer, "{v}");
pp_space (buffer);
}
-
--[[gcc-8.3/gcc/dump_generic_node()]]
--[[gcc-8.3/gcc/gimple_has_volatile_ops()]]
if (gimple_call_internal_p (gs))
pp_string (buffer, internal_fn_name (gimple_call_intern...
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);
-
--[[gcc-8.3/gcc/gimple_call_internal_p()]]
--[[gcc-8.3/gcc/internal_fn_name()]]
--[[gcc-8.3/gcc/gimple_call_internal_fn()]]
--[[gcc-8.3/gcc/print_call_name()]]
--[[gcc-8.3/gcc/dump_gimple_call_args()]]
--[[gcc-8.3/gcc/pp_right_paren()]]
--[[gcc-8.3/gcc/pp_semicolon()]]
}
if (gimple_call_chain (gs))
{
pp_string (buffer, " [static-chain: ");
dump_generic_node (buffer, gimple_call_chain (gs),...
pp_right_bracket (buffer);
}
-
--[[gcc-8.3/gcc/gimple_call_chain()]]
--[[gcc-8.3/gcc/dump_generic_node()]]
--[[gcc-8.3/gcc/pp_right_bracket()]]
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]");
-
--[[gcc-8.3/gcc/gimple_call_return_slot_opt_p()]]
--[[gcc-8.3/gcc/gimple_call_tail_p()]]
--[[gcc-8.3/gcc/gimple_call_must_tail_p()]]
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_clon...
pp_string (buffer, " [tm-clone]");
-
--[[gcc-8.3/gcc/TREE_CODE()]]
--[[gcc-8.3/gcc/TREE_OPERAND()]]
--[[gcc-8.3/gcc/decl_is_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, " [ ");
-
--[[gcc-8.3/gcc/DECL_BUILT_IN_CLASS()]]
--[[gcc-8.3/gcc/DECL_FUNCTION_CODE()]]
--[[gcc-8.3/gcc/gimple_call_num_args()]]
--[[gcc-8.3/gcc/gimple_call_arg()]]
--[[gcc-8.3/gcc/HOST_WIDE_INT]]
--[[gcc-8.3/gcc/gcc_assert()]]
/* Get the transaction code properties. */
props = TREE_INT_CST_LOW (t);
-
--[[gcc-8.3/gcc/TREE_INT_CST_LOW()]]
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);
}
}
*コメント [#lce307bd]
終了行:
*参照元 [#nb25a552]
#backlinks
*説明 [#w82560cb]
-パス: [[gcc-8.3/gcc/gimple-pretty-print.c]]
-FIXME: これは何?
--説明
**引数 [#wdc57603]
-pretty_printer *buffer
--
--[[gcc-8.3/gcc/pretty_printer]]
-gcall *gs
--
--[[gcc-8.3/gcc/gcall]]
-int spc
-dump_flags_t flags
--
--[[gcc-8.3/gcc/dump_flags_t]]
**返り値 [#s9eadfac]
-なし
**参考 [#s232ac6f]
*実装 [#ba721c14]
/* Dump the call statement GS. BUFFER, SPC and FLAGS ar...
pp_gimple_stmt_1. */
static void
dump_gimple_call (pretty_printer *buffer, gcall *gs, int...
dump_flags_t flags)
{
tree lhs = gimple_call_lhs (gs);
tree fn = gimple_call_fn (gs);
-lhs は op[0], fn は op[1]
--[[gcc-8.3/gcc/gimple_call_lhs()]]
--[[gcc-8.3/gcc/gimple_call_fn()]]
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);
}
-
--[[gcc-8.3/gcc/pt_solution]]
--[[gcc-8.3/gcc/gimple_call_use_set()]]
--[[gcc-8.3/gcc/pt_solution_empty_p()]]
--[[gcc-8.3/gcc/pp_string()]]
--[[gcc-8.3/gcc/pp_points_to_solution()]]
--[[gcc-8.3/gcc/newline_and_indent()]]
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);
}
-
--[[gcc-8.3/gcc/gimple_call_clobber_set()]]
}
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, ...
if (gimple_call_num_args (gs) > 0)
{
pp_string (buffer, ", ");
dump_gimple_call_args (buffer, gs, flags);
}
pp_greater (buffer);
-
--[[gcc-8.3/gcc/gimple_call_internal_p()]]
--[[gcc-8.3/gcc/dump_gimple_fmt()]]
--[[gcc-8.3/gcc/internal_fn_name()]]
--[[gcc-8.3/gcc/gimple_call_internal_fn()]]
--[[gcc-8.3/gcc/gimple_call_num_args()]]
--[[gcc-8.3/gcc/dump_gimple_call_args()]]
--[[gcc-8.3/gcc/pp_greater()]]
}
else
{
if (lhs && !(flags & TDF_RHS_ONLY))
{
dump_generic_node (buffer, lhs, spc, flags, fa...
pp_string (buffer, " =");
if (gimple_has_volatile_ops (gs))
pp_string (buffer, "{v}");
pp_space (buffer);
}
-
--[[gcc-8.3/gcc/dump_generic_node()]]
--[[gcc-8.3/gcc/gimple_has_volatile_ops()]]
if (gimple_call_internal_p (gs))
pp_string (buffer, internal_fn_name (gimple_call_intern...
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);
-
--[[gcc-8.3/gcc/gimple_call_internal_p()]]
--[[gcc-8.3/gcc/internal_fn_name()]]
--[[gcc-8.3/gcc/gimple_call_internal_fn()]]
--[[gcc-8.3/gcc/print_call_name()]]
--[[gcc-8.3/gcc/dump_gimple_call_args()]]
--[[gcc-8.3/gcc/pp_right_paren()]]
--[[gcc-8.3/gcc/pp_semicolon()]]
}
if (gimple_call_chain (gs))
{
pp_string (buffer, " [static-chain: ");
dump_generic_node (buffer, gimple_call_chain (gs),...
pp_right_bracket (buffer);
}
-
--[[gcc-8.3/gcc/gimple_call_chain()]]
--[[gcc-8.3/gcc/dump_generic_node()]]
--[[gcc-8.3/gcc/pp_right_bracket()]]
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]");
-
--[[gcc-8.3/gcc/gimple_call_return_slot_opt_p()]]
--[[gcc-8.3/gcc/gimple_call_tail_p()]]
--[[gcc-8.3/gcc/gimple_call_must_tail_p()]]
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_clon...
pp_string (buffer, " [tm-clone]");
-
--[[gcc-8.3/gcc/TREE_CODE()]]
--[[gcc-8.3/gcc/TREE_OPERAND()]]
--[[gcc-8.3/gcc/decl_is_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, " [ ");
-
--[[gcc-8.3/gcc/DECL_BUILT_IN_CLASS()]]
--[[gcc-8.3/gcc/DECL_FUNCTION_CODE()]]
--[[gcc-8.3/gcc/gimple_call_num_args()]]
--[[gcc-8.3/gcc/gimple_call_arg()]]
--[[gcc-8.3/gcc/HOST_WIDE_INT]]
--[[gcc-8.3/gcc/gcc_assert()]]
/* Get the transaction code properties. */
props = TREE_INT_CST_LOW (t);
-
--[[gcc-8.3/gcc/TREE_INT_CST_LOW()]]
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);
}
}
*コメント [#lce307bd]
ページ名: