Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
0778b8be
Commit
0778b8be
authored
Jul 28, 2015
by
Christoph Mallon
Browse files
be: Dump register information at Projs, too.
parent
8c9e9566
Changes
2
Hide whitespace changes
Inline
Side-by-side
ir/be/bedump.c
View file @
0778b8be
...
...
@@ -176,8 +176,27 @@ static void dump_req_reg(FILE *const F, char const *const ctx, unsigned const id
fprintf
(
F
,
" [%s]
\n
"
,
be_dump_reg_name
(
reg
));
}
static
void
dump_req_reg_out
(
FILE
*
const
F
,
ir_node
const
*
const
node
,
unsigned
const
pos
)
{
arch_register_req_t
const
*
const
req
=
arch_get_irn_register_req_out
(
node
,
pos
);
arch_register_t
const
*
const
reg
=
arch_get_irn_register_out
(
node
,
pos
);
dump_req_reg
(
F
,
"outreq"
,
pos
,
req
,
reg
);
}
void
be_dump_reqs_and_registers
(
FILE
*
const
F
,
ir_node
const
*
const
node
)
{
if
(
is_Proj
(
node
))
{
ir_node
*
const
pred
=
get_Proj_pred
(
node
);
if
(
!
is_Proj
(
pred
))
{
backend_info_t
const
*
const
info
=
be_get_info
(
pred
);
if
(
info
&&
info
->
out_infos
)
{
unsigned
const
num
=
get_Proj_num
(
node
);
dump_req_reg_out
(
F
,
pred
,
num
);
}
}
return
;
}
backend_info_t
const
*
const
info
=
be_get_info
(
node
);
/* don't fail on invalid graphs */
if
(
!
info
)
{
...
...
@@ -198,9 +217,7 @@ void be_dump_reqs_and_registers(FILE *const F, ir_node const *const node)
if
(
info
->
out_infos
)
{
be_foreach_out
(
node
,
o
)
{
arch_register_req_t
const
*
const
req
=
arch_get_irn_register_req_out
(
node
,
o
);
arch_register_t
const
*
const
reg
=
arch_get_irn_register_out
(
node
,
o
);
dump_req_reg
(
F
,
"outreq"
,
o
,
req
,
reg
);
dump_req_reg_out
(
F
,
node
,
o
);
}
}
else
{
fputs
(
"output requirements missing
\n
"
,
F
);
...
...
ir/be/beinfo.c
View file @
0778b8be
...
...
@@ -135,8 +135,7 @@ static void dump_backend_info_hook(void *context, FILE *F, const ir_node *node)
if
(
!
irg_is_constrained
(
irg
,
IR_GRAPH_CONSTRAINT_BACKEND
))
return
;
if
(
!
is_Proj
(
node
))
be_dump_reqs_and_registers
(
F
,
node
);
be_dump_reqs_and_registers
(
F
,
node
);
if
(
is_Block
(
node
))
{
be_lv_t
*
const
lv
=
be_get_irg_liveness
(
irg
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment