参照元

説明

enum rtx_code
{
#define DEF_RTL_EXPR(ENUM, NAME, FORMAT, CLASS) ENUM ,
#include "rtl.def"
#undef DEF_RTL_EXPR
  NUM_RTX_CODE
};

rtl.def には下記のように DEF_RTL_EXPR を使った定義が羅列されていて、

/* Unknown, or no such operation; the enumeration constant should have
   value zero.  */
DEF_RTL_EXPR(UNKNOWN, "UnKnown", "*", RTX_EXTRA)

/* Used in the cselib routines to describe a value.  Objects of this
   kind are only allocated in cselib.c, in an alloc pool instead of in
   GC memory.  The only operand of a VALUE is a cselib_val.
   var-tracking requires this to have a distinct integral value from
   DECL codes in trees.  */
DEF_RTL_EXPR(VALUE, "value", "0", RTX_OBJ)

/* The RTL generated for a DEBUG_EXPR_DECL.  It links back to the
   DEBUG_EXPR_DECL in the first operand.  */
DEF_RTL_EXPR(DEBUG_EXPR, "debug_expr", "0", RTX_OBJ)

ENUM のみを残すマクロを定義してから、

#define DEF_RTL_EXPR(ENUM, NAME, FORMAT, CLASS) ENUM ,

include "rtl.def" することで、NAME, FORMAT, CLASS の情報は消えて、ENUM のみが並ぶ。

引数

返り値

参考

実装

コメント


トップ   編集 凍結 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2019-05-16 (木) 19:32:52