[PATCH] D123995: [MachineSink] replace MachineLoop with MachineCycle
ChenZheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 19 03:53:10 PDT 2022
shchenz created this revision.
shchenz added reviewers: qcolombet, nikic, efriedma, MatzeB, jsji, sameerds.
Herald added subscribers: frasercrmck, dexonsmith, kerbowa, luismarques, apazos, sameer.abuasal, pengfei, s.egerton, Jim, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, hiraditya, jvesely, nemanjai.
Herald added a project: All.
shchenz requested review of this revision.
Herald added subscribers: llvm-commits, pcwang-thead, MaskRay.
Herald added a project: LLVM.
`MachineCycle` can handle irreducible loop. Natural loop analysis (`MachineLoop`) can not return correct loop depth if the loop is irreducible loop. And `MachineSink` is sensitive to the loop depth, see `MachineSinking::isProfitableToSinkTo()`.
In https://reviews.llvm.org/D120800, we prevent a sinking from shallower loop to deeper loop after checking irreducible cfg in the whole function.
This patch tries to use `MachineCycle` so that we can handle irreducible loop better.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D123995
Files:
llvm/include/llvm/ADT/GenericCycleImpl.h
llvm/include/llvm/ADT/GenericCycleInfo.h
llvm/include/llvm/CodeGen/MachineCycleAnalysis.h
llvm/lib/CodeGen/MachineCycleAnalysis.cpp
llvm/lib/CodeGen/MachineSink.cpp
llvm/test/CodeGen/AArch64/O3-pipeline.ll
llvm/test/CodeGen/AMDGPU/llc-pipeline.ll
llvm/test/CodeGen/ARM/O3-pipeline.ll
llvm/test/CodeGen/PowerPC/O3-pipeline.ll
llvm/test/CodeGen/RISCV/O3-pipeline.ll
llvm/test/CodeGen/X86/opt-pipeline.ll
llvm/test/CodeGen/X86/pr38795.ll
llvm/test/CodeGen/X86/x86-shrink-wrapping.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123995.423581.patch
Type: text/x-patch
Size: 32710 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220419/b55696f0/attachment.bin>
More information about the llvm-commits
mailing list