clang
10.0.0git
|
#include "clang/CodeGen/BackendUtil.h"
#include "clang/Basic/CodeGenOptions.h"
#include "clang/Basic/Diagnostic.h"
#include "clang/Basic/LangOptions.h"
#include "clang/Basic/TargetOptions.h"
#include "clang/Frontend/FrontendDiagnostic.h"
#include "clang/Frontend/Utils.h"
#include "clang/Lex/HeaderSearchOptions.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/ADT/Triple.h"
#include "llvm/Analysis/TargetLibraryInfo.h"
#include "llvm/Analysis/TargetTransformInfo.h"
#include "llvm/Bitcode/BitcodeReader.h"
#include "llvm/Bitcode/BitcodeWriter.h"
#include "llvm/Bitcode/BitcodeWriterPass.h"
#include "llvm/CodeGen/RegAllocRegistry.h"
#include "llvm/CodeGen/SchedulerRegistry.h"
#include "llvm/CodeGen/TargetSubtargetInfo.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/IRPrintingPasses.h"
#include "llvm/IR/LegacyPassManager.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/ModuleSummaryIndex.h"
#include "llvm/IR/Verifier.h"
#include "llvm/LTO/LTOBackend.h"
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/SubtargetFeature.h"
#include "llvm/Passes/PassBuilder.h"
#include "llvm/Passes/PassPlugin.h"
#include "llvm/Passes/StandardInstrumentations.h"
#include "llvm/Support/BuryPointer.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/PrettyStackTrace.h"
#include "llvm/Support/TargetRegistry.h"
#include "llvm/Support/TimeProfiler.h"
#include "llvm/Support/Timer.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetOptions.h"
#include "llvm/Transforms/Coroutines.h"
#include "llvm/Transforms/IPO.h"
#include "llvm/Transforms/IPO/AlwaysInliner.h"
#include "llvm/Transforms/IPO/PassManagerBuilder.h"
#include "llvm/Transforms/IPO/ThinLTOBitcodeWriter.h"
#include "llvm/Transforms/InstCombine/InstCombine.h"
#include "llvm/Transforms/Instrumentation.h"
#include "llvm/Transforms/Instrumentation/AddressSanitizer.h"
#include "llvm/Transforms/Instrumentation/BoundsChecking.h"
#include "llvm/Transforms/Instrumentation/GCOVProfiler.h"
#include "llvm/Transforms/Instrumentation/HWAddressSanitizer.h"
#include "llvm/Transforms/Instrumentation/InstrProfiling.h"
#include "llvm/Transforms/Instrumentation/MemorySanitizer.h"
#include "llvm/Transforms/Instrumentation/SanitizerCoverage.h"
#include "llvm/Transforms/Instrumentation/ThreadSanitizer.h"
#include "llvm/Transforms/ObjCARC.h"
#include "llvm/Transforms/Scalar.h"
#include "llvm/Transforms/Scalar/GVN.h"
#include "llvm/Transforms/Utils.h"
#include "llvm/Transforms/Utils/CanonicalizeAliases.h"
#include "llvm/Transforms/Utils/EntryExitInstrumenter.h"
#include "llvm/Transforms/Utils/NameAnonGlobals.h"
#include "llvm/Transforms/Utils/SymbolRewriter.h"
#include <memory>
#include "llvm/Support/Extension.def"
Go to the source code of this file.
Macros | |
#define | HANDLE_EXTENSION(Ext) llvm::PassPluginLibraryInfo get##Ext##PluginInfo(); |
#define | HANDLE_EXTENSION(Ext) get##Ext##PluginInfo().RegisterPassBuilderCallbacks(PB); |
Functions | |
static void | addObjCARCAPElimPass (const PassManagerBuilder &Builder, PassManagerBase &PM) |
static void | addObjCARCExpandPass (const PassManagerBuilder &Builder, PassManagerBase &PM) |
static void | addObjCARCOptPass (const PassManagerBuilder &Builder, PassManagerBase &PM) |
static void | addAddDiscriminatorsPass (const PassManagerBuilder &Builder, legacy::PassManagerBase &PM) |
static void | addBoundsCheckingPass (const PassManagerBuilder &Builder, legacy::PassManagerBase &PM) |
static SanitizerCoverageOptions | getSancovOptsFromCGOpts (const CodeGenOptions &CGOpts) |
static void | addSanitizerCoveragePass (const PassManagerBuilder &Builder, legacy::PassManagerBase &PM) |
static bool | asanUseGlobalsGC (const Triple &T, const CodeGenOptions &CGOpts) |
static void | addAddressSanitizerPasses (const PassManagerBuilder &Builder, legacy::PassManagerBase &PM) |
static void | addKernelAddressSanitizerPasses (const PassManagerBuilder &Builder, legacy::PassManagerBase &PM) |
static void | addHWAddressSanitizerPasses (const PassManagerBuilder &Builder, legacy::PassManagerBase &PM) |
static void | addKernelHWAddressSanitizerPasses (const PassManagerBuilder &Builder, legacy::PassManagerBase &PM) |
static void | addGeneralOptsForMemorySanitizer (const PassManagerBuilder &Builder, legacy::PassManagerBase &PM, bool CompileKernel) |
static void | addMemorySanitizerPass (const PassManagerBuilder &Builder, legacy::PassManagerBase &PM) |
static void | addKernelMemorySanitizerPass (const PassManagerBuilder &Builder, legacy::PassManagerBase &PM) |
static void | addThreadSanitizerPass (const PassManagerBuilder &Builder, legacy::PassManagerBase &PM) |
static void | addDataFlowSanitizerPass (const PassManagerBuilder &Builder, legacy::PassManagerBase &PM) |
static TargetLibraryInfoImpl * | createTLII (llvm::Triple &TargetTriple, const CodeGenOptions &CodeGenOpts) |
static void | addSymbolRewriterPass (const CodeGenOptions &Opts, legacy::PassManager *MPM) |
static CodeGenOpt::Level | getCGOptLevel (const CodeGenOptions &CodeGenOpts) |
static Optional< llvm::CodeModel::Model > | getCodeModel (const CodeGenOptions &CodeGenOpts) |
static CodeGenFileType | getCodeGenFileType (BackendAction Action) |
static void | initTargetOptions (llvm::TargetOptions &Options, const CodeGenOptions &CodeGenOpts, const clang::TargetOptions &TargetOpts, const LangOptions &LangOpts, const HeaderSearchOptions &HSOpts) |
static Optional< GCOVOptions > | getGCOVOptions (const CodeGenOptions &CodeGenOpts) |
static Optional< InstrProfOptions > | getInstrProfOptions (const CodeGenOptions &CodeGenOpts, const LangOptions &LangOpts) |
static void | setCommandLineOpts (const CodeGenOptions &CodeGenOpts) |
static PassBuilder::OptimizationLevel | mapToLevel (const CodeGenOptions &Opts) |
static void | addSanitizersAtO0 (ModulePassManager &MPM, const Triple &TargetTriple, const LangOptions &LangOpts, const CodeGenOptions &CodeGenOpts) |
static void | runThinLTOBackend (ModuleSummaryIndex *CombinedIndex, Module *M, const HeaderSearchOptions &HeaderOpts, const CodeGenOptions &CGOpts, const clang::TargetOptions &TOpts, const LangOptions &LOpts, std::unique_ptr< raw_pwrite_stream > OS, std::string SampleProfile, std::string ProfileRemapping, BackendAction Action) |
#define HANDLE_EXTENSION | ( | Ext | ) | llvm::PassPluginLibraryInfo get##Ext##PluginInfo(); |
Definition at line 78 of file BackendUtil.cpp.
#define HANDLE_EXTENSION | ( | Ext | ) | get##Ext##PluginInfo().RegisterPassBuilderCallbacks(PB); |
Definition at line 78 of file BackendUtil.cpp.
|
static |
Definition at line 194 of file BackendUtil.cpp.
|
static |
Definition at line 255 of file BackendUtil.cpp.
|
static |
Definition at line 199 of file BackendUtil.cpp.
|
static |
Definition at line 335 of file BackendUtil.cpp.
|
static |
Definition at line 296 of file BackendUtil.cpp.
|
static |
Definition at line 280 of file BackendUtil.cpp.
|
static |
Definition at line 271 of file BackendUtil.cpp.
|
static |
Definition at line 290 of file BackendUtil.cpp.
|
static |
Definition at line 325 of file BackendUtil.cpp.
|
static |
Definition at line 320 of file BackendUtil.cpp.
|
static |
Definition at line 179 of file BackendUtil.cpp.
|
static |
Definition at line 184 of file BackendUtil.cpp.
|
static |
Definition at line 189 of file BackendUtil.cpp.
|
static |
Definition at line 224 of file BackendUtil.cpp.
|
static |
Definition at line 949 of file BackendUtil.cpp.
References asanUseGlobalsGC(), clang::Backend_EmitBC, clang::Backend_EmitLL, clang::Backend_EmitNothing, createTLII(), clang::FrontendTimesIsEnabled, clang::SanitizerSet::has(), clang::interp::Load(), clang::LangOptions::Sanitize, clang::CodeGenOptions::SanitizeRecover, setCommandLineOpts(), and toString().
|
static |
Definition at line 363 of file BackendUtil.cpp.
References clang::CodeGenOptions::RewriteMapFiles.
|
static |
Definition at line 330 of file BackendUtil.cpp.
|
static |
Definition at line 237 of file BackendUtil.cpp.
Referenced by addSanitizersAtO0().
|
static |
Definition at line 343 of file BackendUtil.cpp.
References clang::CodeGenOptions::Accelerate, clang::CodeGenOptions::MASSV, and clang::CodeGenOptions::SVML.
Referenced by addSanitizersAtO0().
|
static |
Definition at line 374 of file BackendUtil.cpp.
References clang::Default, clang::Less, and clang::None.
Referenced by runThinLTOBackend(), and setCommandLineOpts().
|
static |
Definition at line 405 of file BackendUtil.cpp.
References clang::Backend_EmitAssembly, clang::Backend_EmitMCNull, and clang::Backend_EmitObj.
Referenced by runThinLTOBackend().
|
static |
Definition at line 390 of file BackendUtil.cpp.
References clang::CodeGenOptions::CodeModel, and clang::None.
Referenced by runThinLTOBackend(), and setCommandLineOpts().
|
static |
Definition at line 506 of file BackendUtil.cpp.
References clang::None.
|
static |
Definition at line 527 of file BackendUtil.cpp.
References clang::CodeGenOptions::hasProfileClangInstr(), and clang::None.
|
static |
Definition at line 205 of file BackendUtil.cpp.
References Type.
|
static |
Definition at line 416 of file BackendUtil.cpp.
Referenced by runThinLTOBackend().
|
static |
Definition at line 921 of file BackendUtil.cpp.
|
static |
Definition at line 1361 of file BackendUtil.cpp.
References clang::Backend_EmitBC, clang::Backend_EmitLL, clang::Backend_EmitNothing, clang::TargetOptions::CPU, clang::EmitBackendOutput(), clang::DiagnosticsEngine::Error, clang::TargetOptions::Features, clang::FindThinLTOModule(), getCGOptLevel(), getCodeGenFileType(), getCodeModel(), clang::DiagnosticsEngine::getCustomDiagID(), clang::CodeGenOptions::hasProfileCSIRInstr(), clang::CodeGenOptions::hasProfileCSIRUse(), initTargetOptions(), clang::CodeGenOptions::InstrProfileOutput, clang::CodeGenOptions::OptRecordFile, clang::CodeGenOptions::OptRecordFormat, clang::CodeGenOptions::OptRecordPasses, clang::Module::print(), clang::CodeGenOptions::ProfileInstrumentUsePath, clang::CodeGenOptions::RelocationModel, clang::DiagnosticsEngine::Report(), clang::CodeGenOptions::SaveTempsFilePrefix, setCommandLineOpts(), clang::CodeGenOptions::SplitDwarfFile, clang::CodeGenOptions::SplitDwarfOutput, and clang::CodeGenOptions::ThinLTOIndexFile.
|
static |
Definition at line 735 of file BackendUtil.cpp.
References clang::CodeGenOptions::DebugPass, clang::Error, getCGOptLevel(), getCodeModel(), clang::CodeGenOptions::LimitFloatPrecision, and clang::Target.
Referenced by addSanitizersAtO0(), and runThinLTOBackend().