felipepiovezan wrote: > Would `llvm::MapVector` be overkill here? MapVector preserves insertion order. We actually _need_ to have sorted order here, as we want to call upper_bound on this data structure. https://github.com/llvm/llvm-project/pull/206986