- unsigned op_code = get_code(buf);
- unsigned code = next_tag(buf);
- ir_op *op = (ir_op *)op_code;
-
- /* output the opcode-name */
- printf("%s", get_id_str(op->name));
-
- if (options & OPT_WITH_MODE) {
- if (next_tag(buf) != VLC_TAG_EMPTY) {
- unsigned mode_code = get_code(buf);
- ir_mode *mode = (ir_mode *)mode_code;
- printf("%s", get_mode_name(mode));
+ unsigned code;
+ unsigned op_code;
+ unsigned mode_code = 0;
+ long iconst;
+ void *attr = NULL;
+
+ code = next_tag(env->buf);
+ if (code == VLC_TAG_REF) { /* it's a REF */
+ code = get_code(env->buf);
+
+ /* dump the edge */
+ if (parent) {
+ int edge_mode = 0;
+ /*
+ * the mode of a Firm edge can be either computed from its target or
+ * from its source and position. We must take the second approach because
+ * we dont know the target here, it's a ref.
+ */
+ pattern_dump_edge(env->dmp, code, parent, position, edge_mode);
+ }
+
+ /* dump the node ref */
+ pattern_dump_ref(env->dmp, code);
+
+ return;
+ }
+
+ /* get the opcode */
+ op_code = get_code(env->buf);
+
+ /* get the mode if encoded */
+ if (env->options & OPT_WITH_MODE) {
+ if (next_tag(env->buf) != VLC_TAG_EMPTY) {
+ mode_code = get_code(env->buf);