+ * Set the register for P_frame_base Proj to %esp.
+ */
+static void ia32_set_P_frame_base_Proj_reg(ir_node *irn, void *env) {
+ ia32_code_gen_t *cg = env;
+
+ if (is_P_frame_base_Proj(irn)) {
+ arch_set_irn_register(cg->arch_env, irn, &ia32_general_purpose_regs[REG_ESP]);
+ }
+}
+
+/**
+ * This function is the hook before_sched but more important: it is
+ * called after the dead node elimination. The dead node elimination changes
+ * the memory location of the nodes, which will change the hash key of
+ * the Proj_P_frame_base(Start) and this will fuck up the firm_node -> register
+ * hash map. So we need to insert the register for this node after the dead node
+ * elimination.