[LLVMdev] Can WriteBitcodeToFile be parallelized?
Yuri
yuri at rawbw.com
Mon Mar 31 15:39:30 PDT 2014
On 03/31/2014 15:29, Nick Lewycky wrote:
> Note that we require the output to be deterministic, so what exactly
> would you be doing? Performing the write out to a memory buffer for
> each function, then another thread which passes through these memory
> buffers sequentially and issues the actual I/O calls?
If there are N CPUs, and the list of functions to be processed, one can
split the list in N roughly equal sublists, and process them separately
as much as possible. Then in the end merge the resulting code into one
block, and resolve the remaining inter-sublist relocation items. Same
with the DWARF part.
This can produce equivalent binaries if implemented correctly.
> I've never heard this proposed before. Are you interested in working
> on it?
I normally would have been interested, but have no time currently.
Yuri
More information about the llvm-dev
mailing list