[PATCH] D26778: Add llvm-modextract tool.

Mehdi AMINI via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 23 21:33:41 PST 2016


mehdi_amini added a comment.

In https://reviews.llvm.org/D26778#605103, @mehdi_amini wrote:

> LGTM.
>
> In https://reviews.llvm.org/D26778#605102, @pcc wrote:
>
> > > Could we have a cheap way to extract modules without parsing the IR?
> >
> > Most likely, but it would probably require a change to the bitcode format because we represent the VST offset as an offset from the start of the file rather than the start of the module.
>
>
> Right I think any relative offset should begin with the module block! I'm fine keeping this as future work.


Actually this is a problem and I think we should address it now.

The issue is that if we go with the current solution, we'll have to support "forever" the fact that a bitcode file with multiple module can have offset from the beginning of the file.
It seems to me that we have to first update the bitcode to make sure each offset start from the beginning of the module.


https://reviews.llvm.org/D26778





More information about the llvm-commits mailing list