Lines Matching refs:CGOpts
150 const CodeGenOptions &CGOpts, in EmitAssemblyHelper() argument
153 : Diags(_Diags), HSOpts(HeaderSearchOpts), CodeGenOpts(CGOpts), in EmitAssemblyHelper()
176 const CodeGenOptions &CGOpts, in PassManagerBuilderWrapper() argument
178 : PassManagerBuilder(), TargetTriple(TargetTriple), CGOpts(CGOpts), in PassManagerBuilderWrapper()
181 const CodeGenOptions &getCGOpts() const { return CGOpts; } in getCGOpts()
186 const CodeGenOptions &CGOpts; member in __anon38e4a6340111::PassManagerBuilderWrapper
217 getSancovOptsFromCGOpts(const CodeGenOptions &CGOpts) { in getSancovOptsFromCGOpts() argument
220 static_cast<SanitizerCoverageOptions::Type>(CGOpts.SanitizeCoverageType); in getSancovOptsFromCGOpts()
221 Opts.IndirectCalls = CGOpts.SanitizeCoverageIndirectCalls; in getSancovOptsFromCGOpts()
222 Opts.TraceBB = CGOpts.SanitizeCoverageTraceBB; in getSancovOptsFromCGOpts()
223 Opts.TraceCmp = CGOpts.SanitizeCoverageTraceCmp; in getSancovOptsFromCGOpts()
224 Opts.TraceDiv = CGOpts.SanitizeCoverageTraceDiv; in getSancovOptsFromCGOpts()
225 Opts.TraceGep = CGOpts.SanitizeCoverageTraceGep; in getSancovOptsFromCGOpts()
226 Opts.Use8bitCounters = CGOpts.SanitizeCoverage8bitCounters; in getSancovOptsFromCGOpts()
227 Opts.TracePC = CGOpts.SanitizeCoverageTracePC; in getSancovOptsFromCGOpts()
228 Opts.TracePCGuard = CGOpts.SanitizeCoverageTracePCGuard; in getSancovOptsFromCGOpts()
229 Opts.NoPrune = CGOpts.SanitizeCoverageNoPrune; in getSancovOptsFromCGOpts()
230 Opts.Inline8bitCounters = CGOpts.SanitizeCoverageInline8bitCounters; in getSancovOptsFromCGOpts()
231 Opts.InlineBoolFlag = CGOpts.SanitizeCoverageInlineBoolFlag; in getSancovOptsFromCGOpts()
232 Opts.PCTable = CGOpts.SanitizeCoveragePCTable; in getSancovOptsFromCGOpts()
233 Opts.StackDepth = CGOpts.SanitizeCoverageStackDepth; in getSancovOptsFromCGOpts()
241 const CodeGenOptions &CGOpts = BuilderWrapper.getCGOpts(); in addSanitizerCoveragePass() local
242 auto Opts = getSancovOptsFromCGOpts(CGOpts); in addSanitizerCoveragePass()
244 Opts, CGOpts.SanitizeCoverageAllowlistFiles, in addSanitizerCoveragePass()
245 CGOpts.SanitizeCoverageBlocklistFiles)); in addSanitizerCoveragePass()
252 static bool asanUseGlobalsGC(const Triple &T, const CodeGenOptions &CGOpts) { in asanUseGlobalsGC() argument
253 if (!CGOpts.SanitizeAddressGlobalsDeadStripping) in asanUseGlobalsGC()
260 return CGOpts.DataSections && !CGOpts.DisableIntegratedAS; in asanUseGlobalsGC()
283 const CodeGenOptions &CGOpts = BuilderWrapper.getCGOpts(); in addAddressSanitizerPasses() local
284 bool Recover = CGOpts.SanitizeRecover.has(SanitizerKind::Address); in addAddressSanitizerPasses()
285 bool UseAfterScope = CGOpts.SanitizeAddressUseAfterScope; in addAddressSanitizerPasses()
286 bool UseOdrIndicator = CGOpts.SanitizeAddressUseOdrIndicator; in addAddressSanitizerPasses()
287 bool UseGlobalsGC = asanUseGlobalsGC(T, CGOpts); in addAddressSanitizerPasses()
307 const CodeGenOptions &CGOpts = BuilderWrapper.getCGOpts(); in addHWAddressSanitizerPasses() local
308 bool Recover = CGOpts.SanitizeRecover.has(SanitizerKind::HWAddress); in addHWAddressSanitizerPasses()
324 const CodeGenOptions &CGOpts = BuilderWrapper.getCGOpts(); in addGeneralOptsForMemorySanitizer() local
325 int TrackOrigins = CGOpts.SanitizeMemoryTrackOrigins; in addGeneralOptsForMemorySanitizer()
326 bool Recover = CGOpts.SanitizeRecover.has(SanitizerKind::Memory); in addGeneralOptsForMemorySanitizer()
1424 const HeaderSearchOptions &HeaderOpts, const CodeGenOptions &CGOpts, in runThinLTOBackend() argument
1432 setCommandLineOpts(CGOpts); in runThinLTOBackend()
1448 if (CGOpts.SaveTempsFilePrefix != "") { in runThinLTOBackend()
1449 if (Error E = Conf.addSaveTemps(CGOpts.SaveTempsFilePrefix + ".", in runThinLTOBackend()
1458 Conf.CodeModel = getCodeModel(CGOpts); in runThinLTOBackend()
1460 Conf.RelocModel = CGOpts.RelocationModel; in runThinLTOBackend()
1461 Conf.CGOptLevel = getCGOptLevel(CGOpts); in runThinLTOBackend()
1462 Conf.OptLevel = CGOpts.OptimizationLevel; in runThinLTOBackend()
1463 initTargetOptions(Diags, Conf.Options, CGOpts, TOpts, LOpts, HeaderOpts); in runThinLTOBackend()
1465 Conf.PTO.LoopUnrolling = CGOpts.UnrollLoops; in runThinLTOBackend()
1468 Conf.PTO.LoopInterleaving = CGOpts.UnrollLoops; in runThinLTOBackend()
1469 Conf.PTO.LoopVectorization = CGOpts.VectorizeLoop; in runThinLTOBackend()
1470 Conf.PTO.SLPVectorization = CGOpts.VectorizeSLP; in runThinLTOBackend()
1473 Conf.PTO.CallGraphProfile = !CGOpts.DisableIntegratedAS; in runThinLTOBackend()
1476 if (CGOpts.hasProfileCSIRInstr()) { in runThinLTOBackend()
1478 Conf.CSIRProfile = std::move(CGOpts.InstrProfileOutput); in runThinLTOBackend()
1479 } else if (CGOpts.hasProfileCSIRUse()) { in runThinLTOBackend()
1481 Conf.CSIRProfile = std::move(CGOpts.ProfileInstrumentUsePath); in runThinLTOBackend()
1485 Conf.UseNewPM = CGOpts.ExperimentalNewPassManager; in runThinLTOBackend()
1486 Conf.DebugPassManager = CGOpts.DebugPassManager; in runThinLTOBackend()
1487 Conf.RemarksWithHotness = CGOpts.DiagnosticsWithHotness; in runThinLTOBackend()
1488 Conf.RemarksFilename = CGOpts.OptRecordFile; in runThinLTOBackend()
1489 Conf.RemarksPasses = CGOpts.OptRecordPasses; in runThinLTOBackend()
1490 Conf.RemarksFormat = CGOpts.OptRecordFormat; in runThinLTOBackend()
1491 Conf.SplitDwarfFile = CGOpts.SplitDwarfFile; in runThinLTOBackend()
1492 Conf.SplitDwarfOutput = CGOpts.SplitDwarfOutput; in runThinLTOBackend()
1501 M->print(*OS, nullptr, CGOpts.EmitLLVMUseLists); in runThinLTOBackend()
1507 WriteBitcodeToFile(*M, *OS, CGOpts.EmitLLVMUseLists); in runThinLTOBackend()
1518 ModuleMap, CGOpts.CmdArgs)) { in runThinLTOBackend()
1527 const CodeGenOptions &CGOpts, in EmitBackendOutput() argument
1537 if (!CGOpts.ThinLTOIndexFile.empty()) { in EmitBackendOutput()
1542 llvm::getModuleSummaryIndexForFile(CGOpts.ThinLTOIndexFile, in EmitBackendOutput()
1547 CGOpts.ThinLTOIndexFile + "': "); in EmitBackendOutput()
1556 runThinLTOBackend(Diags, CombinedIndex.get(), M, HeaderOpts, CGOpts, in EmitBackendOutput()
1557 TOpts, LOpts, std::move(OS), CGOpts.SampleProfileFile, in EmitBackendOutput()
1558 CGOpts.ProfileRemappingFile, Action); in EmitBackendOutput()
1573 EmitAssemblyHelper AsmHelper(Diags, HeaderOpts, CGOpts, TOpts, LOpts, M); in EmitBackendOutput()
1575 if (CGOpts.ExperimentalNewPassManager) in EmitBackendOutput()
1595 void clang::EmbedBitcode(llvm::Module *M, const CodeGenOptions &CGOpts, in EmbedBitcode() argument
1597 if (CGOpts.getEmbedBitcode() == CodeGenOptions::Embed_Off) in EmbedBitcode()
1600 *M, Buf, CGOpts.getEmbedBitcode() != CodeGenOptions::Embed_Marker, in EmbedBitcode()
1601 CGOpts.getEmbedBitcode() != CodeGenOptions::Embed_Bitcode, in EmbedBitcode()
1602 CGOpts.CmdArgs); in EmbedBitcode()