[llvm] [CycleInfo] Store blocks using Euler tour representation (PR #208614)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 10 09:41:11 PDT 2026
================
@@ -79,13 +82,16 @@ template <typename ContextT> class GenericCycle {
/// always have the same depth.
unsigned Depth = 0;
+ /// The cycle info that owns this cycle. Used by contains(BlockT*).
+ const GenericCycleInfo<ContextT> *CI = nullptr;
----------------
MaskRay wrote:
There are many direct and transitive callers
- Direct: blocks() / block_begin() / block_end() (read CI->BlockLayout), contains(const BlockT*) (CI->getCycle).
- Transitive (call the above internally): getExitBlocks, getExitingBlocks, getCyclePredecessor, getCyclePreheader, print, verifyCycle/verifyCycleNest.
I don't think it's feasible to add the `CI` parameter in this PR.
https://github.com/llvm/llvm-project/pull/208614
More information about the llvm-commits
mailing list