Commit 92663003 authored by Matthias Braun's avatar Matthias Braun
Browse files

ia32: Add keep edge to cached nodes

If the cached nodes like NoReg_GP, ... had no keep edge and no users
then irgwalks could miss them leading for the iredges code to miss
initializing these nodes.

This fixes bug 161.
parent aaa0bfb5
......@@ -1076,6 +1076,9 @@ static bool has_real_user(const ir_node *node)
static void add_missing_keep_walker(ir_node *node, void *data)
{
if (!sched_is_scheduled(node))
return;
(void)data;
if (get_irn_mode(node) == mode_T) {
unsigned const n_outs = arch_get_irn_n_outs(node);
......
......@@ -80,6 +80,9 @@ static inline ir_node *create_const(ir_graph *irg, ir_node **place,
ir_node *res = func(NULL, block);
arch_set_irn_register(res, reg);
*place = res;
/* We need a keep edge on our cached nodes, so that following firm
* irgwalks will not miss them. */
keep_alive(res);
return res;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment