[Hexagon] Subtarget feature to emit one instruction per packet
authorKrzysztof Parzyszek <kparzysz@codeaurora.org>
Mon, 12 Mar 2018 17:47:46 +0000 (17:47 +0000)
committerKrzysztof Parzyszek <kparzysz@codeaurora.org>
Mon, 12 Mar 2018 17:47:46 +0000 (17:47 +0000)
commit5d41cc19bd923f276ced246450e715e724349fa4
tree638362dd4b44080f7e28f7489783b3c9c78f5fa7
parent92e359ed676eaf738ad8d87a096f12a43e4aecdc
[Hexagon] Subtarget feature to emit one instruction per packet

This adds two features: "packets", and "nvj".

Enabling "packets" allows the compiler to generate instruction packets,
while disabling it will prevent it and disable all optimizations that
generate them. This feature is enabled by default on all subtargets.
The feature "nvj" allows the compiler to generate new-value jumps and it
implies "packets". It is enabled on all subtargets.

The exception is made for packets with endloop instructions, since they
require a certain minimum number of instructions in the packets to which
they apply. Disabling "packets" will not prevent hardware loops from
being generated.

llvm-svn: 327302
llvm/lib/Target/Hexagon/Hexagon.td
llvm/lib/Target/Hexagon/HexagonAsmPrinter.cpp
llvm/lib/Target/Hexagon/HexagonISelDAGToDAGHVX.cpp
llvm/lib/Target/Hexagon/HexagonNewValueJump.cpp
llvm/lib/Target/Hexagon/HexagonSubtarget.h
llvm/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp
llvm/test/CodeGen/Hexagon/no-packets-gather.ll [new file with mode: 0644]
llvm/test/CodeGen/Hexagon/no-packets.ll [new file with mode: 0644]