[PATCH] D118076: Sinking or hoisting instructions between loops before fusion

Aaron K via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 24 13:46:20 PST 2022


aaronkintel created this revision.
aaronkintel added reviewers: TaWeiTu, kazu.
aaronkintel added a project: LLVM.
Herald added a subscriber: hiraditya.
aaronkintel requested review of this revision.
Herald added a subscriber: llvm-commits.

Instructions between two adjacent loops will be hoisted above the first loop, or sunk below the second to facilitate loop fusion. Hoisting will be attempted an instruction that dominates the first loop. Otherwise, sinking this instructions will be attempted.

Instructions with side effects will not be considered for sinking or hoisting. Hoisting/sinking of any instructions between loops will only be performed if all the instructions can be moved. As well, sinking/hoisting is considered for each instruction in isolation, without taking into account sinking/hoisting decisions for other instructions in the preheader.


https://reviews.llvm.org/D118076

Files:
  llvm/lib/Transforms/Scalar/LoopFuse.cpp
  llvm/test/Transforms/LoopFusion/hoist_preheader.ll
  llvm/test/Transforms/LoopFusion/no_sink_hoist.ll
  llvm/test/Transforms/LoopFusion/simple.ll
  llvm/test/Transforms/LoopFusion/sink_preheader.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118076.402651.patch
Type: text/x-patch
Size: 15252 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220124/61243ece/attachment.bin>


More information about the llvm-commits mailing list