How to use the VLIW Packetizer

Hello All,

I have read the documentation, but it is not clear to me how can I use the LLVM VLIW Packetizer to generate packets (or bundles) of independent instructions for VLIW architectures. Is it a pass for IR code or how can I use this feature? How can I specify the characteristics of the target VLIW architecture e.g. number of functional units available?

Is there an example or more documentation where I can learn how to use this feature?

Best Regards,
Raul

I have read the documentation, but it is not clear to me how can I use the

LLVM VLIW Packetizer to generate packets (or bundles) of independent
instructions for VLIW architectures. Is it a pass for IR code or how can
I use this feature? How can I specify the characteristics of the target
VLIW architecture e.g. number of functional units available?

Is there an example or more documentation where I can learn how to use
this feature?

‚ÄčI guess you already read the document [1]? The example I know of is test
case and source code itself.
Please read HexagonVLIWPacketizer.cpp [2], play with some test cases under
test/CodeGen/Hexagon,
say cext-valid-packet1.ll, to see how things go.

[1] http://llvm.org/docs/CodeGenerator.html#vliw-packetizer
[2] http://llvm.org/doxygen/HexagonVLIWPacketizer_8cpp_source.html

HTH,
chenwj