[LLVMdev] Disjoint types after reading several modules
hammacher at cs.uni-saarland.de
Thu Feb 2 06:35:46 PST 2012
On 2/2/12 2:32 PM, Duncan Sands wrote:
> On 02/02/12 14:25, Clemens Hammacher wrote:
>> On 2/2/12 1:51 PM, Duncan Sands wrote:
>>> what do you mean by "copied over to the main module"? If you want to add
>>> additional IR to the main module then you should link it in using the
>> I think that the linker would indeed be able to remap the types
>> correctly, but
>> the main obstacle here is that we only copy individual functions.
>> Maybe it would
>> be possible to first copy the function into a new module, and then
>> link this
>> into the main module, but then again the question is how to correctly
>> copy the
>> function to the temporary module ;)
Ah, thanks, I didn't know that tool.
But I don't think it's applicable here. It's a command-line tool which
removes all global values and functions which were not explicitely
stated on the command line, and then dumps the remaining module.
Are you proposing to
- compute the set of referenced global values and functions from the
- write the working module to the disk
- run llvm-extract
- read the extracted module
- use the linker to link it into the main module?
Then I think it's easier to use our current implementation, and just fix
the issue with the duplicated types.
Sorry if I misunderstood your suggestion.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 6392 bytes
Desc: S/MIME Cryptographic Signature
More information about the llvm-dev