Rail Shafigulin via llvm-dev
2015-Nov-17 21:30 UTC
[llvm-dev] DFAPacketzer, Hexagon and bundles with 1 instruction
I'm trying to figure out how Hexagon (I'm using it as an example for my own VLIW) is handling bundles with 1 instruction, but I don't quite get it. Here is the code that I have for a endPacket // endPacket - End the current packet, bundle packet instructions and reset // DFA state. void VLIWPacketizerList::endPacket(MachineBasicBlock *MBB, MachineInstr *MI) { if (CurrentPacketMIs.size() > 1) { MachineInstr *MIFirst = CurrentPacketMIs.front(); finalizeBundle(*MBB, MIFirst, MI); } CurrentPacketMIs.clear(); ResourceTracker->clearResources(); } Based on this, it looks like packets with one instruction are not finalized (finalizeBundle is the one which inserts a BUNDLE instruction). So what happens with packets that have only 1 instruction? Is there a separate pass that creates a bundle from a single instruction? Any help is appreciated. -- R -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151117/94bb9cda/attachment.html>
Krzysztof Parzyszek via llvm-dev
2015-Nov-17 21:35 UTC
[llvm-dev] DFAPacketzer, Hexagon and bundles with 1 instruction
On 11/17/2015 3:30 PM, Rail Shafigulin via llvm-dev wrote:> > Is there a separate pass that creates a bundle from a single instruction?No. An instruction on its own is equivalent to a bundle with that instruction only. Also, a BUNDLE must have at least 2 instructions. -Krzysztof -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
Rail Shafigulin via llvm-dev
2015-Nov-17 22:23 UTC
[llvm-dev] DFAPacketzer, Hexagon and bundles with 1 instruction
> No. An instruction on its own is equivalent to a bundle with that > instruction only. Also, a BUNDLE must have at least 2 instructions. > > -Krzysztof > > -- > Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted > by The Linux Foundation > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >I'm a little confused. If a bundle is supposed to have at least 2 instructions, what is the point of VLIWPacketzierList::isSoloInstruction(...)? Say we have an instruction that can't be bundled with anything, how would one form a packet from it? -- R -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151117/4f7dfdd7/attachment.html>