summaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/CycleAnalysis.cpp
AgeCommit message (Collapse)Author
2025-04-21[LLVM] Cleanup pass initialization for Analysis passes (#135858)Rahul Joshi
- Do not call pass initialization from pass constructors. - Instead, pass initialization should happen in the `initializeAnalysis` function. - https://github.com/llvm/llvm-project/issues/111767
2024-11-05[Analysis] Remove unused includes (NFC) (#114936)Kazu Hirata
Identified with misc-include-cleaner.
2024-08-20Reapply "[CycleAnalysis] Methods to verify cycles and their nesting. (#102300)"Sameer Sahasrabuddhe
This reverts commit 4aacc60fe7e1f7b3f788bba8382ea1fa5189ef3b. The original implementation provided a simple method to check whether the forest of nested cycles is well-formed. This is now augmented with other methods to check well-formedness of every cycle, either individually, or as the entire forest. These will be used by future transforms that modify CycleInfo.
2024-08-20Revert "[CycleAnalysis] Methods to verify cycles and their nesting. (#102300)"Sameer Sahasrabuddhe
This reverts commit b432afc28406b670a58933c2fe56c73e6f85911e. Reverted due to linker failures in expensive-checks.
2024-08-20[CycleAnalysis] Methods to verify cycles and their nesting. (#102300)Sameer Sahasrabuddhe
The original implementation provided a simple method to check whether the forest of nested cycles is well-formed. This is now augmented with other methods to check well-formedness of all cycles, either invdividually, or as the entire forest. These will be used by future transforms that modify CycleInfo.
2024-06-21[llvm] format and terminate namespaces with closing comment (#94917)Mohammed Keyvanzadeh
Namespaces are terminated with a closing comment in the majority of the codebase so do the same here for consistency. Also format code within some namespaces to make clang-format happy.
2023-07-12[RFC] Introduce convergence control intrinsicsSameer Sahasrabuddhe
This is a reboot of the original design and implementation by Nicolai Haehnle <nicolai.haehnle@amd.com>: https://reviews.llvm.org/D85603 This change also obsoletes an earlier attempt at restarting the work on convergence tokens: https://reviews.llvm.org/D104504 Changes relative to D85603: 1. Clean up the definition of a "convergent operation", a convergent call and convergent function. 2. Clean up the relationship between dynamic instances, sets of threads and convergence tokens. 3. Redistribute the formal rules into the definitions of the convergence intrinsics. 4. Expand on the semantics of entering a function from outside LLVM, and the environment-defined outcome of the entry intrinsic. 5. Replace the term "cycle" with "closed path". The static rules are defined in terms of closed paths, and then a relation is established with cycles. 6. Specify that if a function contains a controlled convergent operation, then all convergent operations in that function must be controlled. 7. Describe an optional procedure to infer tokens for uncontrolled convergent operations. 8. Introduce controlled maximal convergence-before and controlled m-converged property as an update to the original properties in UniformityAnalysis. 9. Additional constraint that a cycle heart can only occur in the header of a reducible cycle (natural loop). Reviewed By: nhaehnle Differential Revision: https://reviews.llvm.org/D147116
2022-03-01Cleanup includes: LLVMAnalysisserge-sans-paille
Number of lines output by preprocessor: before: 1065940348 after: 1065307662 Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-cleanup Differential Revision: https://reviews.llvm.org/D120659
2021-12-10Reapply CycleInfo: Introduce cycles as a generalization of loopsSameer Sahasrabuddhe
Reverts 02940d6d2202. Fixes breakage in the modules build. 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@amd.com>, with recent refactoring by Sameer Sahasrabuddhe <sameer.sahasrabuddhe@amd.com> Differential Revision: https://reviews.llvm.org/D112696
2021-12-07Revert "CycleInfo: Introduce cycles as a generalization of loops"Jonas Devlieghere
This reverts commit 0fe61ecc2cef333250a152cd90d80d0b802b27db because it breaks the modules build. https://green.lab.llvm.org/green/job/clang-stage2-rthinlto/4858/ https://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/39112/
2021-12-07CycleInfo: Introduce cycles as a generalization of loopsSameer Sahasrabuddhe
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@amd.com>, with recent refactoring by Sameer Sahasrabuddhe <sameer.sahasrabuddhe@amd.com> Differential Revision: https://reviews.llvm.org/D112696