LLVM 20.0.0git
|
This file defines the C bindings to the new pass manager. More...
#include "llvm-c/Transforms/PassBuilder.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Verifier.h"
#include "llvm/Passes/PassBuilder.h"
#include "llvm/Passes/StandardInstrumentations.h"
#include "llvm/Support/CBindingWrapping.h"
Go to the source code of this file.
Classes | |
class | llvm::LLVMPassBuilderOptions |
Helper struct for holding a set of builder options for LLVMRunPasses. More... | |
Namespaces | |
namespace | llvm |
This is an optimization pass for GlobalISel generic memory operations. | |
Variables | |
Function * | Fun |
Function const char * | Passes |
Function const char TargetMachine * | Machine |
Function const char TargetMachine LLVMPassBuilderOptions * | PassOpts |
bool | VerifyEach = PassOpts->VerifyEach |
PassInstrumentationCallbacks | PIC |
LoopAnalysisManager | LAM |
FunctionAnalysisManager | FAM |
CGSCCAnalysisManager | CGAM |
ModuleAnalysisManager | MAM |
else | |
if(auto Err=PB.parsePassPipeline(MPM, Passes)) return wrap(std MPM run * | Mod |
return | LLVMErrorSuccess |
This file defines the C bindings to the new pass manager.
Definition in file PassBuilderBindings.cpp.
DEFINE_SIMPLE_CONVERSION_FUNCTIONS | ( | LLVMPassBuilderOptions | , |
LLVMPassBuilderOptionsRef | |||
) |
if | ( | Fun | ) |
Definition at line 82 of file PassBuilderBindings.cpp.
References llvm::PassManager< IRUnitT, AnalysisManagerT, ExtraArgTs >::addPass(), FAM, Fun, llvm::PassBuilder::parsePassPipeline(), Passes, PB(), llvm::PassManager< IRUnitT, AnalysisManagerT, ExtraArgTs >::run(), VerifyEach, and llvm::wrap().
if | ( | PassOpts-> | AAPipeline | ) |
Definition at line 64 of file PassBuilderBindings.cpp.
References FAM, llvm::PassBuilder::parseAAPipeline(), PassOpts, PB(), llvm::AnalysisManager< IRUnitT, ExtraArgTs >::registerPass(), and llvm::wrap().
Referenced by _rpmalloc_heap_global_finalize(), llvm::AArch64LegalizerInfo::AArch64LegalizerInfo(), llvm::slpvectorizer::BoUpSLP::ShuffleCostEstimator::add(), allocset(), applyFirstDebugLoc(), llvm::SwitchCG::SwitchLowering::buildBitTests(), canLowerToLDG(), llvm::GenericScheduler::checkAcyclicLatency(), llvm::dwarf_linker::parallel::DIEAttributeCloner::cloneStringAttr(), llvm::CtxProfAnalysis::collectIndirectCallPromotionList(), llvm::IRSimilarity::IRSimilarityCandidate::compareNonCommutativeOperandMapping(), llvm::slpvectorizer::BoUpSLP::computeMinimumValueSizes(), llvm::DebuginfodServer::DebuginfodServer(), llvm::VPlanTransforms::dropPoisonGeneratingRecipes(), llvm::RangeListEntry::dump(), llvm::DWARFLocationTable::dumpLocationList(), eliminateConstraints(), llvm::AArch64FrameLowering::emitEpilogue(), llvm::AsmPrinter::emitFunctionBody(), llvm::LoopVectorizationPlanner::emitInvalidCostRemarks(), llvm::LoopVectorizeHints::emitRemarkWithHints(), llvm::MCDwarfLineAddr::encode(), llvm::SystemZPostRASchedStrategy::enterMBB(), llvm::opt::OptTable::findNearest(), findReturnsToZap(), llvm::InstCombinerImpl::foldIntegerTypedPHI(), llvm::gatherUnrollingPreferences(), llvm::ARMTTIImpl::getArithmeticInstrCost(), llvm::DWARFFormValue::getAsSectionedAddress(), llvm::Clause::getFormattedParserClassName(), llvm::IndexedInstrProfReader::getInstrProfRecord(), llvm::AArch64TTIImpl::getIntrinsicInstrCost(), llvm::X86TTIImpl::getMinMaxReductionCost(), llvm::NVPTXTargetLowering::getPrototype(), llvm::RISCVTTIImpl::getVectorInstrCost(), llvm::objcopy::coff::handleArgs(), hashFullyQualifiedName(), llvm::GCNSchedStage::initGCNRegion(), llvm::object::DirectX::Signature::initialize(), llvm::orc::IRMaterializationUnit::IRMaterializationUnit(), isDereferenceableAndAlignedPointer(), llvm::isSafeToMoveBefore(), llvm::isSafeToUnrollAndJam(), lowerV4I32Shuffle(), llvm::AMDGPUSubtarget::makeLIDRangeMetadata(), llvm::MipsLegalizerInfo::MipsLegalizerInfo(), llvm::MLInlineAdvisor::onSuccessfulInlining(), llvm::opt::OptTable::ParseArgs(), llvm::opt::OptTable::ParseOneArg(), llvm::performOptimizedStructLayout(), predictValueUseListOrder(), predictValueUseListOrderImpl(), llvm::print(), llvm::CallGraph::print(), llvm::json::Path::Root::printErrorContext(), llvm::opt::OptTable::printHelp(), llvm::printReg(), llvm::printRegClassOrBank(), qualifyCalleeCandidates(), llvm::WebAssemblyExceptionInfo::recalculate(), llvm::objcopy::elf::Object::removeSections(), llvm::reportMismatch(), llvm::SystemZPostRASchedStrategy::schedNode(), llvm::sandboxir::SeedCollector::SeedCollector(), llvm::GenericSchedulerBase::setPolicy(), simplifyAMDGCNImageIntrinsic(), sortGlobalExprs(), translateImmediate(), translateRMMemory(), updateAndRemoveSymbols(), updateRegisterMapForDbgValueListAfterMove(), llvm::objcopy::elf::ELFSectionWriter< ELFT >::visit(), llvm::DWARFLocationTable::visitAbsoluteLocationList(), llvm::logicalview::LVSymbolVisitor::visitKnownRecord(), llvm::logicalview::LVTypeVisitor::visitKnownRecord(), llvm::InstCombinerImpl::visitPHINode(), llvm::coverage::CoverageMappingWriter::write(), llvm::TimeTraceProfiler::write(), and writeMemProfFrameArray().
if | ( | VerifyEach | ) |
PassBuilder PB | ( | Machine | , |
PassOpts-> | PTO, | ||
std::nullopt | , | ||
& | PIC | ||
) |
Referenced by llvm::CodeGenPassBuilder< DerivedT, TargetMachineT >::AddIRPass::AddIRPass(), llvm::CodeGenPassBuilder< DerivedT, TargetMachineT >::AddMachinePass::AddMachinePass(), llvm::rdf::DataFlowGraph::build(), llvm::PredicateBase::classof(), llvm::PredicateAssume::classof(), llvm::PredicateWithEdge::classof(), llvm::PredicateBranch::classof(), llvm::PredicateSwitch::classof(), llvm::PredicateInfoAnnotatedWriter::emitInstructionAnnot(), llvm::HexagonInstrInfo::findLoopInstr(), llvm::MachineLoopInfo::findLoopPreheader(), GetSymbolRef(), if(), INITIALIZE_PASS(), llvm::orc::BlockFreqQuery::operator()(), optimizeModule(), llvm::PassPlugin::registerPassBuilderCallbacks(), llvm::AArch64TargetMachine::registerPassBuilderCallbacks(), llvm::AMDGPUTargetMachine::registerPassBuilderCallbacks(), llvm::BPFTargetMachine::registerPassBuilderCallbacks(), llvm::HexagonTargetMachine::registerPassBuilderCallbacks(), llvm::NVPTXTargetMachine::registerPassBuilderCallbacks(), llvm::RISCVTargetMachine::registerPassBuilderCallbacks(), RegisterPassPlugins(), llvm::PGOCtxProfFlatteningPass::run(), runNewPMPasses(), and llvm::AMDGPUTargetMachine::splitModule().
StandardInstrumentations SI | ( | Mod-> | getContext(), |
Debug | , | ||
VerifyEach | |||
) |
Referenced by llvm::InstCombinerImpl::CreateNonTerminatorUnreachable(), llvm::SwitchInst::CaseIteratorImpl< CaseHandleT >::fromSuccessorIndex(), llvm::SwitchInst::CaseHandleImpl< SwitchInstT, ConstantIntT, BasicBlockT >::getCaseSuccessor(), llvm::SwitchInst::CaseHandleImpl< SwitchInstT, ConstantIntT, BasicBlockT >::getCaseValue(), llvm::DOTGraphTraits< DOTFuncInfo * >::getEdgeSourceLabel(), llvm::SwitchInst::CaseHandleImpl< SwitchInstT, ConstantIntT, BasicBlockT >::operator==(), llvm::SwitchInst::CaseHandle::setSuccessor(), llvm::SwitchInst::CaseHandle::setValue(), llvm::InstCombiner::shouldAvoidAbsorbingNotIntoSelect(), and llvm::PtrUseVisitor< DerivedT >::visitStoreInst().
|
static |
Definition at line 44 of file PassBuilderBindings.cpp.
References P.
Referenced by LLVMDisposePassBuilderOptions(), LLVMPassBuilderOptionsSetAAPipeline(), LLVMPassBuilderOptionsSetCallGraphProfile(), LLVMPassBuilderOptionsSetDebugLogging(), LLVMPassBuilderOptionsSetForgetAllSCEVInLoopUnroll(), LLVMPassBuilderOptionsSetInlinerThreshold(), LLVMPassBuilderOptionsSetLicmMssaNoAccForPromotionCap(), LLVMPassBuilderOptionsSetLicmMssaOptCap(), LLVMPassBuilderOptionsSetLoopInterleaving(), LLVMPassBuilderOptionsSetLoopUnrolling(), LLVMPassBuilderOptionsSetLoopVectorization(), LLVMPassBuilderOptionsSetMergeFunctions(), LLVMPassBuilderOptionsSetSLPVectorization(), LLVMPassBuilderOptionsSetVerifyEach(), LLVMRunPasses(), and LLVMRunPassesOnFunction().
CGSCCAnalysisManager CGAM |
Definition at line 62 of file PassBuilderBindings.cpp.
Referenced by llvm::PassBuilder::crossRegisterProxies(), optimizeModule(), llvm::PassBuilder::registerCGSCCAnalyses(), llvm::ModuleToPostOrderCGSCCPassAdaptor::run(), runNewPMPasses(), and llvm::AMDGPUTargetMachine::splitModule().
else |
Definition at line 89 of file PassBuilderBindings.cpp.
Definition at line 61 of file PassBuilderBindings.cpp.
Referenced by llvm::AnalysisGetter::AnalysisGetter(), llvm::OpenMPIRBuilder::applySimd(), computeHeuristicUnrollFactor(), computeVirtualCallSiteTypeInfoMap(), llvm::PassBuilder::crossRegisterProxies(), doPromotion(), eliminateDeadCode(), findArgParts(), llvm::FunctionPropertiesUpdater::finish(), llvm::FunctionPropertiesUpdater::finishAndTest(), llvm::FunctionAnalysisManagerMachineFunctionProxy::FunctionAnalysisManagerMachineFunctionProxy(), llvm::FunctionSpecializer::FunctionSpecializer(), getDefaultInlineAdvice(), llvm::getDefaultInlineOrder(), llvm::FunctionPropertiesInfo::getFunctionPropertiesInfo(), llvm::getInlineOrder(), llvm::getReplayInlineAdvisor(), if(), incorporateNewSCCRange(), llvm::AMDGPULibCalls::initFunction(), llvm::CallGraphUpdater::initialize(), llvm::SelectionDAGISel::initializeAnalysisResults(), llvm::FunctionAnalysisManagerCGSCCProxy::Result::invalidate(), isArgUnmodifiedByAllCalls(), llvm::lintFunction(), llvm::orc::BlockFreqQuery::operator()(), optimizeModule(), llvm::MIRParserImpl::parseMachineFunction(), promoteArguments(), promoteIndirectCalls(), llvm::PreservedCFGCheckerInstrumentation::registerCallbacks(), llvm::PassBuilder::registerFunctionAnalyses(), llvm::FunctionAnalysisManagerCGSCCProxy::Result::Result(), llvm::FunctionAnalysisManagerMachineFunctionProxy::Result::Result(), llvm::AMDGPUCodeGenPreparePass::run(), llvm::AMDGPULateCodeGenPreparePass::run(), llvm::AssumptionAnalysis::run(), llvm::UniformityInfoAnalysis::run(), llvm::ADCEPass::run(), llvm::DivRemPairsPass::run(), llvm::VectorCombinePass::run(), llvm::LoopAccessAnalysis::run(), llvm::AMDGPUAnnotateUniformValuesPass::run(), llvm::SIAnnotateControlFlowPass::run(), llvm::DXILResourceAccess::run(), llvm::DependenceAnalysis::run(), llvm::DependenceAnalysisPrinterPass::run(), llvm::DOTGraphTraitsViewer< AnalysisT, IsSimple, GraphT, AnalysisGraphTraitsT >::run(), llvm::DOTGraphTraitsPrinter< AnalysisT, IsSimple, GraphT, AnalysisGraphTraitsT >::run(), llvm::FunctionPropertiesAnalysis::run(), llvm::InlineCostAnnotationPrinterPass::run(), llvm::LazyValueAnalysis::run(), llvm::DebugAssignmentTrackingPrinterPass::run(), llvm::DwarfEHPreparePass::run(), llvm::ExpandMemCmpPass::run(), llvm::GCFunctionAnalysis::run(), llvm::GCLoweringPass::run(), llvm::IndirectBrExpandPass::run(), llvm::InterleavedAccessPass::run(), llvm::InterleavedLoadCombinePass::run(), llvm::MachineFunctionAnalysis::run(), llvm::FunctionToMachineFunctionPassAdaptor::run(), llvm::SafeStackPass::run(), llvm::SelectOptimizePass::run(), llvm::StackProtectorPass::run(), llvm::ControlHeightReductionPass::run(), llvm::ThreadSanitizerPass::run(), llvm::TypeSanitizerPass::run(), llvm::LoopSinkPass::run(), llvm::LibCallsShrinkWrapPass::run(), llvm::PGOMemOPSizeOpt::run(), llvm::CallBrPreparePass::run(), llvm::CGSCCToFunctionPassAdaptor::run(), llvm::CoroAnnotationElidePass::run(), llvm::CoroSplitPass::run(), llvm::ArgumentPromotionPass::run(), llvm::AttributorCGSCCPass::run(), llvm::AttributorLightCGSCCPass::run(), llvm::PostOrderFunctionAttrsPass::run(), llvm::InlinerPass::run(), llvm::OpenMPOptCGSCCPass::run(), llvm::PassManager< IRUnitT, AnalysisManagerT, ExtraArgTs >::run(), llvm::AMDGPUISelDAGToDAGPass::run(), llvm::SILoadStoreOptimizerPass::run(), llvm::ModuleInlinerPass::run(), llvm::MetaRenamerPass::run(), llvm::AlwaysInlinerPass::run(), llvm::PartialInlinerPass::run(), llvm::WholeProgramDevirtPass::run(), llvm::CallGraphDOTPrinterPass::run(), llvm::CallGraphViewerPass::run(), llvm::ModuleToPostOrderCGSCCPassAdaptor::run(), llvm::GlobalsAA::run(), llvm::LazyCallGraphAnalysis::run(), llvm::ModuleSummaryIndexAnalysis::run(), llvm::MustBeExecutedContextPrinterPass::run(), llvm::StackSafetyGlobalAnalysis::run(), llvm::PreISelIntrinsicLoweringPass::run(), llvm::AddressSanitizerPass::run(), llvm::CGProfilePass::run(), llvm::DataFlowSanitizerPass::run(), llvm::GCOVProfilerPass::run(), llvm::InstrProfilingLoweringPass::run(), llvm::MemorySanitizerPass::run(), llvm::MemProfUsePass::run(), llvm::NumericalStabilitySanitizerPass::run(), llvm::PGOForceFunctionAttrsPass::run(), llvm::SanitizerCoveragePass::run(), llvm::AttributorPass::run(), llvm::AttributorLightPass::run(), llvm::GlobalOptPass::run(), llvm::HotColdSplittingPass::run(), llvm::InferFunctionAttrsPass::run(), llvm::IROutlinerPass::run(), llvm::LoopExtractorPass::run(), llvm::MemProfContextDisambiguation::run(), llvm::OpenMPOptPass::run(), llvm::SampleProfileLoaderPass::run(), llvm::PseudoProbeUpdatePass::run(), llvm::IPSCCPPass::run(), llvm::ThinLTOBitcodeWriterPass::run(), llvm::RewriteStatepointsForGC::run(), llvm::RelLookupTableConverterPass::run(), llvm::AMDGPUSwLowerLDSPass::run(), llvm::AMDGPUAttributorPass::run(), llvm::ShadowStackGCLoweringPass::run(), llvm::CoroCleanupPass::run(), llvm::HWAddressSanitizerPass::run(), llvm::PGOInstrumentationGen::run(), llvm::PGOInstrumentationUse::run(), llvm::AMDGPUSplitModulePass::run(), runAttributorLightOnFunctions(), runCGProfilePass(), runIPSCCP(), runNewPMPasses(), shouldRunOnFunction(), llvm::AMDGPUTargetMachine::splitModule(), llvm::InlineAdvisorAnalysis::Result::tryCreate(), llvm::MLInlineAdvice::updateCachedCallerFPI(), updateCallGraphAfterCoroutineSplit(), llvm::updateCGAndAnalysisManagerForCGSCCPass(), llvm::updateCGAndAnalysisManagerForFunctionPass(), updateCGAndAnalysisManagerForPass(), llvm::FunctionAnalysisManagerCGSCCProxy::Result::updateFAM(), and updateNewSCCFunctionAnalyses().
Function* Fun |
Definition at line 51 of file PassBuilderBindings.cpp.
Referenced by if(), and LLVMRunPassesOnFunction().
Definition at line 60 of file PassBuilderBindings.cpp.
Referenced by llvm::PassBuilder::crossRegisterProxies(), optimizeModule(), llvm::PassBuilder::registerLoopAnalyses(), llvm::FunctionToLoopPassAdaptor::run(), llvm::LoopUnrollPass::run(), runNewPMPasses(), and llvm::AMDGPUTargetMachine::splitModule().
return LLVMErrorSuccess |
Definition at line 98 of file PassBuilderBindings.cpp.
Function const char TargetMachine* Machine |
Definition at line 52 of file PassBuilderBindings.cpp.
Referenced by LLVMRunPasses(), and LLVMRunPassesOnFunction().
Definition at line 63 of file PassBuilderBindings.cpp.
Referenced by computeVirtualCallSiteTypeInfoMap(), llvm::PassBuilder::crossRegisterProxies(), llvm::getInlineOrder(), llvm::getReleaseModeAdvisor(), optimizeModule(), llvm::MIRParserImpl::parseMachineFunction(), llvm::MIRParserImpl::parseMachineFunctions(), llvm::MIRParser::parseMachineFunctions(), promoteIndirectCalls(), llvm::PreservedCFGCheckerInstrumentation::registerCallbacks(), llvm::DebugifyEachInstrumentation::registerCallbacks(), llvm::VerifyInstrumentation::registerCallbacks(), llvm::StandardInstrumentations::registerCallbacks(), llvm::PassBuilder::registerModuleAnalyses(), llvm::InlineAdvisorAnalysis::Result::Result(), llvm::ModuleInlinerWrapperPass::run(), llvm::ModuleInlinerPass::run(), llvm::AlwaysInlinerPass::run(), llvm::EliminateAvailableExternallyPass::run(), llvm::DXILPrettyPrinterPass::run(), llvm::DXILTranslateMetadata::run(), llvm::AddressSanitizerPass::run(), llvm::CGProfilePass::run(), llvm::NumericalStabilitySanitizerPass::run(), llvm::SanitizerCoveragePass::run(), llvm::CtxProfAnalysisPrinterPass::run(), llvm::InlineAdvisorAnalysis::run(), llvm::InlineAdvisorAnalysisPrinterPass::run(), llvm::ShadowStackGCLoweringPass::run(), llvm::CoroCleanupPass::run(), llvm::HipStdParAcceleratorCodeSelectionPass::run(), llvm::HWAddressSanitizerPass::run(), llvm::PGOCtxProfFlatteningPass::run(), llvm::PGOCtxProfLoweringPass::run(), llvm::PGOInstrumentationGen::run(), llvm::PGOInstrumentationUse::run(), llvm::PGOIndirectCallPromotion::run(), llvm::AMDGPUSplitModulePass::run(), llvm::DXILOpLowering::run(), runNewPMPasses(), and llvm::AMDGPUTargetMachine::splitModule().
Definition at line 95 of file PassBuilderBindings.cpp.
Referenced by llvm::LTOModule::getModule(), LLVMCreateMCJITCompilerForModule(), LLVMGetFirstFunction(), LLVMGetFirstGlobal(), LLVMGetFirstGlobalAlias(), LLVMGetFirstGlobalIFunc(), LLVMGetFirstNamedMetadata(), LLVMGetIntrinsicDeclaration(), LLVMGetLastFunction(), LLVMGetLastGlobal(), LLVMGetLastGlobalAlias(), LLVMGetLastGlobalIFunc(), LLVMGetLastNamedMetadata(), LLVMIntrinsicCopyOverloadedName2(), LLVMRemoveModule(), LLVMRunPasses(), LLVMTargetMachineEmit(), loadModuleFromInput(), maybePrintCallAddrSpace(), modRMByte(), llvm::yaml::BlockScalarTraits< Module >::output(), switchToLookupTable(), and llvm::LTOModule::takeModule().
Definition at line 51 of file PassBuilderBindings.cpp.
Referenced by if(), llvm::jitlink::JITLinkerBase::JITLinkerBase(), LLVMRunPasses(), LLVMRunPassesOnFunction(), llvm::PassManager< IRUnitT, AnalysisManagerT, ExtraArgTs >::run(), and simplifySetCCWithCTPOP().
Function const char TargetMachine LLVMPassBuilderOptions* PassOpts |
Definition at line 53 of file PassBuilderBindings.cpp.
Referenced by if(), LLVMRunPasses(), and LLVMRunPassesOnFunction().
Definition at line 57 of file PassBuilderBindings.cpp.
Referenced by llvm::X86TargetMachine::buildCodeGenPipeline(), llvm::R600TargetMachine::buildCodeGenPipeline(), llvm::GCNTargetMachine::buildCodeGenPipeline(), llvm::CodeGenPassBuilder< DerivedT, TargetMachineT >::buildPipeline(), llvm::Target::createMCObjectFileInfo(), createRISCVMCObjectFileInfo(), llvm::PassBuilder::getPassInstrumentationCallbacks(), llvm::MCObjectFileInfo::initMCObjectFileInfo(), optimizeModule(), llvm::PassBuilder::PassBuilder(), llvm::promoteLoopAccessesToScalars(), llvm::DroppedVariableStatsIR::registerCallbacks(), llvm::TimePassesHandler::registerCallbacks(), llvm::PrintIRInstrumentation::registerCallbacks(), llvm::OptNoneInstrumentation::registerCallbacks(), llvm::OptPassGateInstrumentation::registerCallbacks(), llvm::PrintPassInstrumentation::registerCallbacks(), llvm::IRChangedPrinter::registerCallbacks(), llvm::IRChangedTester::registerCallbacks(), llvm::InLineChangePrinter::registerCallbacks(), llvm::TimeProfilingPassesHandler::registerCallbacks(), llvm::DotCfgChangeReporter::registerCallbacks(), llvm::PrintCrashIRInstrumentation::registerCallbacks(), llvm::PseudoProbeVerifier::registerCallbacks(), llvm::PreservedCFGCheckerInstrumentation::registerCallbacks(), llvm::DebugifyEachInstrumentation::registerCallbacks(), llvm::VerifyInstrumentation::registerCallbacks(), llvm::StandardInstrumentations::registerCallbacks(), llvm::registerCodeGenCallback(), llvm::ChangeReporter< IRUnitT >::registerRequiredCallbacks(), and runNewPMPasses().
Definition at line 55 of file PassBuilderBindings.cpp.
Referenced by if(), and LLVMPassBuilderOptionsSetVerifyEach().