Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/compile: numberLines SSA pass does not handle inlining well #29279
This is currently causing toolspeed pain; allocating those sparsemaps accounts for ~17% of the allocated space when compiling the ssa package. (The ssa package has many long files with many functions that inline functions with small line numbers.) Related: #27739.
(This also makes me nervous about whether we're correctly handling one function that inlines another when both functions happen to occupy the same line numbers, but in different files. I assume @dr2chase can speak to that without having to go spelunking.)
I don't know what the correct fix is, but we remove the implicit assumption that the line numbers involved in a function are dense.
Marking as Go 1.12 to match #27739, but it seems to me that we can probably push to 1.13.