#include "irgraph_t.h"
#include "ircons.h"
#include "irflag.h"
-#include "tv.h"
#include "firmstat.h"
/**
ir_node *pred;
ir_op *op;
- switch (intern_get_irn_opcode(node)) {
+ switch (get_irn_opcode(node)) {
case iro_Proj:
pred = get_Proj_pred(node);
- op = intern_get_irn_op(pred);
+ op = get_irn_op(pred);
if (op == op_Proj) {
ir_node *start = get_Proj_pred(pred);
- if (intern_get_irn_op(start) == op_Start) {
+ if (get_irn_op(start) == op_Start) {
if (get_Proj_proj(pred) == pn_Start_T_args) {
/* found Proj(ProjT(Start)) */
set_irn_link(node, data->proj_data);
for (i = 1, p = rets; p; p = get_irn_link(p)) {
ir_node *jmp;
- switch_block(get_nodes_Block(p));
+ set_cur_block(get_nodes_block(p));
jmp = new_Jmp();
exchange(p, new_Bad());
in[i] = get_Call_mem(calls);
++i;
}
+ assert(i == n_tail_calls + 1);
+
phis[0] = new_rd_Phi(NULL, irg, block, n_tail_calls + 1, in, mode_M);
/* build the data phi's */
for (i = 0; i < n_preds; ++i) {
ir_node *ret = get_Block_cfgpred(end_block, i);
ir_node *proj_m, *call, *call_ptr;
- tarval *tv;
entity *ent;
int j, n_ress;
ir_node **ress;
/* search all returns of a block */
- if (intern_get_irn_op(ret) != op_Return)
+ if (get_irn_op(ret) != op_Return)
continue;
/* check, if it's a Return self() */
proj_m = get_Return_mem(ret);
- if (intern_get_irn_op(proj_m) != op_Proj)
+ if (get_irn_op(proj_m) != op_Proj)
continue;
call = get_Proj_pred(proj_m);
- if (intern_get_irn_op(call) != op_Call)
+ if (get_irn_op(call) != op_Call)
continue;
/* check if it's a recursive call */
call_ptr = get_Call_ptr(call);
- if (intern_get_irn_op(call_ptr) != op_Const)
+ if (get_irn_op(call_ptr) != op_SymConst)
continue;
- tv = get_Const_tarval(call_ptr);
- if (! tarval_is_entity(tv))
+ if (get_SymConst_kind(call_ptr) != symconst_addr_ent)
continue;
- ent = tarval_to_entity(tv);
+ ent = get_SymConst_entity(call_ptr);
if (!ent || get_entity_irg(ent) != irg)
continue;
ir_node *proj_proj;
ir_node *irn;
- if (intern_get_irn_op(proj) != op_Proj) {
+ if (get_irn_op(proj) != op_Proj) {
/* not routed to a call */
break;
}
proj_proj = get_Proj_pred(proj);
- if (intern_get_irn_op(proj) != op_Proj) {
+ if (get_irn_op(proj) != op_Proj) {
/* not routed to a call */
break;
}