[PATCH] D88126: [Machinesink] add more profitable pattern if target bb register pressure is not too high

ChenZheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 22 18:09:25 PDT 2020


shchenz created this revision.
shchenz added reviewers: qcolombet, MatzeB, efriedma, PowerPC.
Herald added subscribers: llvm-commits, arphaman, hiraditya, nemanjai.
Herald added a project: LLVM.
shchenz requested review of this revision.

This is split from https://reviews.llvm.org/D86925

Per @qcolombet comments, if the instruction's operand is defined inside the loop, we should not treat it as profitable directly in D86925 <https://reviews.llvm.org/D86925>. https://reviews.llvm.org/D86925#2271795

This patch handles this pattern for some cases. If the operand is defined inside the loop, but the target bb's register pressure is not too high, we still treat this sinking as profitable. Because move the def down will make some variables live interval smaller.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D88126

Files:
  llvm/lib/CodeGen/MachineSink.cpp
  llvm/test/CodeGen/PowerPC/sink-down-more-instructions-1.mir
  llvm/test/CodeGen/PowerPC/sink-down-more-instructions-regpressure-high.mir
  llvm/test/CodeGen/X86/2007-01-13-StackPtrIndex.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88126.293608.patch
Type: text/x-patch
Size: 54400 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200923/6c30660f/attachment.bin>


More information about the llvm-commits mailing list