[PATCH] D126800: Write output sections in parallel

Michael Eisel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 8 07:49:44 PDT 2022


michaeleisel added a comment.

@thakis how would #1 look exactly? For example, in `StubsSection::writeTo`, it appears to end up in `inline void writeStub(uint8_t *buf8, const uint32_t stubCode[3], const macho::Symbol &sym)`, which calls `encodePage21`, which calls `checkInt`. Would we make a separate version of `encodePage21` and duplicate the logic, where this new version takes a mutex and a vector along with the usual arguments, and instead of calling normal `checkInt`, it calls our own version that would insert into the vector? Do we duplicate the logic of `reportRangeError`? And would our vector also store the type of message reported, whether it was a warning, error, etc.? What about for fatals, if we happen to find any of those, should we in that case terminate early, and if so, how would that work? With these questions in mind (assuming you don't have some other idea in mind of how to do this), I'm curious what your objections to #2 would be. Also, it seems like #2 would be helpful in any future cases where we want deterministic logging from concurrent tasks, such as if file loading is parallelized.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D126800/new/

https://reviews.llvm.org/D126800



More information about the llvm-commits mailing list