mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-11 21:45:16 +00:00
Turn on the inliner by default at link-time
llvm-svn: 9477
This commit is contained in:
parent
f46676ef55
commit
bc9bb8e370
@ -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.
|
||||
///
|
||||
@ -74,6 +81,9 @@ GenerateBytecode (Module *M, bool Strip, bool Internalize, std::ostream *Out) {
|
||||
// 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.
|
||||
Passes.add(createInstructionCombiningPass());
|
||||
|
Loading…
Reference in New Issue
Block a user