[LLVMdev] forcing two instructions to be together
resistor at mac.com
Tue Sep 17 15:52:25 PDT 2013
+the list again
On Sep 17, 2013, at 3:48 PM, reed kotler <rkotler at mips.com> wrote:
> On 09/17/2013 03:46 PM, Owen Anderson wrote:
>> On Sep 17, 2013, at 3:08 PM, reed kotler <rkotler at mips.com> wrote:
>>> Is there any way, except for using bundles, to force two instructions to be sequentially executed?
>> What level of codegen are you working at? There are various mechanisms that can be applied, depending on exactly what the constraints are that you need to preserve.
> I have two machine instructions that I need to be together.
> BuildMI(MBB, I, DL, TII.get(Mips::LiRxImmAlignX16), V0)
> .addExternalSymbol("_gp_disp", MipsII::MO_ABS_HI);
> BuildMI(MBB, I, DL, TII.get(Mips::AddiuRxPcImmX16), V1)
> .addExternalSymbol("_gp_disp", MipsII::MO_ABS_LO);
> It's in Mips16ISelDagToDag.cpp
> these two have to be together because they are both part of a complex pc relative calculation.
> I have not used bundles yet and was just looking for an easy way to join these two.
Bundles is one way you can go. Another is to use a pseudo instruction that is broken up immediately before (or during!) MC emission.
More information about the llvm-dev