[llvm-commits] CVS: llvm/tools/gccld/GenerateCode.cpp
Chris Lattner
lattner at cs.uiuc.edu
Fri Oct 24 13:10:03 PDT 2003
Changes in directory llvm/tools/gccld:
GenerateCode.cpp updated: 1.10 -> 1.11
---
Log message:
Turn on the inliner by default at link-time
---
Diffs of the changes: (+10 -0)
Index: llvm/tools/gccld/GenerateCode.cpp
diff -u llvm/tools/gccld/GenerateCode.cpp:1.10 llvm/tools/gccld/GenerateCode.cpp:1.11
--- llvm/tools/gccld/GenerateCode.cpp:1.10 Thu Oct 23 13:25:57 2003
+++ llvm/tools/gccld/GenerateCode.cpp Fri Oct 24 13:09:23 2003
@@ -22,6 +22,13 @@
#include "llvm/Transforms/Scalar.h"
#include "llvm/Transforms/Utils/Linker.h"
#include "Support/SystemUtils.h"
+#include "Support/CommandLine.h"
+
+namespace {
+ cl::opt<bool>
+ DisableInline("disable-inlining", cl::desc("Do not run the inliner pass"));
+}
+
/// GenerateBytecode - generates a bytecode file from the specified module.
///
@@ -73,6 +80,9 @@
// Remove unused arguments from functions...
Passes.add(createDeadArgEliminationPass());
+
+ if (!DisableInline)
+ Passes.add(createFunctionInliningPass()); // Inline small functions
// The FuncResolve pass may leave cruft around if functions were prototyped
// differently than they were defined. Remove this cruft.
More information about the llvm-commits
mailing list