Hi All,Is it possible to write a opt pass , which can run on one particular function( input from command line) in a module ? Thanks, Abhishek -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090313/53543741/attachment.html>
On Friday 13 March 2009 07:51:18 abhishek Singh wrote:> Hi All,Is it possible to write a opt pass , which can run on one particular > function( input from command line) in a module ?You can add a global variable to your module that consists of an array of strings. Each string is the name of a function your pass should optimize. Ciao, Duncan.
abhishek Singh wrote:> Hi All, > Is it possible to write a opt pass , which can run on one particular > function( input from command line) in a module ?Should be simple: add a command-line option for the pass name, and have the pass ignore any functions that don't have that name...
On Mar 13, 2009, at 1:36 AM, Duncan Sands wrote:> On Friday 13 March 2009 07:51:18 abhishek Singh wrote: >> Hi All,Is it possible to write a opt pass , which can run on one >> particular >> function( input from command line) in a module ? > > You can add a global variable to your module that consists > of an array of strings. Each string is the name of a function > your pass should optimize.You can also use the llvm-extract tool to split the one function you're interested out into its own module. -Chris