[lld] r287967 - [ELF] Be compliant with LLVM and rename Lto into LTO. NFCI.
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 25 21:37:04 PST 2016
Author: davide
Date: Fri Nov 25 23:37:04 2016
New Revision: 287967
URL: http://llvm.org/viewvc/llvm-project?rev=287967&view=rev
Log:
[ELF] Be compliant with LLVM and rename Lto into LTO. NFCI.
Modified:
lld/trunk/ELF/Config.h
lld/trunk/ELF/Driver.cpp
lld/trunk/ELF/LTO.cpp
lld/trunk/ELF/LTO.h
lld/trunk/ELF/SymbolTable.cpp
lld/trunk/ELF/SymbolTable.h
Modified: lld/trunk/ELF/Config.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Config.h?rev=287967&r1=287966&r2=287967&view=diff
==============================================================================
--- lld/trunk/ELF/Config.h (original)
+++ lld/trunk/ELF/Config.h Fri Nov 25 23:37:04 2016
@@ -82,8 +82,8 @@ struct Configuration {
llvm::StringRef Emulation;
llvm::StringRef Fini;
llvm::StringRef Init;
- llvm::StringRef LtoAAPipeline;
- llvm::StringRef LtoNewPmPasses;
+ llvm::StringRef LTOAAPipeline;
+ llvm::StringRef LTONewPmPasses;
llvm::StringRef OutputFile;
llvm::StringRef SoName;
llvm::StringRef Sysroot;
@@ -153,10 +153,10 @@ struct Configuration {
uint64_t ImageBase;
uint64_t MaxPageSize;
uint64_t ZStackSize;
- unsigned LtoPartitions;
- unsigned LtoO;
+ unsigned LTOPartitions;
+ unsigned LTOO;
unsigned Optimize;
- unsigned ThinLtoJobs;
+ unsigned ThinLTOJobs;
};
// The only instance of Configuration struct.
Modified: lld/trunk/ELF/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Driver.cpp?rev=287967&r1=287966&r2=287967&view=diff
==============================================================================
--- lld/trunk/ELF/Driver.cpp (original)
+++ lld/trunk/ELF/Driver.cpp Fri Nov 25 23:37:04 2016
@@ -540,21 +540,21 @@ void LinkerDriver::readConfigs(opt::Inpu
Config->Entry = getString(Args, OPT_entry);
Config->Fini = getString(Args, OPT_fini, "_fini");
Config->Init = getString(Args, OPT_init, "_init");
- Config->LtoAAPipeline = getString(Args, OPT_lto_aa_pipeline);
- Config->LtoNewPmPasses = getString(Args, OPT_lto_newpm_passes);
+ Config->LTOAAPipeline = getString(Args, OPT_lto_aa_pipeline);
+ Config->LTONewPmPasses = getString(Args, OPT_lto_newpm_passes);
Config->OutputFile = getString(Args, OPT_o);
Config->SoName = getString(Args, OPT_soname);
Config->Sysroot = getString(Args, OPT_sysroot);
Config->Optimize = getInteger(Args, OPT_O, 1);
- Config->LtoO = getInteger(Args, OPT_lto_O, 2);
- if (Config->LtoO > 3)
+ Config->LTOO = getInteger(Args, OPT_lto_O, 2);
+ if (Config->LTOO > 3)
error("invalid optimization level for LTO: " + getString(Args, OPT_lto_O));
- Config->LtoPartitions = getInteger(Args, OPT_lto_partitions, 1);
- if (Config->LtoPartitions == 0)
+ Config->LTOPartitions = getInteger(Args, OPT_lto_partitions, 1);
+ if (Config->LTOPartitions == 0)
error("--lto-partitions: number of threads must be > 0");
- Config->ThinLtoJobs = getInteger(Args, OPT_thinlto_jobs, -1u);
- if (Config->ThinLtoJobs == 0)
+ Config->ThinLTOJobs = getInteger(Args, OPT_thinlto_jobs, -1u);
+ if (Config->ThinLTOJobs == 0)
error("--thinlto-jobs: number of threads must be > 0");
Config->ZCombreloc = !hasZOption(Args, "nocombreloc");
@@ -794,7 +794,7 @@ template <class ELFT> void LinkerDriver:
Symtab.scanDynamicList();
Symtab.scanVersionScript();
- Symtab.addCombinedLtoObject();
+ Symtab.addCombinedLTOObject();
if (ErrorCount)
return;
Modified: lld/trunk/ELF/LTO.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/LTO.cpp?rev=287967&r1=287966&r2=287967&view=diff
==============================================================================
--- lld/trunk/ELF/LTO.cpp (original)
+++ lld/trunk/ELF/LTO.cpp Fri Nov 25 23:37:04 2016
@@ -75,24 +75,24 @@ static std::unique_ptr<lto::LTO> createL
Conf.RelocModel = Config->Pic ? Reloc::PIC_ : Reloc::Static;
Conf.DisableVerify = Config->DisableVerify;
Conf.DiagHandler = diagnosticHandler;
- Conf.OptLevel = Config->LtoO;
+ Conf.OptLevel = Config->LTOO;
// Set up a custom pipeline if we've been asked to.
- Conf.OptPipeline = Config->LtoNewPmPasses;
- Conf.AAPipeline = Config->LtoAAPipeline;
+ Conf.OptPipeline = Config->LTONewPmPasses;
+ Conf.AAPipeline = Config->LTOAAPipeline;
if (Config->SaveTemps)
checkError(Conf.addSaveTemps(std::string(Config->OutputFile) + ".",
/*UseInputModulePath*/ true));
lto::ThinBackend Backend;
- if (Config->ThinLtoJobs != -1u)
- Backend = lto::createInProcessThinBackend(Config->ThinLtoJobs);
+ if (Config->ThinLTOJobs != -1u)
+ Backend = lto::createInProcessThinBackend(Config->ThinLTOJobs);
return llvm::make_unique<lto::LTO>(std::move(Conf), Backend,
- Config->LtoPartitions);
+ Config->LTOPartitions);
}
-BitcodeCompiler::BitcodeCompiler() : LtoObj(createLTO()) {}
+BitcodeCompiler::BitcodeCompiler() : LTOObj(createLTO()) {}
BitcodeCompiler::~BitcodeCompiler() = default;
@@ -128,17 +128,17 @@ void BitcodeCompiler::add(BitcodeFile &F
if (R.Prevailing)
undefine(Sym);
}
- checkError(LtoObj->add(std::move(F.Obj), Resols));
+ checkError(LTOObj->add(std::move(F.Obj), Resols));
}
// Merge all the bitcode files we have seen, codegen the result
// and return the resulting ObjectFile(s).
std::vector<InputFile *> BitcodeCompiler::compile() {
std::vector<InputFile *> Ret;
- unsigned MaxTasks = LtoObj->getMaxTasks();
+ unsigned MaxTasks = LTOObj->getMaxTasks();
Buff.resize(MaxTasks);
- checkError(LtoObj->run([&](size_t Task) {
+ checkError(LTOObj->run([&](size_t Task) {
return llvm::make_unique<lto::NativeObjectStream>(
llvm::make_unique<raw_svector_ostream>(Buff[Task]));
}));
Modified: lld/trunk/ELF/LTO.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/LTO.h?rev=287967&r1=287966&r2=287967&view=diff
==============================================================================
--- lld/trunk/ELF/LTO.h (original)
+++ lld/trunk/ELF/LTO.h Fri Nov 25 23:37:04 2016
@@ -47,7 +47,7 @@ public:
std::vector<InputFile *> compile();
private:
- std::unique_ptr<llvm::lto::LTO> LtoObj;
+ std::unique_ptr<llvm::lto::LTO> LTOObj;
std::vector<SmallString<0>> Buff;
};
}
Modified: lld/trunk/ELF/SymbolTable.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SymbolTable.cpp?rev=287967&r1=287966&r2=287967&view=diff
==============================================================================
--- lld/trunk/ELF/SymbolTable.cpp (original)
+++ lld/trunk/ELF/SymbolTable.cpp Fri Nov 25 23:37:04 2016
@@ -108,16 +108,16 @@ template <class ELFT> void SymbolTable<E
// using LLVM functions and replaces bitcode symbols with the results.
// Because all bitcode files that consist of a program are passed
// to the compiler at once, it can do whole-program optimization.
-template <class ELFT> void SymbolTable<ELFT>::addCombinedLtoObject() {
+template <class ELFT> void SymbolTable<ELFT>::addCombinedLTOObject() {
if (BitcodeFiles.empty())
return;
// Compile bitcode files and replace bitcode symbols.
- Lto.reset(new BitcodeCompiler);
+ LTO.reset(new BitcodeCompiler);
for (BitcodeFile *F : BitcodeFiles)
- Lto->add(*F);
+ LTO->add(*F);
- for (InputFile *File : Lto->compile()) {
+ for (InputFile *File : LTO->compile()) {
ObjectFile<ELFT> *Obj = cast<ObjectFile<ELFT>>(File);
DenseSet<CachedHashStringRef> DummyGroups;
Obj->parse(DummyGroups);
Modified: lld/trunk/ELF/SymbolTable.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SymbolTable.h?rev=287967&r1=287966&r2=287967&view=diff
==============================================================================
--- lld/trunk/ELF/SymbolTable.h (original)
+++ lld/trunk/ELF/SymbolTable.h Fri Nov 25 23:37:04 2016
@@ -42,7 +42,7 @@ template <class ELFT> class SymbolTable
public:
void addFile(InputFile *File);
- void addCombinedLtoObject();
+ void addCombinedLTOObject();
ArrayRef<Symbol *> getSymbols() const { return SymVector; }
ArrayRef<ObjectFile<ELFT> *> getObjectFiles() const { return ObjectFiles; }
@@ -141,7 +141,7 @@ private:
llvm::Optional<llvm::StringMap<std::vector<SymbolBody *>>> DemangledSyms;
// For LTO.
- std::unique_ptr<BitcodeCompiler> Lto;
+ std::unique_ptr<BitcodeCompiler> LTO;
};
template <class ELFT> struct Symtab { static SymbolTable<ELFT> *X; };
More information about the llvm-commits
mailing list