The limit in current implementation of jump table analysis causes some
jump tables, or parts of a jump table to be mishandled. Optimizing
functions pointing to/pointed by such jump table lead to incorrect
binaries. Therefore, some efforts are needed to handle such unclaimed
relocations.
The main idea is (a) finding the jump table base potentially associated
to the unclaimed relocation, and (b) conservatively ignoring functions
pointing to/pointed by such possible jump table entry.
To avoid skipping many unrelated functions, we only process potential
entries within a range from the jump table base.
Test Plan:
ninja check-bolt
LLVM doesn't like really unordered_set because it is expensive. Maybe you like some of the alternatives that LLVM offers:
https://llvm.org/docs/ProgrammersManual.html#set-like-containers-std-set-smallset-setvector-etc