#include "error.h"
#include "be.h"
#include "util.h"
+#include "firmstat_t.h"
/** Walker environment. */
typedef struct walker_env {
ir_node *irn;
(void) ctx;
- irn = new_rd_Builtin(dbg, block, get_irg_no_mem(current_ir_graph), 1, &op, ir_bk_bswap, tp);
+ ir_graph *const irg = get_Block_irg(block);
+ irn = new_rd_Builtin(dbg, block, get_irg_no_mem(irg), 1, &op, ir_bk_bswap, tp);
set_irn_pinned(irn, op_pin_state_floats);
irn = new_r_Proj(irn, get_irn_mode(op), pn_Builtin_max+1);
replace_call(irn, call, mem, NULL, NULL);
return 0;
char_tp = get_pointer_points_to_type(char_tp);
+ ir_node *mem = get_Call_mem(call);
if (left == right) {
/* a strcmp(s, s) ==> 0 */
- ir_graph *irg = get_irn_irg(call);
- ir_node *mem = get_Call_mem(call);
- ir_mode *mode = get_type_mode(res_tp);
+ ir_graph *irg = get_irn_irg(call);
+ ir_mode *mode = get_type_mode(res_tp);
irn = new_r_Const(irg, get_mode_null(mode));
DBG_OPT_ALGSIM0(call, irn, FS_OPT_RTS_STRCMP);
} else if (ent_r != NULL) {
if (is_empty_string(ent_r)) {
/* s strcmp(s, "") ==> (*s) */
- ir_node *mem, *block;
+ ir_node *block;
dbg_info *dbg;
ir_mode *mode;
}
if (irn != NULL) {
- ir_node *mem = get_Call_mem(call);
DBG_OPT_ALGSIM0(call, irn, FS_OPT_RTS_STRCMP);
replace_call(irn, call, mem, reg, exc);
return 1;
int i, j, arity, first, n_param, n_res;
long n_proj;
ir_type *mtp;
- ir_node *mem, *bl, *call, *addr, *res_proj;
+ ir_node *mem, *call, *addr, *res_proj;
ir_node **in;
bool throws_exception;
ir_op *op;
- ir_graph *irg;
symconst_symbol sym;
ir_mode *mode = get_irn_mode(node);
mtp = get_entity_type(rt->ent);
n_param = get_method_n_params(mtp);
- irg = current_ir_graph;
+ ir_node *const bl = get_nodes_block(node);
+ ir_graph *const irg = get_Block_irg(bl);
mem = get_irn_n(node, 0);
if (get_irn_mode(mem) != mode_M) {
}
/* ok, when we are here, the number of predecessors match as well as the parameter modes */
- bl = get_nodes_block(node);
op = get_irn_op(node);
in = NULL;