Loading a constant address is really big/slow. Chaining branches would make the pass significantly more complicated… if the function is just slightly larger than the distance limit for small branches, it’s not a big deal, but extending it to larger functions becomes hard to reason about.
I would lean towards making the estimate more conservative. And also maybe add some kind of size assertion to the backend so that we can catch cases where our size estimate is wrong even if ARMConstantIslands doesn’t actually care. It doesn’t really matter if we’re conservative: spilling LR isn’t that expensive. We just don’t want to do it for tiny leaf functions. And with a better assertion, I think we could sort out any remaining issues pretty quickly.