Commit bd800f12 authored by Michael Beck's avatar Michael Beck
Browse files

BugFix:

be_node_classify() should classify be_Return as a branch. This might be useless
as be_Return consume all register and should be last anyway, but it happen that
keep'ed nodes otherwise are scheduled after Return ...

be_get_IncSP_pred() added

more docu added
parent 38b8e208
......@@ -705,6 +705,11 @@ void be_node_set_req_type(ir_node *irn, int pos, arch_register_req_type_t type)
r->req.type = type;
}
ir_node *be_get_IncSP_pred(ir_node *irn) {
assert(be_is_IncSP(irn));
return get_irn_n(irn, 0);
}
void be_set_IncSP_offset(ir_node *irn, unsigned offset)
{
be_stack_attr_t *a = get_irn_attr(irn);
......@@ -974,11 +979,12 @@ static arch_irn_class_t be_node_classify(const void *_self, const ir_node *irn)
redir_proj((const ir_node **) &irn, -1);
switch(be_get_irn_opcode(irn)) {
#define XXX(a,b) case beo_ ## a: return arch_irn_class_ ## b;
XXX(Spill, spill)
XXX(Reload, reload)
XXX(Perm, perm)
XXX(Copy, copy)
#define XXX(a,b) case beo_ ## a: return arch_irn_class_ ## b
XXX(Spill, spill);
XXX(Reload, reload);
XXX(Perm, perm);
XXX(Copy, copy);
XXX(Return, branch);
#undef XXX
default:
return 0;
......
......@@ -151,12 +151,19 @@ ir_node *be_new_SetSP(const arch_register_t *sp, ir_graph *irg, ir_node *bl, ir_
*/
ir_node *be_new_IncSP(const arch_register_t *sp, ir_graph *irg, ir_node *bl, ir_node *old_sp, ir_node *mem, unsigned amount, be_stack_dir_t dir);
/** Returns the previous node that computes the stack pointer. */
ir_node *be_get_IncSP_pred(ir_node *incsp);
/** Sets a new offset to a IncSP node. */
void be_set_IncSP_offset(ir_node *irn, unsigned offset);
/** Gets the offset from a IncSP node. */
unsigned be_get_IncSP_offset(const ir_node *irn);
/** Sets a new direction to a IncSP node. */
void be_set_IncSP_direction(ir_node *irn, be_stack_dir_t dir);
/** Gets the direction from a IncSP node. */
be_stack_dir_t be_get_IncSP_direction(const ir_node *irn);
/** Gets the call entity or NULL if this is no static call. */
......
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