[llvm] [LoopSafetyInfo] Compute block colors lazily (NFC) (PR #221954)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 9 00:31:46 PDT 2026


nikic wrote:

> If this continues to be an issue, we could write code to color a loop without coloring the whole function. It's basically the same algorithm as colorEHFunclets(), just starting from the loop header instead of the function entry block, and ignoring any exit blocks.

I think LICM actually needs block colors for loop exit blocks for sinking. For generally yes, something like that should be possible.

https://github.com/llvm/llvm-project/pull/221954


More information about the llvm-commits mailing list