1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00

[lib/LTO] Rename few instances of Lto to LTO.

llvm-svn: 287840
This commit is contained in:
Davide Italiano 2016-11-24 00:23:09 +00:00
parent 61c6123ff9
commit 824e3393dd

View File

@ -168,7 +168,7 @@ static void runNewPMCustomPasses(Module &Mod, TargetMachine *TM,
} }
static void runOldPMPasses(Config &Conf, Module &Mod, TargetMachine *TM, static void runOldPMPasses(Config &Conf, Module &Mod, TargetMachine *TM,
bool IsThinLto) { bool IsThinLTO) {
legacy::PassManager passes; legacy::PassManager passes;
passes.add(createTargetTransformInfoWrapperPass(TM->getTargetIRAnalysis())); passes.add(createTargetTransformInfoWrapperPass(TM->getTargetIRAnalysis()));
@ -182,7 +182,7 @@ static void runOldPMPasses(Config &Conf, Module &Mod, TargetMachine *TM,
PMB.LoopVectorize = true; PMB.LoopVectorize = true;
PMB.SLPVectorize = true; PMB.SLPVectorize = true;
PMB.OptLevel = Conf.OptLevel; PMB.OptLevel = Conf.OptLevel;
if (IsThinLto) if (IsThinLTO)
PMB.populateThinLTOPassManager(passes); PMB.populateThinLTOPassManager(passes);
else else
PMB.populateLTOPassManager(passes); PMB.populateLTOPassManager(passes);
@ -190,10 +190,10 @@ static void runOldPMPasses(Config &Conf, Module &Mod, TargetMachine *TM,
} }
bool opt(Config &Conf, TargetMachine *TM, unsigned Task, Module &Mod, bool opt(Config &Conf, TargetMachine *TM, unsigned Task, Module &Mod,
bool IsThinLto) { bool IsThinLTO) {
Mod.setDataLayout(TM->createDataLayout()); Mod.setDataLayout(TM->createDataLayout());
if (Conf.OptPipeline.empty()) if (Conf.OptPipeline.empty())
runOldPMPasses(Conf, Mod, TM, IsThinLto); runOldPMPasses(Conf, Mod, TM, IsThinLTO);
else else
runNewPMCustomPasses(Mod, TM, Conf.OptPipeline, Conf.AAPipeline, runNewPMCustomPasses(Mod, TM, Conf.OptPipeline, Conf.AAPipeline,
Conf.DisableVerify); Conf.DisableVerify);
@ -302,7 +302,7 @@ Error lto::backend(Config &C, AddStreamFn AddStream,
handleAsmUndefinedRefs(*Mod, *TM); handleAsmUndefinedRefs(*Mod, *TM);
if (!C.CodeGenOnly) if (!C.CodeGenOnly)
if (!opt(C, TM.get(), 0, *Mod, /*IsThinLto=*/false)) if (!opt(C, TM.get(), 0, *Mod, /*IsThinLTO=*/false))
return Error::success(); return Error::success();
if (ParallelCodeGenParallelismLevel == 1) { if (ParallelCodeGenParallelismLevel == 1) {
@ -364,7 +364,7 @@ Error lto::thinBackend(Config &Conf, unsigned Task, AddStreamFn AddStream,
if (Conf.PostImportModuleHook && !Conf.PostImportModuleHook(Task, Mod)) if (Conf.PostImportModuleHook && !Conf.PostImportModuleHook(Task, Mod))
return Error::success(); return Error::success();
if (!opt(Conf, TM.get(), Task, Mod, /*IsThinLto=*/true)) if (!opt(Conf, TM.get(), Task, Mod, /*IsThinLTO=*/true))
return Error::success(); return Error::success();
codegen(Conf, TM.get(), AddStream, Task, Mod); codegen(Conf, TM.get(), AddStream, Task, Mod);