mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-23 05:29:23 +00:00
This commit adds scoped noalias metadata. The primary motivations for this feature are: 1. To preserve noalias function attribute information when inlining 2. To provide the ability to model block-scope C99 restrict pointers Neither of these two abilities are added here, only the necessary infrastructure. In fact, there should be no change to existing functionality, only the addition of new features. The logic that converts noalias function parameters into this metadata during inlining will come in a follow-up commit. What is added here is the ability to generally specify noalias memory-access sets. Regarding the metadata, alias-analysis scopes are defined similar to TBAA nodes: !scope0 = metadata !{ metadata !"scope of foo()" } !scope1 = metadata !{ metadata !"scope 1", metadata !scope0 } !scope2 = metadata !{ metadata !"scope 2", metadata !scope0 } !scope3 = metadata !{ metadata !"scope 2.1", metadata !scope2 } !scope4 = metadata !{ metadata !"scope 2.2", metadata !scope2 } Loads and stores can be tagged with an alias-analysis scope, and also, with a noalias tag for a specific scope: ... = load %ptr1, !alias.scope !{ !scope1 } ... = load %ptr2, !alias.scope !{ !scope1, !scope2 }, !noalias !{ !scope1 } When evaluating an aliasing query, if one of the instructions is associated with an alias.scope id that is identical to the noalias scope associated with the other instruction, or is a descendant (in the scope hierarchy) of the noalias scope associated with the other instruction, then the two memory accesses are assumed not to alias. Note that is the first element of the scope metadata is a string, then it can be combined accross functions and translation units. The string can be replaced by a self-reference to create globally unqiue scope identifiers. [Note: This overview is slightly stylized, since the metadata nodes really need to just be numbers (!0 instead of !scope0), and the scope lists are also global unnamed metadata.] Existing noalias metadata in a callee is "cloned" for use by the inlined code. This is necessary because the aliasing scopes are unique to each call site (because of possible control dependencies on the aliasing properties). For example, consider a function: foo(noalias a, noalias b) { *a = *b; } that gets inlined into bar() { ... if (...) foo(a1, b1); ... if (...) foo(a2, b2); } -- now just because we know that a1 does not alias with b1 at the first call site, and a2 does not alias with b2 at the second call site, we cannot let inlining these functons have the metadata imply that a1 does not alias with b2. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213864 91177308-0d34-0410-b5e6-96231b3b80d8
466 lines
17 KiB
C++
466 lines
17 KiB
C++
//===- PassManagerBuilder.cpp - Build Standard Pass -----------------------===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file defines the PassManagerBuilder class, which is used to set up a
|
|
// "standard" optimization sequence suitable for languages like C and C++.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
#include "llvm/Transforms/IPO/PassManagerBuilder.h"
|
|
#include "llvm-c/Transforms/PassManagerBuilder.h"
|
|
#include "llvm/ADT/SmallVector.h"
|
|
#include "llvm/Analysis/Passes.h"
|
|
#include "llvm/IR/Verifier.h"
|
|
#include "llvm/PassManager.h"
|
|
#include "llvm/Support/CommandLine.h"
|
|
#include "llvm/Support/ManagedStatic.h"
|
|
#include "llvm/Target/TargetLibraryInfo.h"
|
|
#include "llvm/Transforms/IPO.h"
|
|
#include "llvm/Transforms/Scalar.h"
|
|
#include "llvm/Transforms/Vectorize.h"
|
|
|
|
using namespace llvm;
|
|
|
|
static cl::opt<bool>
|
|
RunLoopVectorization("vectorize-loops", cl::Hidden,
|
|
cl::desc("Run the Loop vectorization passes"));
|
|
|
|
static cl::opt<bool>
|
|
RunSLPVectorization("vectorize-slp", cl::Hidden,
|
|
cl::desc("Run the SLP vectorization passes"));
|
|
|
|
static cl::opt<bool>
|
|
RunBBVectorization("vectorize-slp-aggressive", cl::Hidden,
|
|
cl::desc("Run the BB vectorization passes"));
|
|
|
|
static cl::opt<bool>
|
|
UseGVNAfterVectorization("use-gvn-after-vectorization",
|
|
cl::init(false), cl::Hidden,
|
|
cl::desc("Run GVN instead of Early CSE after vectorization passes"));
|
|
|
|
static cl::opt<bool> UseNewSROA("use-new-sroa",
|
|
cl::init(true), cl::Hidden,
|
|
cl::desc("Enable the new, experimental SROA pass"));
|
|
|
|
static cl::opt<bool>
|
|
RunLoopRerolling("reroll-loops", cl::Hidden,
|
|
cl::desc("Run the loop rerolling pass"));
|
|
|
|
static cl::opt<bool> RunLoadCombine("combine-loads", cl::init(false),
|
|
cl::Hidden,
|
|
cl::desc("Run the load combining pass"));
|
|
|
|
PassManagerBuilder::PassManagerBuilder() {
|
|
OptLevel = 2;
|
|
SizeLevel = 0;
|
|
LibraryInfo = nullptr;
|
|
Inliner = nullptr;
|
|
DisableTailCalls = false;
|
|
DisableUnitAtATime = false;
|
|
DisableUnrollLoops = false;
|
|
BBVectorize = RunBBVectorization;
|
|
SLPVectorize = RunSLPVectorization;
|
|
LoopVectorize = RunLoopVectorization;
|
|
RerollLoops = RunLoopRerolling;
|
|
LoadCombine = RunLoadCombine;
|
|
}
|
|
|
|
PassManagerBuilder::~PassManagerBuilder() {
|
|
delete LibraryInfo;
|
|
delete Inliner;
|
|
}
|
|
|
|
/// Set of global extensions, automatically added as part of the standard set.
|
|
static ManagedStatic<SmallVector<std::pair<PassManagerBuilder::ExtensionPointTy,
|
|
PassManagerBuilder::ExtensionFn>, 8> > GlobalExtensions;
|
|
|
|
void PassManagerBuilder::addGlobalExtension(
|
|
PassManagerBuilder::ExtensionPointTy Ty,
|
|
PassManagerBuilder::ExtensionFn Fn) {
|
|
GlobalExtensions->push_back(std::make_pair(Ty, Fn));
|
|
}
|
|
|
|
void PassManagerBuilder::addExtension(ExtensionPointTy Ty, ExtensionFn Fn) {
|
|
Extensions.push_back(std::make_pair(Ty, Fn));
|
|
}
|
|
|
|
void PassManagerBuilder::addExtensionsToPM(ExtensionPointTy ETy,
|
|
PassManagerBase &PM) const {
|
|
for (unsigned i = 0, e = GlobalExtensions->size(); i != e; ++i)
|
|
if ((*GlobalExtensions)[i].first == ETy)
|
|
(*GlobalExtensions)[i].second(*this, PM);
|
|
for (unsigned i = 0, e = Extensions.size(); i != e; ++i)
|
|
if (Extensions[i].first == ETy)
|
|
Extensions[i].second(*this, PM);
|
|
}
|
|
|
|
void
|
|
PassManagerBuilder::addInitialAliasAnalysisPasses(PassManagerBase &PM) const {
|
|
// Add TypeBasedAliasAnalysis before BasicAliasAnalysis so that
|
|
// BasicAliasAnalysis wins if they disagree. This is intended to help
|
|
// support "obvious" type-punning idioms.
|
|
PM.add(createTypeBasedAliasAnalysisPass());
|
|
PM.add(createScopedNoAliasAAPass());
|
|
PM.add(createBasicAliasAnalysisPass());
|
|
}
|
|
|
|
void PassManagerBuilder::populateFunctionPassManager(FunctionPassManager &FPM) {
|
|
addExtensionsToPM(EP_EarlyAsPossible, FPM);
|
|
|
|
// Add LibraryInfo if we have some.
|
|
if (LibraryInfo) FPM.add(new TargetLibraryInfo(*LibraryInfo));
|
|
|
|
if (OptLevel == 0) return;
|
|
|
|
addInitialAliasAnalysisPasses(FPM);
|
|
|
|
FPM.add(createCFGSimplificationPass());
|
|
if (UseNewSROA)
|
|
FPM.add(createSROAPass());
|
|
else
|
|
FPM.add(createScalarReplAggregatesPass());
|
|
FPM.add(createEarlyCSEPass());
|
|
FPM.add(createLowerExpectIntrinsicPass());
|
|
}
|
|
|
|
void PassManagerBuilder::populateModulePassManager(PassManagerBase &MPM) {
|
|
// If all optimizations are disabled, just run the always-inline pass.
|
|
if (OptLevel == 0) {
|
|
if (Inliner) {
|
|
MPM.add(Inliner);
|
|
Inliner = nullptr;
|
|
}
|
|
|
|
// FIXME: This is a HACK! The inliner pass above implicitly creates a CGSCC
|
|
// pass manager, but we don't want to add extensions into that pass manager.
|
|
// To prevent this we must insert a no-op module pass to reset the pass
|
|
// manager to get the same behavior as EP_OptimizerLast in non-O0 builds.
|
|
if (!GlobalExtensions->empty() || !Extensions.empty())
|
|
MPM.add(createBarrierNoopPass());
|
|
|
|
addExtensionsToPM(EP_EnabledOnOptLevel0, MPM);
|
|
return;
|
|
}
|
|
|
|
// Add LibraryInfo if we have some.
|
|
if (LibraryInfo) MPM.add(new TargetLibraryInfo(*LibraryInfo));
|
|
|
|
addInitialAliasAnalysisPasses(MPM);
|
|
|
|
if (!DisableUnitAtATime) {
|
|
addExtensionsToPM(EP_ModuleOptimizerEarly, MPM);
|
|
|
|
MPM.add(createIPSCCPPass()); // IP SCCP
|
|
MPM.add(createGlobalOptimizerPass()); // Optimize out global vars
|
|
|
|
MPM.add(createDeadArgEliminationPass()); // Dead argument elimination
|
|
|
|
MPM.add(createInstructionCombiningPass());// Clean up after IPCP & DAE
|
|
addExtensionsToPM(EP_Peephole, MPM);
|
|
MPM.add(createCFGSimplificationPass()); // Clean up after IPCP & DAE
|
|
}
|
|
|
|
// Start of CallGraph SCC passes.
|
|
if (!DisableUnitAtATime)
|
|
MPM.add(createPruneEHPass()); // Remove dead EH info
|
|
if (Inliner) {
|
|
MPM.add(Inliner);
|
|
Inliner = nullptr;
|
|
}
|
|
if (!DisableUnitAtATime)
|
|
MPM.add(createFunctionAttrsPass()); // Set readonly/readnone attrs
|
|
if (OptLevel > 2)
|
|
MPM.add(createArgumentPromotionPass()); // Scalarize uninlined fn args
|
|
|
|
// Start of function pass.
|
|
// Break up aggregate allocas, using SSAUpdater.
|
|
if (UseNewSROA)
|
|
MPM.add(createSROAPass(/*RequiresDomTree*/ false));
|
|
else
|
|
MPM.add(createScalarReplAggregatesPass(-1, false));
|
|
MPM.add(createEarlyCSEPass()); // Catch trivial redundancies
|
|
MPM.add(createJumpThreadingPass()); // Thread jumps.
|
|
MPM.add(createCorrelatedValuePropagationPass()); // Propagate conditionals
|
|
MPM.add(createCFGSimplificationPass()); // Merge & remove BBs
|
|
MPM.add(createInstructionCombiningPass()); // Combine silly seq's
|
|
addExtensionsToPM(EP_Peephole, MPM);
|
|
|
|
if (!DisableTailCalls)
|
|
MPM.add(createTailCallEliminationPass()); // Eliminate tail calls
|
|
MPM.add(createCFGSimplificationPass()); // Merge & remove BBs
|
|
MPM.add(createReassociatePass()); // Reassociate expressions
|
|
MPM.add(createLoopRotatePass()); // Rotate Loop
|
|
MPM.add(createLICMPass()); // Hoist loop invariants
|
|
MPM.add(createLoopUnswitchPass(SizeLevel || OptLevel < 3));
|
|
MPM.add(createInstructionCombiningPass());
|
|
MPM.add(createIndVarSimplifyPass()); // Canonicalize indvars
|
|
MPM.add(createLoopIdiomPass()); // Recognize idioms like memset.
|
|
MPM.add(createLoopDeletionPass()); // Delete dead loops
|
|
|
|
if (!DisableUnrollLoops)
|
|
MPM.add(createSimpleLoopUnrollPass()); // Unroll small loops
|
|
addExtensionsToPM(EP_LoopOptimizerEnd, MPM);
|
|
|
|
if (OptLevel > 1) {
|
|
MPM.add(createMergedLoadStoreMotionPass()); // Merge load/stores in diamond
|
|
MPM.add(createGVNPass()); // Remove redundancies
|
|
}
|
|
MPM.add(createMemCpyOptPass()); // Remove memcpy / form memset
|
|
MPM.add(createSCCPPass()); // Constant prop with SCCP
|
|
|
|
// Run instcombine after redundancy elimination to exploit opportunities
|
|
// opened up by them.
|
|
MPM.add(createInstructionCombiningPass());
|
|
addExtensionsToPM(EP_Peephole, MPM);
|
|
MPM.add(createJumpThreadingPass()); // Thread jumps
|
|
MPM.add(createCorrelatedValuePropagationPass());
|
|
MPM.add(createDeadStoreEliminationPass()); // Delete dead stores
|
|
|
|
addExtensionsToPM(EP_ScalarOptimizerLate, MPM);
|
|
|
|
if (RerollLoops)
|
|
MPM.add(createLoopRerollPass());
|
|
if (SLPVectorize)
|
|
MPM.add(createSLPVectorizerPass()); // Vectorize parallel scalar chains.
|
|
|
|
if (BBVectorize) {
|
|
MPM.add(createBBVectorizePass());
|
|
MPM.add(createInstructionCombiningPass());
|
|
addExtensionsToPM(EP_Peephole, MPM);
|
|
if (OptLevel > 1 && UseGVNAfterVectorization)
|
|
MPM.add(createGVNPass()); // Remove redundancies
|
|
else
|
|
MPM.add(createEarlyCSEPass()); // Catch trivial redundancies
|
|
|
|
// BBVectorize may have significantly shortened a loop body; unroll again.
|
|
if (!DisableUnrollLoops)
|
|
MPM.add(createLoopUnrollPass());
|
|
}
|
|
|
|
if (LoadCombine)
|
|
MPM.add(createLoadCombinePass());
|
|
|
|
MPM.add(createAggressiveDCEPass()); // Delete dead instructions
|
|
MPM.add(createCFGSimplificationPass()); // Merge & remove BBs
|
|
MPM.add(createInstructionCombiningPass()); // Clean up after everything.
|
|
addExtensionsToPM(EP_Peephole, MPM);
|
|
|
|
// FIXME: This is a HACK! The inliner pass above implicitly creates a CGSCC
|
|
// pass manager that we are specifically trying to avoid. To prevent this
|
|
// we must insert a no-op module pass to reset the pass manager.
|
|
MPM.add(createBarrierNoopPass());
|
|
MPM.add(createLoopVectorizePass(DisableUnrollLoops, LoopVectorize));
|
|
// FIXME: Because of #pragma vectorize enable, the passes below are always
|
|
// inserted in the pipeline, even when the vectorizer doesn't run (ex. when
|
|
// on -O1 and no #pragma is found). Would be good to have these two passes
|
|
// as function calls, so that we can only pass them when the vectorizer
|
|
// changed the code.
|
|
MPM.add(createInstructionCombiningPass());
|
|
addExtensionsToPM(EP_Peephole, MPM);
|
|
MPM.add(createCFGSimplificationPass());
|
|
|
|
if (!DisableUnrollLoops)
|
|
MPM.add(createLoopUnrollPass()); // Unroll small loops
|
|
|
|
if (!DisableUnitAtATime) {
|
|
// FIXME: We shouldn't bother with this anymore.
|
|
MPM.add(createStripDeadPrototypesPass()); // Get rid of dead prototypes
|
|
|
|
// GlobalOpt already deletes dead functions and globals, at -O2 try a
|
|
// late pass of GlobalDCE. It is capable of deleting dead cycles.
|
|
if (OptLevel > 1) {
|
|
MPM.add(createGlobalDCEPass()); // Remove dead fns and globals.
|
|
MPM.add(createConstantMergePass()); // Merge dup global constants
|
|
}
|
|
}
|
|
addExtensionsToPM(EP_OptimizerLast, MPM);
|
|
}
|
|
|
|
void PassManagerBuilder::populateLTOPassManager(PassManagerBase &PM,
|
|
bool Internalize,
|
|
bool RunInliner,
|
|
bool DisableGVNLoadPRE) {
|
|
// Provide AliasAnalysis services for optimizations.
|
|
addInitialAliasAnalysisPasses(PM);
|
|
|
|
// Now that composite has been compiled, scan through the module, looking
|
|
// for a main function. If main is defined, mark all other functions
|
|
// internal.
|
|
if (Internalize)
|
|
PM.add(createInternalizePass("main"));
|
|
|
|
// Propagate constants at call sites into the functions they call. This
|
|
// opens opportunities for globalopt (and inlining) by substituting function
|
|
// pointers passed as arguments to direct uses of functions.
|
|
PM.add(createIPSCCPPass());
|
|
|
|
// Now that we internalized some globals, see if we can hack on them!
|
|
PM.add(createGlobalOptimizerPass());
|
|
|
|
// Linking modules together can lead to duplicated global constants, only
|
|
// keep one copy of each constant.
|
|
PM.add(createConstantMergePass());
|
|
|
|
// Remove unused arguments from functions.
|
|
PM.add(createDeadArgEliminationPass());
|
|
|
|
// Reduce the code after globalopt and ipsccp. Both can open up significant
|
|
// simplification opportunities, and both can propagate functions through
|
|
// function pointers. When this happens, we often have to resolve varargs
|
|
// calls, etc, so let instcombine do this.
|
|
PM.add(createInstructionCombiningPass());
|
|
addExtensionsToPM(EP_Peephole, PM);
|
|
|
|
// Inline small functions
|
|
if (RunInliner)
|
|
PM.add(createFunctionInliningPass());
|
|
|
|
PM.add(createPruneEHPass()); // Remove dead EH info.
|
|
|
|
// Optimize globals again if we ran the inliner.
|
|
if (RunInliner)
|
|
PM.add(createGlobalOptimizerPass());
|
|
PM.add(createGlobalDCEPass()); // Remove dead functions.
|
|
|
|
// If we didn't decide to inline a function, check to see if we can
|
|
// transform it to pass arguments by value instead of by reference.
|
|
PM.add(createArgumentPromotionPass());
|
|
|
|
// The IPO passes may leave cruft around. Clean up after them.
|
|
PM.add(createInstructionCombiningPass());
|
|
addExtensionsToPM(EP_Peephole, PM);
|
|
PM.add(createJumpThreadingPass());
|
|
|
|
// Break up allocas
|
|
if (UseNewSROA)
|
|
PM.add(createSROAPass());
|
|
else
|
|
PM.add(createScalarReplAggregatesPass());
|
|
|
|
// Run a few AA driven optimizations here and now, to cleanup the code.
|
|
PM.add(createFunctionAttrsPass()); // Add nocapture.
|
|
PM.add(createGlobalsModRefPass()); // IP alias analysis.
|
|
|
|
PM.add(createLICMPass()); // Hoist loop invariants.
|
|
PM.add(createMergedLoadStoreMotionPass()); // Merge load/stores in diamonds
|
|
PM.add(createGVNPass(DisableGVNLoadPRE)); // Remove redundancies.
|
|
PM.add(createMemCpyOptPass()); // Remove dead memcpys.
|
|
|
|
// Nuke dead stores.
|
|
PM.add(createDeadStoreEliminationPass());
|
|
|
|
// More loops are countable; try to optimize them.
|
|
PM.add(createIndVarSimplifyPass());
|
|
PM.add(createLoopDeletionPass());
|
|
PM.add(createLoopVectorizePass(true, true));
|
|
|
|
// More scalar chains could be vectorized due to more alias information
|
|
PM.add(createSLPVectorizerPass()); // Vectorize parallel scalar chains.
|
|
|
|
if (LoadCombine)
|
|
PM.add(createLoadCombinePass());
|
|
|
|
// Cleanup and simplify the code after the scalar optimizations.
|
|
PM.add(createInstructionCombiningPass());
|
|
addExtensionsToPM(EP_Peephole, PM);
|
|
|
|
PM.add(createJumpThreadingPass());
|
|
|
|
// Delete basic blocks, which optimization passes may have killed.
|
|
PM.add(createCFGSimplificationPass());
|
|
|
|
// Now that we have optimized the program, discard unreachable functions.
|
|
PM.add(createGlobalDCEPass());
|
|
}
|
|
|
|
inline PassManagerBuilder *unwrap(LLVMPassManagerBuilderRef P) {
|
|
return reinterpret_cast<PassManagerBuilder*>(P);
|
|
}
|
|
|
|
inline LLVMPassManagerBuilderRef wrap(PassManagerBuilder *P) {
|
|
return reinterpret_cast<LLVMPassManagerBuilderRef>(P);
|
|
}
|
|
|
|
LLVMPassManagerBuilderRef LLVMPassManagerBuilderCreate() {
|
|
PassManagerBuilder *PMB = new PassManagerBuilder();
|
|
return wrap(PMB);
|
|
}
|
|
|
|
void LLVMPassManagerBuilderDispose(LLVMPassManagerBuilderRef PMB) {
|
|
PassManagerBuilder *Builder = unwrap(PMB);
|
|
delete Builder;
|
|
}
|
|
|
|
void
|
|
LLVMPassManagerBuilderSetOptLevel(LLVMPassManagerBuilderRef PMB,
|
|
unsigned OptLevel) {
|
|
PassManagerBuilder *Builder = unwrap(PMB);
|
|
Builder->OptLevel = OptLevel;
|
|
}
|
|
|
|
void
|
|
LLVMPassManagerBuilderSetSizeLevel(LLVMPassManagerBuilderRef PMB,
|
|
unsigned SizeLevel) {
|
|
PassManagerBuilder *Builder = unwrap(PMB);
|
|
Builder->SizeLevel = SizeLevel;
|
|
}
|
|
|
|
void
|
|
LLVMPassManagerBuilderSetDisableUnitAtATime(LLVMPassManagerBuilderRef PMB,
|
|
LLVMBool Value) {
|
|
PassManagerBuilder *Builder = unwrap(PMB);
|
|
Builder->DisableUnitAtATime = Value;
|
|
}
|
|
|
|
void
|
|
LLVMPassManagerBuilderSetDisableUnrollLoops(LLVMPassManagerBuilderRef PMB,
|
|
LLVMBool Value) {
|
|
PassManagerBuilder *Builder = unwrap(PMB);
|
|
Builder->DisableUnrollLoops = Value;
|
|
}
|
|
|
|
void
|
|
LLVMPassManagerBuilderSetDisableSimplifyLibCalls(LLVMPassManagerBuilderRef PMB,
|
|
LLVMBool Value) {
|
|
// NOTE: The simplify-libcalls pass has been removed.
|
|
}
|
|
|
|
void
|
|
LLVMPassManagerBuilderUseInlinerWithThreshold(LLVMPassManagerBuilderRef PMB,
|
|
unsigned Threshold) {
|
|
PassManagerBuilder *Builder = unwrap(PMB);
|
|
Builder->Inliner = createFunctionInliningPass(Threshold);
|
|
}
|
|
|
|
void
|
|
LLVMPassManagerBuilderPopulateFunctionPassManager(LLVMPassManagerBuilderRef PMB,
|
|
LLVMPassManagerRef PM) {
|
|
PassManagerBuilder *Builder = unwrap(PMB);
|
|
FunctionPassManager *FPM = unwrap<FunctionPassManager>(PM);
|
|
Builder->populateFunctionPassManager(*FPM);
|
|
}
|
|
|
|
void
|
|
LLVMPassManagerBuilderPopulateModulePassManager(LLVMPassManagerBuilderRef PMB,
|
|
LLVMPassManagerRef PM) {
|
|
PassManagerBuilder *Builder = unwrap(PMB);
|
|
PassManagerBase *MPM = unwrap(PM);
|
|
Builder->populateModulePassManager(*MPM);
|
|
}
|
|
|
|
void LLVMPassManagerBuilderPopulateLTOPassManager(LLVMPassManagerBuilderRef PMB,
|
|
LLVMPassManagerRef PM,
|
|
LLVMBool Internalize,
|
|
LLVMBool RunInliner) {
|
|
PassManagerBuilder *Builder = unwrap(PMB);
|
|
PassManagerBase *LPM = unwrap(PM);
|
|
Builder->populateLTOPassManager(*LPM, Internalize != 0, RunInliner != 0);
|
|
}
|