forcing two instructions to be together

Is there any way, except for using bundles, to force two instructions to be sequentially executed?

TIA.

Reed

+the list again

I just tried this but something is wrong here. Well, I have not used bundles at all.
I just know how they work conceptually. This compiled okay but I got some constraint
errors.

   MIBundleBuilder(MBB, I)
     .append(BuildMI(MF, DL, TII.get(Mips::LiRxImmAlignX16), V0)
         .addExternalSymbol("_gp_disp", MipsII::MO_ABS_HI))
     .append(BuildMI(MF, DL, TII.get(Mips::AddiuRxPcImmX16), V1)
         .addExternalSymbol("_gp_disp", MipsII::MO_ABS_LO));

Reed,
Couldn't you also use instruction scheduling classes and specify that the second instruction has a bypass from the first instruction? The scheduler should always schedule them together in that case.

Micah

Reed,
  Couldn't you also use instruction scheduling classes and specify that the second instruction has a bypass from the first instruction? The scheduler should always schedule them together in that case.

Micah

I'm not sure exactly what you mean.

Can you point me to an example of that?

TIA.

Reed

I used the A9 schedule as an example:
http://llvm.org/svn/llvm-project/llvm/trunk/lib/Target/ARM/ARMScheduleA9.td

The documentation could use more clarity, but this is how I was able to do it to always get two specific instructions to be scheduled together.

That doesn't actually give you a guarantee that they won't be split up. Phases other than the scheduler may insert instructions in the middle of block (constant island pass, for example). Pseudo-instructions are the canonical answer to that problem.

--Owen

That doesn't actually give you a guarantee that they won't be split up. Phases other than the scheduler may insert instructions in the middle of block (constant island pass, for example). Pseudo-instructions are the canonical answer to that problem.

I ended up using a pseudo.

I tried to use bundles but I'm in a hurry and they were causing some problem in the code generator that was not obvious to me. It's possible that in the exact place I was using them they are not allowed or there is some special rule.