[llvm-commits] Patch to add flag in llvm-extract for including aliases in the extraction.

Jan Sjodin jan_sjodin at yahoo.com
Tue Nov 6 05:58:49 PST 2012


>> My original task was to split a module into individual functions and global variables. The question was where should the aliases go? I chose to bundle them with the aliasees. I have written a separate tool that does everything in one go, but that is another story. If the -alias is enough for most people I think we can skip adding the -with-aliases. The question is if "convenience options" like, -with-aliases, belong in the llvm-extract tool, or if that is supposed to be done externally?

>
>I see. So I assume you want to do something like
>
>for every function and global variables S:
>llvm-extract .. --with-alias
>

Yes, that was what I had in mind.


>An interesting problem is what do you do with aliases to external
>symbols. Since you are splitting everything, doesn't it make sense to
>put each alias in its own file or maybe a all-aliases.ll?

Yes, that would perhaps be useful for aliases to external symbols. In my case they don't exist, but maybe other people might find it useful.


Ideally I would want a small set of carefully designed options, which would enable many ways of extraction by combining them,  


- Jan




More information about the llvm-commits mailing list