[LLVMdev] Merging Modules (original) (raw)

Redmond, Paul paul.redmond at intel.com
Mon Sep 12 17:38:04 PDT 2011


Thanks for the advice. Using Linker and CloneModule seems to suit my needs perfectly.

From: Nick Lewycky [mailto:nlewycky at google.com] Sent: Thursday, September 08, 2011 2:45 PM To: Devang Patel Cc: Redmond, Paul; llvmdev at cs.uiuc.edu Subject: Re: [LLVMdev] Merging Modules

On 8 September 2011 10:57, Devang Patel <dpatel at apple.com<mailto:dpatel at apple.com>> wrote: Hi Paul,

On Sep 8, 2011, at 10:52 AM, Redmond, Paul wrote:

Hi,

Can anyone point me to some code (or offer advice) on how I can merge one Module into another?

I have a list of Modules each containing one Function. I would like to combine them all into one monolithic Module before transforming and optimizing (The original Modules must remain unmodified)

See Linker::LinkModules(..).

Mm, I think LinkModules is destructive to one of its input modules. Try CloneFunction http://llvm.org/doxygen/namespacellvm.html#aabb040f50a7e75ad8d58bfc5d95636a4 maybe?


LLVM Developers mailing list LLVMdev at cs.uiuc.edu<mailto:LLVMdev at cs.uiuc.edu> http://llvm.cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110912/a9918fba/attachment.html>



More information about the llvm-dev mailing list