[all-commits] [llvm/llvm-project] 0fe61e: CycleInfo: Introduce cycles as a generalization of...

Sameer Sahasrabuddhe via All-commits all-commits at lists.llvm.org
Mon Dec 6 22:36:45 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0fe61ecc2cef333250a152cd90d80d0b802b27db
      https://github.com/llvm/llvm-project/commit/0fe61ecc2cef333250a152cd90d80d0b802b27db
  Author: Sameer Sahasrabuddhe <sameer.sahasrabuddhe at amd.com>
  Date:   2021-12-07 (Tue, 07 Dec 2021)

  Changed paths:
    A llvm/docs/CycleTerminology.rst
    M llvm/docs/UserGuides.rst
    A llvm/docs/cycle-1.png
    A llvm/docs/cycle-2.png
    A llvm/docs/cycle-3.png
    A llvm/include/llvm/ADT/GenericCycleImpl.h
    A llvm/include/llvm/ADT/GenericCycleInfo.h
    A llvm/include/llvm/ADT/GenericSSAContext.h
    A llvm/include/llvm/Analysis/CycleAnalysis.h
    A llvm/include/llvm/CodeGen/MachineCycleAnalysis.h
    M llvm/include/llvm/CodeGen/MachinePassRegistry.def
    A llvm/include/llvm/CodeGen/MachineSSAContext.h
    A llvm/include/llvm/IR/SSAContext.h
    M llvm/include/llvm/InitializePasses.h
    M llvm/lib/Analysis/Analysis.cpp
    M llvm/lib/Analysis/CMakeLists.txt
    A llvm/lib/Analysis/CycleAnalysis.cpp
    M llvm/lib/CodeGen/CMakeLists.txt
    M llvm/lib/CodeGen/CodeGen.cpp
    A llvm/lib/CodeGen/MachineCycleAnalysis.cpp
    A llvm/lib/CodeGen/MachineSSAContext.cpp
    M llvm/lib/IR/CMakeLists.txt
    A llvm/lib/IR/SSAContext.cpp
    M llvm/lib/Passes/PassBuilder.cpp
    M llvm/lib/Passes/PassRegistry.def
    A llvm/test/Analysis/CycleInfo/basic.ll
    A llvm/test/CodeGen/X86/cycle-info.mir

  Log Message:
  -----------
  CycleInfo: Introduce cycles as a generalization of loops

LLVM loops cannot represent irreducible structures in the CFG. This
change introduce the concept of cycles as a generalization of loops,
along with a CycleInfo analysis that discovers 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>

Differential Revision: https://reviews.llvm.org/D112696




More information about the All-commits mailing list