#include "beabi.h"
#include "bemodule.h"
-#include "benode_t.h"
+#include "benode.h"
#include "besched.h"
#include "beirg.h"
#include "belive.h"
foreach_plist(rirn->pkiller_list, k_el) {
ir_node *pkiller = plist_element_get_value(k_el);
- rss_edge_t *ke = obstack_alloc(phase_obst(&rss->ph), sizeof(*ke));
+ rss_edge_t *ke = OALLOC(phase_obst(&rss->ph), rss_edge_t);
ke->src = irn;
ke->tgt = pkiller;
DBG((rss->dbg, LEVEL_2, "\t\t%+F choosen:\n", u_irn));
- cbc = obstack_alloc(phase_obst(&rss->ph), sizeof(*cbc));
+ cbc = OALLOC(phase_obst(&rss->ph), cbc_t);
cbc->nr = cur_num++;
/* initialize S_cb */
/* while X not empty */
while (ir_nodeset_size(&x) > 0) {
- child_t *t = obstack_alloc(&obst, sizeof(*t));
- memset(t, 0, sizeof(*t));
+ child_t *t = OALLOCZ(&obst, child_t);
t = select_child_max_cost(rss, &x, &y, t, cbc);
key.tgt = (ir_node *) tgt;
if (NULL != pset_find(dvg->edges, &key, HASH_RSS_EDGE(&key))) {
/* add the edge to the DVG */
- dvg_edge = obstack_alloc(phase_obst(&rss->ph), sizeof(*dvg_edge));
+ dvg_edge = OALLOC(phase_obst(&rss->ph), rss_edge_t);
dvg_edge->src = (ir_node *) src;
dvg_edge->tgt = (ir_node *) tgt;
There is an edge (u, v) in the DVG iff v is a descendant of the killer(u).
*/
if (BSEARCH_IRN_ARR(v_irn, u_kill->descendants)) {
- rss_edge_t *dvg_edge = obstack_alloc(phase_obst(&rss->ph), sizeof(*dvg_edge));
+ rss_edge_t *dvg_edge = OALLOC(phase_obst(&rss->ph), rss_edge_t);
rss_edge_t key;
/* insert the user into the DVG and append it to the user list of u */
int xj = idx_map[j];
ir_node *xj_irn = get_idx_irn(rss->irg, xj);
rss_irn_t *xj_rss = get_rss_irn(rss, xj_irn);
- chain_t *c = obstack_alloc(phase_obst(&rss->ph), sizeof(*c));
+ chain_t *c = OALLOC(phase_obst(&rss->ph), chain_t);
int source;
/* there was no source for j -> we have a source of a new chain */
sat_vals = compute_maximal_antichain(rss, &dvg, iteration++);
while (sat_vals && (ir_nodeset_size(sat_vals) > available_regs)) {
serialization_t *ser, best_ser;
- rss_edge_t *edge = obstack_alloc(phase_obst(&rss->ph), sizeof(*edge));
+ rss_edge_t *edge = OALLOC(phase_obst(&rss->ph), rss_edge_t);
ir_node *dep_src, *dep_tgt;
best_ser.edge = edge;
*/
if (is_Proj(irn)) {
ir_node *pred = get_Proj_pred(irn);
- if (be_is_Barrier(pred) || is_Start(pred))
+ if (be_is_Barrier(pred) || be_is_Start(pred))
continue;
}