[llvm] [AsmParser] Don't require value numbers to be consecutive (PR #78171)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 17 02:42:45 PST 2024


nikic wrote:

> I've kept the underlying representation the same and added a guard against skipping large ranges to guard against degenerate cases where the NumberedVals vector would become huge. If people prefer, I could change NumberedVals from a vector to a map + a counter instead, in which case we could support arbitrary numbers without large increases in memory usage.

I went ahead and did this. The restriction on value skipping seemed pretty odd, and I don't think we really care about the performance difference between using a vector and a map when it comes to IR parsing.

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


More information about the llvm-commits mailing list