gcc-8.3/gcc/init_elim_table()
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
*参照元 [#x9826808]
#backlinks
*説明 [#c1f52dbd]
-パス: [[gcc-8.3/gcc/reload1.c]]
-FIXME: これは何?
--説明
**引数 [#tbcf0d80]
-なし
**返り値 [#ga899a0f]
-なし
**参考 [#ce5ac8a1]
*実装 [#o1b3e7d1]
/* Initialize the table of registers to eliminate.
Pre-condition: global flag frame_pointer_needed has b...
calling this function. */
static void
init_elim_table (void)
{
struct elim_table *ep;
const struct elim_table_1 *ep1;
-
--[[gcc-8.3/gcc/elim_table]]
--[[gcc-8.3/gcc/elim_table_1]]
if (!reg_eliminate)
reg_eliminate = XCNEWVEC (struct elim_table, NUM_ELI...
num_eliminable = 0;
-
--[[gcc-8.3/gcc/XCNEWVEC()]]
for (ep = reg_eliminate, ep1 = reg_eliminate_1;
ep < ®_eliminate[NUM_ELIMINABLE_REGS]; ep++, e...
{
ep->from = ep1->from;
ep->to = ep1->to;
ep->can_eliminate = ep->can_eliminate_previous
= (targetm.can_eliminate (ep->from, ep->to)
&& ! (ep->to == STACK_POINTER_REGNUM
&& frame_pointer_needed
&& (! SUPPORTS_STACK_ALIGNMENT
|| ! stack_realign_fp)));
}
-
--targetm.can_eliminate は TARGET_CAN_ELIMINATE で初期化...
---riscv の場合 riscv_can_eliminate
--[[gcc-8.3/gcc/reg_eliminate(global)]]
--[[gcc-8.3/gcc/reg_eliminate_1(global)]]
--[[gcc-8.3/gcc/targetm(global)]]
--[[gcc-8.3/gcc/riscv_can_eliminate()]]
/* Count the number of eliminable registers and build ...
REG rtx's. Note that code in gen_rtx_REG will caus...
gen_rtx_REG (Pmode, STACK_POINTER_REGNUM) to equal ...
We depend on this. */
for (ep = reg_eliminate; ep < ®_eliminate[NUM_ELIMI...
{
num_eliminable += ep->can_eliminate;
ep->from_rtx = gen_rtx_REG (Pmode, ep->from);
ep->to_rtx = gen_rtx_REG (Pmode, ep->to);
}
}
-
--[[gcc-8.3/gcc/gen_rtx_REG()]]
-from と to は reg_eliminate_1 の値で初期化されている。
--riscv の場合 from 64, to 2 など
--64 はなんだろ?, 2 は sp
---[[gcc-8.3/gcc/reg_eliminate_1(global)]]
---[[gcc-8.3/gcc/REGISTER_NAMES]]
---[[gcc-8.3/gcc/ADDITIONAL_REGISTER_NAMES]]
*コメント [#t73bdc0b]
終了行:
*参照元 [#x9826808]
#backlinks
*説明 [#c1f52dbd]
-パス: [[gcc-8.3/gcc/reload1.c]]
-FIXME: これは何?
--説明
**引数 [#tbcf0d80]
-なし
**返り値 [#ga899a0f]
-なし
**参考 [#ce5ac8a1]
*実装 [#o1b3e7d1]
/* Initialize the table of registers to eliminate.
Pre-condition: global flag frame_pointer_needed has b...
calling this function. */
static void
init_elim_table (void)
{
struct elim_table *ep;
const struct elim_table_1 *ep1;
-
--[[gcc-8.3/gcc/elim_table]]
--[[gcc-8.3/gcc/elim_table_1]]
if (!reg_eliminate)
reg_eliminate = XCNEWVEC (struct elim_table, NUM_ELI...
num_eliminable = 0;
-
--[[gcc-8.3/gcc/XCNEWVEC()]]
for (ep = reg_eliminate, ep1 = reg_eliminate_1;
ep < ®_eliminate[NUM_ELIMINABLE_REGS]; ep++, e...
{
ep->from = ep1->from;
ep->to = ep1->to;
ep->can_eliminate = ep->can_eliminate_previous
= (targetm.can_eliminate (ep->from, ep->to)
&& ! (ep->to == STACK_POINTER_REGNUM
&& frame_pointer_needed
&& (! SUPPORTS_STACK_ALIGNMENT
|| ! stack_realign_fp)));
}
-
--targetm.can_eliminate は TARGET_CAN_ELIMINATE で初期化...
---riscv の場合 riscv_can_eliminate
--[[gcc-8.3/gcc/reg_eliminate(global)]]
--[[gcc-8.3/gcc/reg_eliminate_1(global)]]
--[[gcc-8.3/gcc/targetm(global)]]
--[[gcc-8.3/gcc/riscv_can_eliminate()]]
/* Count the number of eliminable registers and build ...
REG rtx's. Note that code in gen_rtx_REG will caus...
gen_rtx_REG (Pmode, STACK_POINTER_REGNUM) to equal ...
We depend on this. */
for (ep = reg_eliminate; ep < ®_eliminate[NUM_ELIMI...
{
num_eliminable += ep->can_eliminate;
ep->from_rtx = gen_rtx_REG (Pmode, ep->from);
ep->to_rtx = gen_rtx_REG (Pmode, ep->to);
}
}
-
--[[gcc-8.3/gcc/gen_rtx_REG()]]
-from と to は reg_eliminate_1 の値で初期化されている。
--riscv の場合 from 64, to 2 など
--64 はなんだろ?, 2 は sp
---[[gcc-8.3/gcc/reg_eliminate_1(global)]]
---[[gcc-8.3/gcc/REGISTER_NAMES]]
---[[gcc-8.3/gcc/ADDITIONAL_REGISTER_NAMES]]
*コメント [#t73bdc0b]
ページ名: