Lines Matching full:config
10 #include "Config.h"
25 #include "llvm/LTO/Config.h"
47 return lto::getThinLTOOutputFile(modulePath, config->thinLTOPrefixReplaceOld,
48 config->thinLTOPrefixReplaceNew);
51 static lto::Config createConfig() {
52 lto::Config c;
57 for (StringRef C : config->mllvmOpts)
64 c.Options.BBAddrMap = config->ltoBBAddrMap;
70 if (!config->ltoBasicBlockSections.empty()) {
71 if (config->ltoBasicBlockSections == "all") {
73 } else if (config->ltoBasicBlockSections == "labels") {
75 } else if (config->ltoBasicBlockSections == "none") {
79 MemoryBuffer::getFile(config->ltoBasicBlockSections.str());
81 error("cannot open " + config->ltoBasicBlockSections + ":" +
91 config->ltoUniqueBasicBlockSectionNames;
95 else if (config->relocatable)
97 else if (config->isPic)
103 c.DisableVerify = config->disableVerify;
105 c.OptLevel = config->ltoo;
108 c.CGOptLevel = config->ltoCgo;
114 c.OptPipeline = std::string(config->ltoNewPmPasses);
115 c.AAPipeline = std::string(config->ltoAAPipeline);
118 c.RemarksFilename = std::string(config->optRemarksFilename);
119 c.RemarksPasses = std::string(config->optRemarksPasses);
120 c.RemarksWithHotness = config->optRemarksWithHotness;
121 c.RemarksHotnessThreshold = config->optRemarksHotnessThreshold;
122 c.RemarksFormat = std::string(config->optRemarksFormat);
125 c.StatsFile = std::string(config->optStatsFilename);
127 c.SampleProfile = std::string(config->ltoSampleProfile);
128 for (StringRef pluginFn : config->passPlugins)
130 c.DebugPassManager = config->ltoDebugPassManager;
131 c.DwoDir = std::string(config->dwoDir);
133 c.HasWholeProgramVisibility = config->ltoWholeProgramVisibility;
135 config->ltoValidateAllVtablesHaveTypeInfos;
137 c.AlwaysEmitRegularLTOObj = !config->ltoObjPath.empty();
139 for (const llvm::StringRef &name : config->thinLTOModulesToCompile)
142 c.TimeTraceEnabled = config->timeTraceEnabled;
143 c.TimeTraceGranularity = config->timeTraceGranularity;
145 c.CSIRProfile = std::string(config->ltoCSProfileFile);
146 c.RunCSIRInstr = config->ltoCSProfileGenerate;
147 c.PGOWarnMismatch = config->ltoPGOWarnMismatch;
149 if (config->emitLLVM) {
152 openLTOOutputFile(config->outputFile))
158 if (config->ltoEmitAsm) {
163 if (!config->saveTempsArgs.empty())
164 checkError(c.addSaveTemps(config->outputFile.str() + ".",
166 config->saveTempsArgs));
172 if (!config->thinLTOIndexOnlyArg.empty())
173 indexFile = openFile(config->thinLTOIndexOnlyArg);
178 if (config->thinLTOIndexOnly) {
180 std::string(config->thinLTOPrefixReplaceOld),
181 std::string(config->thinLTOPrefixReplaceNew),
182 std::string(config->thinLTOPrefixReplaceNativeObject),
183 config->thinLTOEmitImportsFiles, indexFile.get(), onIndexWrite);
186 llvm::heavyweight_hardware_concurrency(config->thinLTOJobs),
187 onIndexWrite, config->thinLTOEmitIndexFiles,
188 config->thinLTOEmitImportsFiles);
196 createConfig(), backend, config->ltoPartitions,
197 ltoModes[config->ltoKind]);
216 bool isExec = !config->shared && !config->relocatable;
218 if (config->thinLTOEmitIndexFiles)
246 r.VisibleToRegularObj = config->relocatable || sym->isUsedInRegularObj ||
254 (config->exportDynamic || sym->exportDynamic || sym->inDynamicList);
301 if (config->thinLTOEmitImportsFiles)
318 if (!config->thinLTOCacheDir.empty())
319 cache = check(localCache("ThinLTO", "Thin", config->thinLTOCacheDir,
336 if (config->thinLTOModulesToCompile.empty()) {
340 if (config->thinLTOEmitImportsFiles)
345 if (config->thinLTOEmitIndexFiles)
348 if (config->thinLTOIndexOnly) {
349 if (!config->ltoObjPath.empty())
350 saveBuffer(buf[0].second, config->ltoObjPath);
360 if (!config->thinLTOCacheDir.empty())
361 pruneCache(config->thinLTOCacheDir, config->thinLTOCachePolicy, files);
363 if (!config->ltoObjPath.empty()) {
364 saveBuffer(buf[0].second, config->ltoObjPath);
366 saveBuffer(buf[i].second, config->ltoObjPath + Twine(i));
369 bool savePrelink = config->saveTempsArgs.contains("prelink");
371 const char *ext = config->ltoEmitAsm ? ".s" : ".o";
394 saver().save(Twine(config->outputFile) + ".lto" +
404 StringRef outputFileBaseName = sys::path::filename(config->outputFile);
411 if (savePrelink || config->ltoEmitAsm)
413 if (!config->ltoEmitAsm)