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
fa6780d8
Commit
fa6780d8
authored
Feb 10, 2010
by
Jonas Fietz
Browse files
Add dumper code for VRP information
This commit adds the code and prototypes for dumping vrp information [r27095]
parent
671350c7
Changes
3
Show whitespace changes
Inline
Side-by-side
ir/ir/irdump.c
View file @
fa6780d8
...
...
@@ -1201,6 +1201,29 @@ int dump_node_label(FILE *F, ir_node *n) {
return
bad
;
}
/* Dumps the vrp information of a node to a file */
int
dump_vrp_info
(
FILE
*
F
,
ir_node
*
n
)
{
if
(
!
n
->
vrp
.
valid
)
{
return
1
;
}
fprintf
(
F
,
"range_type: %d
\n
"
,
n
->
vrp
.
range_type
);
if
(
n
->
vrp
.
range_type
==
VRP_RANGE
||
n
->
vrp
.
range_type
==
VRP_ANTIRANGE
)
{
ir_fprintf
(
F
,
"range_bottom: %F
\n
"
,
n
->
vrp
.
range_bottom
);
ir_fprintf
(
F
,
"range_top: %F
\n
"
,
n
->
vrp
.
range_top
);
}
ir_fprintf
(
F
,
"bits_set: %T
\n
"
,
n
->
vrp
.
bits_set
);
ir_fprintf
(
F
,
"bits_not_set: %T
\n
"
,
n
->
vrp
.
bits_not_set
);
if
(
n
->
vrp
.
bits_node
==
NULL
)
{
fprintf
(
F
,
"bits_node: None"
);
}
else
{
fprintf
(
F
,
"bits_node: #%ld
\n
"
,
get_irn_node_nr
(
n
->
vrp
.
bits_node
));
}
return
0
;
}
/**
* Dumps the attributes of a node n into the file F.
* Currently this is only the color of a node.
...
...
ir/ir/irdump_t.h
View file @
fa6780d8
...
...
@@ -108,6 +108,7 @@ dump_node_opcode(FILE *F, ir_node *n);
int
dump_node_label
(
FILE
*
F
,
ir_node
*
n
);
int
dump_vrp_info
(
FILE
*
F
,
ir_node
*
n
);
/** Writes vcg representation with title "PRINT_TYPEID(tp)" to file F. */
int
dump_type_node
(
FILE
*
F
,
ir_type
*
tp
);
...
...
ir/ir/irdumptxt.c
View file @
fa6780d8
...
...
@@ -397,6 +397,10 @@ int dump_irnode_to_file(FILE *F, ir_node *n) {
default:
;
}
if
(
n
->
vrp
.
valid
)
{
dump_vrp_info
(
F
,
n
);
}
if
(
get_irg_typeinfo_state
(
get_irn_irg
(
n
))
==
ir_typeinfo_consistent
||
get_irg_typeinfo_state
(
get_irn_irg
(
n
))
==
ir_typeinfo_inconsistent
)
if
(
get_irn_typeinfo_type
(
n
)
!=
firm_none_type
)
...
...
Write
Preview
Supports
Markdown
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