OSDN Git Service

MachinePipeliner pass that implements Swing Modulo Scheduling
authorBrendon Cahoon <bcahoon@codeaurora.org>
Fri, 29 Jul 2016 16:44:44 +0000 (16:44 +0000)
committerBrendon Cahoon <bcahoon@codeaurora.org>
Fri, 29 Jul 2016 16:44:44 +0000 (16:44 +0000)
commitc1359c9fbb9718bce8dca9910295b5be3b9e3ea7
tree850515529853eab32b524882b6bf7314e137d080
parenta6ad276d07833f6fa12b81d43f4c6bed67ce59ed
MachinePipeliner pass that implements Swing Modulo Scheduling

Software pipelining is an optimization for improving ILP by
overlapping loop iterations. Swing Modulo Scheduling (SMS) is
an implementation of software pipelining that attempts to
reduce register pressure and generate efficient pipelines with
a low compile-time cost.

This implementaion of SMS is a target-independent back-end pass.
When enabled, the pass should run just prior to the register
allocation pass, while the machine IR is in SSA form. If the pass
is successful, then the original loop is replaced by the optimized
loop. The optimized loop contains one or more prolog blocks, the
pipelined kernel, and one or more epilog blocks.

This pass is enabled for Hexagon only. To enable for other targets,
a couple of target specific hooks must be implemented, and the
pass needs to be called from the target's TargetMachine
implementation.

Differential Review: http://reviews.llvm.org/D16829

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277169 91177308-0d34-0410-b5e6-96231b3b80d8
21 files changed:
include/llvm/CodeGen/Passes.h
include/llvm/InitializePasses.h
include/llvm/Target/TargetInstrInfo.h
lib/CodeGen/CMakeLists.txt
lib/CodeGen/CodeGen.cpp
lib/CodeGen/MachinePipeliner.cpp [new file with mode: 0644]
lib/Target/Hexagon/HexagonInstrInfo.cpp
lib/Target/Hexagon/HexagonInstrInfo.h
lib/Target/Hexagon/HexagonTargetMachine.cpp
test/CodeGen/Hexagon/bit-gen-rseq.ll
test/CodeGen/Hexagon/hwloop1.ll
test/CodeGen/Hexagon/swp-const-tc.ll [new file with mode: 0644]
test/CodeGen/Hexagon/swp-dag-phi.ll [new file with mode: 0644]
test/CodeGen/Hexagon/swp-epilog-reuse.ll [new file with mode: 0644]
test/CodeGen/Hexagon/swp-matmul-bitext.ll [new file with mode: 0644]
test/CodeGen/Hexagon/swp-max.ll [new file with mode: 0644]
test/CodeGen/Hexagon/swp-multi-loops.ll [new file with mode: 0644]
test/CodeGen/Hexagon/swp-vect-dotprod.ll [new file with mode: 0644]
test/CodeGen/Hexagon/swp-vmult.ll [new file with mode: 0644]
test/CodeGen/Hexagon/swp-vsum.ll [new file with mode: 0644]
test/CodeGen/Hexagon/v60-cur.ll