Mircea Trofin via llvm-dev
2021-Feb-17 17:35 UTC
[llvm-dev] Tool to reduce a module to just (one/more) function
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>
Johannes Doerfert via llvm-dev
2021-Feb-17 18:45 UTC
[llvm-dev] Tool to reduce a module to just (one/more) function
llvm-extract? On 2/17/21 11:35 AM, Mircea Trofin via llvm-dev wrote:> 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! > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev