[llvm-dev] Tool to reduce a module to just (one/more) function

Mircea Trofin via llvm-dev llvm-dev at lists.llvm.org
Wed Feb 17 09:35:12 PST 2021


Apologies if I'm missing something obvious - the TL;DR; is: do we have /
would folks find useful a tool that took a module and a function name and
produced a valid module with just that function in, the rest being deleted
- i.e. outright deleted if no internal calls, converted to a declaration
otherwise; their metadata, too.

My scenario is: large (think: thinlto backend) modules, and I want to focus
on comparing regalloc policies for just one. Both in the debugger, as well
as dbgs() debugging, would benefit from not having to care about
anything else than this one function - especially when considering looking
over a few subsequent function passes.

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210217/c4209042/attachment.html>


More information about the llvm-dev mailing list