X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fmips%2Fmips_scheduler.c;h=5ab8ca69714e6414aee269102d17a91abc005b8c;hb=f7dfa0917a2f0469129bbf9b4c0884d37810abcd;hp=635a959ba86624c50904d09e5a92fe6eb69066e2;hpb=aebc3c0c980bcc0536ffdc4cb2a545961b5a8b81;p=libfirm diff --git a/ir/be/mips/mips_scheduler.c b/ir/be/mips/mips_scheduler.c index 635a959ba..5ab8ca697 100644 --- a/ir/be/mips/mips_scheduler.c +++ b/ir/be/mips/mips_scheduler.c @@ -34,7 +34,7 @@ #include "mips_scheduler.h" #include "../besched_t.h" -#include "../be.h" +#include "be.h" #include "../beabi.h" #include "iredges.h" #include "ircons.h" @@ -201,11 +201,28 @@ static ir_node *mips_scheduler_select(void *block_env, nodeset *ready_set, nodes #endif +static +int mips_to_appear_in_schedule(void *block_env, const ir_node *node) +{ + (void) block_env; + + if(!is_mips_irn(node)) + return -1; + if(is_mips_zero(node) || is_mips_Immediate(node)) + return 0; + + return 1; +} + +list_sched_selector_t mips_selector; + /** * Returns the reg_pressure scheduler with to_appear_in_schedule() overloaded */ -const list_sched_selector_t *mips_get_list_sched_selector(const void *self, list_sched_selector_t *selector) +const list_sched_selector_t *mips_get_list_sched_selector(const void *self, + list_sched_selector_t *selector) { + (void) self; #if 0 memset(&mips_sched_selector, 0, sizeof(mips_sched_selector)); mips_sched_selector.init_graph = mips_scheduler_init_graph; @@ -216,9 +233,14 @@ const list_sched_selector_t *mips_get_list_sched_selector(const void *self, list mips_sched_selector.finish_graph = mips_scheduler_finish_graph; //return &mips_sched_selector; #endif - return selector; + memcpy(&mips_selector, selector, sizeof(mips_selector)); + mips_selector.to_appear_in_schedule = mips_to_appear_in_schedule; + + return &mips_selector; } -const ilp_sched_selector_t *mips_get_ilp_sched_selector(const void *self) { +const ilp_sched_selector_t *mips_get_ilp_sched_selector(const void *self) +{ + (void) self; return NULL; }