Don't internalize all but main by default.

This is mostly a cleanup, but it changes a fairly old behavior.

Every "real" LTO user was already disabling the silly internalize pass
and creating the internalize pass itself. The difference with this
patch is for "opt -std-link-opts" and the C api.

Now to get a usable behavior out of opt one doesn't need the funny
looking command line:

opt -internalize -disable-internalize -internalize-public-api-list=foo,bar -std-link-opts

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214919 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2014-08-05 20:10:38 +00:00
parent 936a1b573b
commit 0ca286752e
6 changed files with 7 additions and 35 deletions

View File

@@ -108,10 +108,6 @@ static cl::opt<bool>
DisableOptimizations("disable-opt",
cl::desc("Do not run any optimization passes"));
static cl::opt<bool>
DisableInternalize("disable-internalize",
cl::desc("Do not mark all symbols as internal"));
static cl::opt<bool>
StandardCompileOpts("std-compile-opts",
cl::desc("Include the standard compile time optimizations"));
@@ -271,8 +267,7 @@ static void AddStandardLinkPasses(PassManagerBase &PM) {
if (DisableOptimizations) return;
PassManagerBuilder Builder;
Builder.populateLTOPassManager(PM, /*Internalize=*/ !DisableInternalize,
/*RunInliner=*/ !DisableInline);
Builder.populateLTOPassManager(PM, /*RunInliner=*/!DisableInline, false);
}
//===----------------------------------------------------------------------===//