[llvm-commits] CVS: llvm/lib/Transforms/IPO/FunctionInlining.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sat Jun 28 10:58:02 PDT 2003
Changes in directory llvm/lib/Transforms/IPO:
FunctionInlining.cpp updated: 1.45 -> 1.46
---
Log message:
Allow the inlining limit to be controlled from the command line!
---
Diffs of the changes:
Index: llvm/lib/Transforms/IPO/FunctionInlining.cpp
diff -u llvm/lib/Transforms/IPO/FunctionInlining.cpp:1.45 llvm/lib/Transforms/IPO/FunctionInlining.cpp:1.46
--- llvm/lib/Transforms/IPO/FunctionInlining.cpp:1.45 Thu May 29 10:11:31 2003
+++ llvm/lib/Transforms/IPO/FunctionInlining.cpp Sat Jun 28 10:57:04 2003
@@ -11,10 +11,14 @@
#include "llvm/iOther.h"
#include "llvm/iMemory.h"
#include "Support/Statistic.h"
+#include "Support/CommandLine.h"
#include <set>
namespace {
Statistic<> NumInlined("inline", "Number of functions inlined");
+ cl::opt<unsigned> // FIXME: 200 is VERY conservative
+ InlineLimit("inline-threshold", cl::Hidden, cl::init(200),
+ cl::desc("Control the amount of inlining to perform (default = 200)"));
struct FunctionInlining : public Pass {
virtual bool run(Module &M) {
@@ -55,7 +59,7 @@
// inliner is. If this value is negative after the final computation,
// inlining is not performed.
//
- int InlineQuality = 200; // FIXME: This is VERY conservative
+ int InlineQuality = InlineLimit;
// If there is only one call of the function, and it has internal linkage,
// make it almost guaranteed to be inlined.
More information about the llvm-commits
mailing list