https://github.com/aengelke created https://github.com/llvm/llvm-project/pull/103400
Replace the DenseMap from blocks to their innermost loop a vector indexed by block numbers, when possible. This requires updating the loop info when blocks are renumbered. This update is currently implemented by iterating over all loops and their blocks, as there is no mapping from the previous block number to the block (as opposed to the dominator tree). This makes the update O(n^2) in the worst case: a block in a loop with nesting level x will be considered x times to determine the innermost loop. In practice, it should be acceptable, though (but probably not in the long run, O(n^2) algorithms are generally bad). NB: I'm generally not happy with the way loops are stored. As I think that there's room for improvement, I don't want to touch the representation at this point. I'm also considering to remove the number updating facility in favor of recomputing the analysis, it natural loop analysis isn't that expensive and it might give more freedom for data structure design to have a fixed numbering without needing to worry about numbering changes. _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits