[PATCH] D112696: CycleInfo: Introduce cycles as a generalization of loops
Sameer Sahasrabuddhe via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 28 02:19:23 PDT 2021
sameerds created this revision.
Herald added subscribers: dexonsmith, pengfei, hiraditya, mgorny.
sameerds requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
LLVM loops cannot represent irreducible structures in the CFG. This
change introduce the concept of cycles as a generalization loops,
along with a CycleInfo analysis that discover a nested
hierarchy of such cycles. This is based on Havlak (1997), Nesting of
Reducible and Irreducible Loops.
The cycle analysis is implemented as a generic template and then
instatiated for LLVM IR and Machine IR. The template relies on a new
GenericSsaContext template which must be specialized when used for
each IR.
This review is a restart of an older review request:
https://reviews.llvm.org/D83094
Original implementation by Nicolai Hähnle <nicolai.haehnle at amd.com>,
with recent refactoring by Sameer Sahasrabuddhe <sameer.sahasrabuddhe at amd.com>
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D112696
Files:
llvm/docs/CycleTerminology.rst
llvm/docs/UserGuides.rst
llvm/include/llvm/ADT/GenericCycleImpl.h
llvm/include/llvm/ADT/GenericCycleInfo.h
llvm/include/llvm/ADT/GenericSsaContext.h
llvm/include/llvm/Analysis/CycleAnalysis.h
llvm/include/llvm/CodeGen/MachineCycleAnalysis.h
llvm/include/llvm/CodeGen/MachinePassRegistry.def
llvm/include/llvm/CodeGen/MachineSsaContext.h
llvm/include/llvm/IR/SsaContext.h
llvm/include/llvm/InitializePasses.h
llvm/lib/Analysis/Analysis.cpp
llvm/lib/Analysis/CMakeLists.txt
llvm/lib/Analysis/CycleAnalysis.cpp
llvm/lib/CodeGen/CMakeLists.txt
llvm/lib/CodeGen/CodeGen.cpp
llvm/lib/CodeGen/MachineCycleAnalysis.cpp
llvm/lib/CodeGen/MachineSsaContext.cpp
llvm/lib/IR/CMakeLists.txt
llvm/lib/IR/SsaContext.cpp
llvm/lib/Passes/PassBuilder.cpp
llvm/lib/Passes/PassRegistry.def
llvm/test/Analysis/CycleInfo/basic.ll
llvm/test/CodeGen/X86/cycle-info.mir
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112696.382956.patch
Type: text/x-patch
Size: 80484 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211028/cee9b6ad/attachment-0001.bin>
More information about the llvm-commits
mailing list