INSERTENUM(tt_builtin, ir_bk_trap);
INSERTENUM(tt_builtin, ir_bk_debugbreak);
INSERTENUM(tt_builtin, ir_bk_return_address);
- INSERTENUM(tt_builtin, ir_bk_frame_addess);
+ INSERTENUM(tt_builtin, ir_bk_frame_address);
INSERTENUM(tt_builtin, ir_bk_prefetch);
INSERTENUM(tt_builtin, ir_bk_ffs);
INSERTENUM(tt_builtin, ir_bk_clz);
}
}
+/**
+ * Walker: exports every node.
+ */
static void export_node(ir_node *irn, void *ctx)
{
io_env_t *env = (io_env_t *) ctx;
if (env->ignoreblocks && opcode == iro_Block)
return;
- n = get_irn_arity(irn);
-
fprintf(env->file, "\t%s %ld [ ", get_irn_opname(irn), get_irn_node_nr(irn));
+ n = get_irn_arity(irn);
for (i = -1; i < n; i++) {
ir_node *pred = get_irn_n(irn, i);
if (pred == NULL) {
fprintf(env->file, "] { ");
- switch (opcode)
- {
+ switch (opcode) {
#include "gen_irio_export.inl"
}
fputs("}\n", env->file);
fputs("}\n\n", env->file);
}
-/** Exports the whole irp to the given file in a textual form. */
+/* Exports the whole irp to the given file in a textual form. */
void ir_export(const char *filename)
{
io_env_t env;
fclose(env.file);
}
-/** Exports the given irg to the given file. */
+/* Exports the given irg to the given file. */
void ir_export_irg(ir_graph *irg, const char *filename)
{
io_env_t env;
ir_mode_arithmetic arith = read_mode_arithmetic(env);
unsigned modulo_shift = read_long(env);
int vector_elems = read_long(env);
+ ir_mode *mode;
+
if (vector_elems != 1) {
panic("no support for import of vector modes yes");
}
- ir_mode *mode = new_ir_mode(name, sort, size, sign, arith, modulo_shift);
-
- if (mode_is_reference(mode))
- {
+ mode = new_ir_mode(name, sort, size, sign, arith, modulo_shift);
+ if (mode_is_reference(mode)) {
set_reference_mode_signed_eq(mode, read_mode(env));
set_reference_mode_unsigned_eq(mode, read_mode(env));
}