static int get_num_successors(ir_node *irn)
{
int sum = 0;
- const ir_edge_t *edge;
if (get_irn_mode(irn) == mode_T) {
/* for mode_T nodes: count the users of all Projs */
if (get_irn_mode(irn) == mode_T) {
/* mode_T nodes: num out regs == num Projs with mode datab */
- const ir_edge_t *edge;
foreach_out_edge(irn, edge) {
ir_node *proj = get_edge_src_irn(edge);
if (mode_is_datab(get_irn_mode(proj)))
*/
static int is_root(ir_node *root, ir_node *block)
{
- const ir_edge_t *edge;
-
foreach_out_edge(root, edge) {
ir_node *succ = get_edge_src_irn(edge);
ir_node *root = NULL, *preord = NULL;
ir_node *curr, *irn;
int cur_pos;
- const ir_edge_t *edge;
/* First step: Find the root set. */
foreach_out_edge(block, edge) {
*/
static ir_node *basic_selection(ir_nodeset_t *ready_set)
{
- ir_node *irn = NULL;
- ir_nodeset_iterator_t iter;
-
/* assure that branches and constants are executed last */
foreach_ir_nodeset(ready_set, irn, iter) {
if (!is_cfop(irn)) {
}
/* at last: schedule branches */
- irn = get_nodeset_node(ready_set);
-
- return irn;
+ return get_nodeset_node(ready_set);
}
/**
{
trace_env_t *env = (trace_env_t*)block_env;
ir_nodeset_t mcands, ecands;
- ir_nodeset_iterator_t iter;
sched_timestep_t max_delay = 0;
- ir_node *irn;
/* calculate the max delay of all candidates */
foreach_ir_nodeset(ready_set, irn, iter) {
}
/* select a node */
+ ir_node *irn;
if (ir_nodeset_size(&mcands) == 1) {
irn = get_nodeset_node(&mcands);
DB((env->dbg, LEVEL_3, "\tirn = %+F, mcand = 1, max_delay = %u\n", irn, max_delay));
static ir_node *heuristic_select(void *block_env, ir_nodeset_t *ns)
{
trace_env_t *trace_env = (trace_env_t*)block_env;
- ir_node *irn, *cand = NULL;
+ ir_node *cand = NULL;
int max_prio = INT_MIN;
int cur_prio = INT_MIN;
int reg_fact;
- ir_nodeset_iterator_t iter;
/* Note: register pressure calculation needs an overhaul, you need correct
* tracking for each register class indidually and weight by each class
int cur_pressure = ir_nodeset_size(lv); */