mgcarrasco wrote: LGTM, left some minor comments. Maybe we could merge https://github.com/llvm/llvm-project/pull/211638 first so the helper for the scope caching is available (left also a comment about it in #211638). https://github.com/llvm/llvm-project/pull/211883