Setting how aggressive the inliner is in 2.1

Is there a way to set how aggressive the inliner pass (createFunctionInliningPass) without going through the command line interface?

Is there any reason InlineLimit isn't an argument to the createFunctionInliningPass function?

Thanks,
Robert

Is there a way to set how aggressive the inliner pass
(createFunctionInliningPass) without going through the command line
interface?

Nope. Well, you could call cl::ParseCommandLine yourself (passing in a static array) like llvm-gcc does, but other than that "no".

Is there any reason InlineLimit isn't an argument to the
createFunctionInliningPass function?

Nope :). That would be a great enhancement.

-Chris

I think this will do the trick:

inliner.patch (2.59 KB)

Looks good. I capitalized 'threshold' and wrapped a long line:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20080107/057129.html

Thanks!

-Chris