Our compact unwind handling code currently has some logic to locate a
symbol at a given offset in an InputSection. The EH frame code will need
to do something similar, so let's factor out the code.
Details
Details
- Reviewers
thakis - Group Reviewers
Restricted Project - Commits
- rGda6b6b3c8201: [lld-macho][nfc] Factor out findSymbolAtOffset
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Do you see a speedup from the microoptimization in some other benchmark? If not, omit it (?)
lld/MachO/InputFiles.cpp | ||
---|---|---|
1020 | Previously we advanced it instead of doing it = isec->relocs.erase(it) if nothing was found. The rhs doesn't do that. Is that intentional? |
Comment Actions
Yeah I don't see any benchmark improvement... I guess it's not worth the additional code complexity
lld/MachO/InputFiles.cpp | ||
---|---|---|
1020 | oops, good catch |
lld/MachO/InputFiles.cpp | ||
---|---|---|
1020 | I think erasing it might actually make more sense, but I'll revisit this in a future diff. this one is supposed to be a NFC |
Previously we advanced it instead of doing it = isec->relocs.erase(it) if nothing was found. The rhs doesn't do that. Is that intentional?