summaryrefslogtreecommitdiffhomepage
path: root/ir/be/bestack.c
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2012-11-26 10:46:00 +0100
committerChristoph Mallon <christoph.mallon@gmx.de>2012-11-26 10:46:00 +0100
commit1888bb8f0d0752f87d8e5ecabe61b59cb1b5635f (patch)
tree0a312b65182756c11776e2ee4983f5469e9e1aae /ir/be/bestack.c
parenta735a7d826639d7d447c94b9a221c4710ea3142e (diff)
bestack: Simplify collect_stack_nodes_walker().
Diffstat (limited to 'ir/be/bestack.c')
-rw-r--r--ir/be/bestack.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/ir/be/bestack.c b/ir/be/bestack.c
index 07d4775..17e8cc3 100644
--- a/ir/be/bestack.c
+++ b/ir/be/bestack.c
@@ -270,21 +270,13 @@ typedef struct fix_stack_walker_env_t {
*/
static void collect_stack_nodes_walker(ir_node *node, void *data)
{
- ir_node *insn = node;
- fix_stack_walker_env_t *env = (fix_stack_walker_env_t*)data;
- const arch_register_req_t *req;
+ fix_stack_walker_env_t *const env = (fix_stack_walker_env_t*)data;
- if (is_Proj(node)) {
- insn = get_Proj_pred(node);
- }
-
- if (arch_get_irn_n_outs(insn) == 0)
- return;
if (get_irn_mode(node) == mode_T)
return;
- req = arch_get_irn_register_req(node);
- if (! (req->type & arch_register_req_type_produces_sp))
+ arch_register_req_t const *const req = arch_get_irn_register_req(node);
+ if (!arch_register_req_is(req, produces_sp))
return;
ARR_APP1(ir_node*, env->sp_nodes, node);