This is the mail archive of the
mailing list for the GCC project.
Re: VLIW scheduling and delayed branch
> When do you un-parallel those instructions? And, how?
I don't; I use a C function to output such an insn group.
In that C function, I basically save the global state of final, and use
functions of final.c to output constitutent insns.
The insn group output function basically looks like this:
static char buf;
/* open memory file */
old_out_file = asm_out_file;
asm_out_file = fmemopen (buf, sizeof(buf), "w");
then loop over all constitutent insns:
if (! constrain_operands_cached (1))
current_output_insn = insn;
/* Find the proper template for this insn. */
template = get_insn_template (insn_code_number, insn);
gcc_assert (!(template == '#' && template == '\0'));
fprintf (asm_out_file, "\t||");
output_asm_insn (template, recog_data.operand);
fseek (asm_out_file, ftell (asm_out_file) - 1, SEEK_SET);
asm_out_file = old_out_file;
That's why I wrote it's kind of hackish :-) fmemopen also isn't
necessarily very portable, but is needed since all the final output
routines directly output to a FILE *, and I need to intercept that