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
584bf872
Commit
584bf872
authored
Oct 11, 2008
by
Christoph Mallon
Browse files
Remove the unused parameter const arch_env_t *env from arch_reg_is_allocatable().
[r22689]
parent
e927f294
Changes
4
Hide whitespace changes
Inline
Side-by-side
ir/be/bearch.c
View file @
584bf872
...
...
@@ -195,11 +195,9 @@ int arch_is_register_operand(const ir_node *irn, int pos)
return
req
!=
NULL
;
}
int
arch_reg_is_allocatable
(
const
arch_env_t
*
env
,
const
ir_node
*
irn
,
int
pos
,
const
arch_register_t
*
reg
)
int
arch_reg_is_allocatable
(
const
ir_node
*
irn
,
int
pos
,
const
arch_register_t
*
reg
)
{
const
arch_register_req_t
*
req
=
arch_get_register_req
(
irn
,
pos
);
(
void
)
env
;
// TODO remove parameter
if
(
req
->
type
==
arch_register_req_type_none
)
return
0
;
...
...
ir/be/bearch.h
View file @
584bf872
...
...
@@ -185,14 +185,12 @@ extern void arch_put_non_ignore_regs(const arch_register_class_t *cls, bitset_t
/**
* Check, if a register is assignable to an operand of a node.
* @param env The architecture environment.
* @param irn The node.
* @param pos The position of the operand.
* @param reg The register.
* @return 1, if the register might be allocated to the operand 0 if not.
*/
extern
int
arch_reg_is_allocatable
(
const
arch_env_t
*
env
,
const
ir_node
*
irn
,
int
pos
,
const
arch_register_t
*
reg
);
int
arch_reg_is_allocatable
(
const
ir_node
*
irn
,
int
pos
,
const
arch_register_t
*
reg
);
/**
* Get the register class of an operand of a node.
...
...
ir/be/becopyheur.c
View file @
584bf872
...
...
@@ -301,7 +301,7 @@ static ir_node *qnode_color_irn(const qnode_t *qn, ir_node *irn, int col, const
#endif
/* SEARCH_FREE_COLORS */
/* If target color is not allocatable changing color is impossible */
if
(
!
arch_reg_is_allocatable
(
co
->
aenv
,
irn
,
-
1
,
arch_register_for_index
(
cls
,
col
)))
{
if
(
!
arch_reg_is_allocatable
(
irn
,
-
1
,
arch_register_for_index
(
cls
,
col
)))
{
DBG
((
dbg
,
LEVEL_3
,
"
\t
%+F impossible
\n
"
,
irn
));
return
CHANGE_IMPOSSIBLE
;
}
...
...
ir/be/beverify.c
View file @
584bf872
...
...
@@ -711,7 +711,7 @@ static void check_register_constraints(ir_node *node)
ir_fprintf
(
stderr
,
"Verify warning: Node %+F in block %+F(%s) should have a register assigned
\n
"
,
node
,
get_nodes_block
(
node
),
get_irg_dump_name
(
irg
));
problem_found
=
1
;
}
else
if
(
!
arch_register_type_is
(
reg
,
joker
)
&&
!
arch_reg_is_allocatable
(
arch_env
,
node
,
-
1
,
reg
))
{
}
else
if
(
!
arch_register_type_is
(
reg
,
joker
)
&&
!
arch_reg_is_allocatable
(
node
,
-
1
,
reg
))
{
ir_fprintf
(
stderr
,
"Verify warning: Register %s assigned as output of %+F not allowed (register constraint) in block %+F(%s)
\n
"
,
reg
->
name
,
node
,
get_nodes_block
(
node
),
get_irg_dump_name
(
irg
));
problem_found
=
1
;
...
...
@@ -742,8 +742,7 @@ static void check_register_constraints(ir_node *node)
pred
,
get_nodes_block
(
pred
),
get_irg_dump_name
(
irg
),
node
);
problem_found
=
1
;
continue
;
}
else
if
(
!
arch_register_type_is
(
reg
,
joker
)
&&
!
arch_reg_is_allocatable
(
arch_env
,
node
,
i
,
reg
))
{
}
else
if
(
!
arch_register_type_is
(
reg
,
joker
)
&&
!
arch_reg_is_allocatable
(
node
,
i
,
reg
))
{
ir_fprintf
(
stderr
,
"Verify warning: Register %s as input %d of %+F not allowed (register constraint) in block %+F(%s)
\n
"
,
reg
->
name
,
i
,
node
,
get_nodes_block
(
node
),
get_irg_dump_name
(
irg
));
problem_found
=
1
;
...
...
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