Lines Matching refs:CodeGenOpts
51 const CodeGenOptions &CodeGenOpts; member in __anonfbf255770111::EmitAssemblyHelper
116 : Diags(_Diags), CodeGenOpts(CGOpts), TargetOpts(TOpts), LangOpts(LOpts), in EmitAssemblyHelper()
125 if (CodeGenOpts.DisableFree) in ~EmitAssemblyHelper()
231 const CodeGenOptions &CodeGenOpts) { in createTLI() argument
233 if (!CodeGenOpts.SimplifyLibCalls) in createTLI()
250 unsigned OptLevel = CodeGenOpts.OptimizationLevel; in CreatePasses()
251 CodeGenOptions::InliningMethod Inlining = CodeGenOpts.getInlining(); in CreatePasses()
255 if (CodeGenOpts.DisableLLVMOpts) { in CreatePasses()
257 Inlining = CodeGenOpts.NoInlining; in CreatePasses()
260 PassManagerBuilderWrapper PMBuilder(CodeGenOpts, LangOpts); in CreatePasses()
262 PMBuilder.SizeLevel = CodeGenOpts.OptimizeSize; in CreatePasses()
263 PMBuilder.BBVectorize = CodeGenOpts.VectorizeBB; in CreatePasses()
264 PMBuilder.SLPVectorize = CodeGenOpts.VectorizeSLP; in CreatePasses()
265 PMBuilder.LoopVectorize = CodeGenOpts.VectorizeLoop; in CreatePasses()
267 PMBuilder.DisableTailCalls = CodeGenOpts.DisableTailCalls; in CreatePasses()
268 PMBuilder.DisableUnitAtATime = !CodeGenOpts.UnitAtATime; in CreatePasses()
269 PMBuilder.DisableUnrollLoops = !CodeGenOpts.UnrollLoops; in CreatePasses()
270 PMBuilder.MergeFunctions = CodeGenOpts.MergeFunctions; in CreatePasses()
271 PMBuilder.RerollLoops = CodeGenOpts.RerollLoops; in CreatePasses()
276 if (!CodeGenOpts.SampleProfileFile.empty()) in CreatePasses()
297 if (CodeGenOpts.SanitizeCoverage) { in CreatePasses()
334 PMBuilder.LibraryInfo = createTLI(TargetTriple, CodeGenOpts); in CreatePasses()
340 createFunctionInliningPass(OptLevel, CodeGenOpts.OptimizeSize); in CreatePasses()
355 if (CodeGenOpts.VerifyModule) in CreatePasses()
361 if (!CodeGenOpts.RewriteMapFiles.empty()) in CreatePasses()
362 addSymbolRewriterPass(CodeGenOpts, MPM); in CreatePasses()
363 if (CodeGenOpts.VerifyModule) in CreatePasses()
366 if (!CodeGenOpts.DisableGCov && in CreatePasses()
367 (CodeGenOpts.EmitGcovArcs || CodeGenOpts.EmitGcovNotes)) { in CreatePasses()
371 Options.EmitNotes = CodeGenOpts.EmitGcovNotes; in CreatePasses()
372 Options.EmitData = CodeGenOpts.EmitGcovArcs; in CreatePasses()
373 memcpy(Options.Version, CodeGenOpts.CoverageVersion, 4); in CreatePasses()
374 Options.UseCfgChecksum = CodeGenOpts.CoverageExtraChecksum; in CreatePasses()
375 Options.NoRedZone = CodeGenOpts.DisableRedZone; in CreatePasses()
377 !CodeGenOpts.CoverageNoFunctionNamesInData; in CreatePasses()
379 if (CodeGenOpts.getDebugInfo() == CodeGenOptions::NoDebugInfo) in CreatePasses()
383 if (CodeGenOpts.ProfileInstrGenerate) { in CreatePasses()
385 Options.NoRedZone = CodeGenOpts.DisableRedZone; in CreatePasses()
404 llvm::StringSwitch<unsigned>(CodeGenOpts.CodeModel) in CreateTargetMachine()
416 if (!CodeGenOpts.DebugPass.empty()) { in CreateTargetMachine()
418 BackendArgs.push_back(CodeGenOpts.DebugPass.c_str()); in CreateTargetMachine()
420 if (!CodeGenOpts.LimitFloatPrecision.empty()) { in CreateTargetMachine()
422 BackendArgs.push_back(CodeGenOpts.LimitFloatPrecision.c_str()); in CreateTargetMachine()
426 for (unsigned i = 0, e = CodeGenOpts.BackendOptions.size(); i != e; ++i) in CreateTargetMachine()
427 BackendArgs.push_back(CodeGenOpts.BackendOptions[i].c_str()); in CreateTargetMachine()
428 if (CodeGenOpts.NoGlobalMerge) in CreateTargetMachine()
445 if (CodeGenOpts.RelocationModel == "static") { in CreateTargetMachine()
447 } else if (CodeGenOpts.RelocationModel == "pic") { in CreateTargetMachine()
450 assert(CodeGenOpts.RelocationModel == "dynamic-no-pic" && in CreateTargetMachine()
456 switch (CodeGenOpts.OptimizationLevel) { in CreateTargetMachine()
465 llvm::StringSwitch<llvm::ThreadModel::Model>(CodeGenOpts.ThreadModel) in CreateTargetMachine()
469 if (CodeGenOpts.DisableIntegratedAS) in CreateTargetMachine()
472 if (CodeGenOpts.CompressDebugSections) in CreateTargetMachine()
476 if (!CodeGenOpts.DisableFPElim) { in CreateTargetMachine()
478 } else if (CodeGenOpts.OmitLeafFramePointer) { in CreateTargetMachine()
484 if (CodeGenOpts.UseInitArray) in CreateTargetMachine()
488 if (CodeGenOpts.FloatABI == "soft" || CodeGenOpts.FloatABI == "softfp") in CreateTargetMachine()
490 else if (CodeGenOpts.FloatABI == "hard") in CreateTargetMachine()
493 assert(CodeGenOpts.FloatABI.empty() && "Invalid float abi!"); in CreateTargetMachine()
498 switch (CodeGenOpts.getFPContractMode()) { in CreateTargetMachine()
510 Options.LessPreciseFPMADOption = CodeGenOpts.LessPreciseFPMAD; in CreateTargetMachine()
511 Options.NoInfsFPMath = CodeGenOpts.NoInfsFPMath; in CreateTargetMachine()
512 Options.NoNaNsFPMath = CodeGenOpts.NoNaNsFPMath; in CreateTargetMachine()
513 Options.NoZerosInBSS = CodeGenOpts.NoZeroInitializedInBSS; in CreateTargetMachine()
514 Options.UnsafeFPMath = CodeGenOpts.UnsafeFPMath; in CreateTargetMachine()
515 Options.UseSoftFloat = CodeGenOpts.SoftFloat; in CreateTargetMachine()
516 Options.StackAlignmentOverride = CodeGenOpts.StackAlignment; in CreateTargetMachine()
517 Options.DisableTailCalls = CodeGenOpts.DisableTailCalls; in CreateTargetMachine()
518 Options.TrapFuncName = CodeGenOpts.TrapFuncName; in CreateTargetMachine()
520 Options.FunctionSections = CodeGenOpts.FunctionSections; in CreateTargetMachine()
521 Options.DataSections = CodeGenOpts.DataSections; in CreateTargetMachine()
523 Options.MCOptions.MCRelaxAll = CodeGenOpts.RelaxAll; in CreateTargetMachine()
524 Options.MCOptions.MCSaveTempLabels = CodeGenOpts.SaveTempLabels; in CreateTargetMachine()
525 Options.MCOptions.MCUseDwarfDirectory = !CodeGenOpts.NoDwarfDirectoryAsm; in CreateTargetMachine()
526 Options.MCOptions.MCNoExecStack = CodeGenOpts.NoExecStack; in CreateTargetMachine()
527 Options.MCOptions.MCFatalWarnings = CodeGenOpts.FatalWarnings; in CreateTargetMachine()
528 Options.MCOptions.AsmVerbose = CodeGenOpts.AsmVerbose; in CreateTargetMachine()
546 PM->add(createTLI(TargetTriple, CodeGenOpts)); in AddEmitPasses()
565 CodeGenOpts.OptimizationLevel > 0) in AddEmitPasses()
569 /*DisableVerify=*/!CodeGenOpts.VerifyModule)) { in AddEmitPasses()