[llvm] r211595 - Pass a unique_ptr<MemoryBuffer> to the constructors in the Binary hierarchy.

Rafael EspĂ­ndola rafael.espindola at gmail.com
Fri Jul 4 15:40:33 PDT 2014


> I want to make sure we consolidate SourceMgr/SourceManager and similar code
> that might exist in other LLVM subprojects, instead of just adding a new one
> top-down.
>
> We're copying these files multiple times into memory, dozens of megabytes
> per compilation at times because of the basic limitation that these
> components are all trying to own the buffer and not able to share it beyond
> their own lifetime.
>
> It's going to take time to get this down and a lot of the requirements will
> be set by parallelisation of the compilation pipeline, in-memory operation
> etc. work that has barely begun in the 3.5 series.

OK, we are talking about different parts of the code. I was thinking
*only* on changing these object to not own the buffer, ever. That
looks like a much smaller part. I will take a quicik look to see how
hard that is.

BTW, do you have a pointer to places in the code where we copy the buffers?

Cheers,
Rafael



More information about the llvm-commits mailing list