LLVM 22.0.0git
LinkAllPasses.h
Go to the documentation of this file.
1//===- llvm/LinkAllPasses.h ------------ Reference All Passes ---*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This header file pulls in all transformation and analysis passes for tools
10// like opt and bugpoint that need this functionality.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_LINKALLPASSES_H
15#define LLVM_LINKALLPASSES_H
16
17#include "llvm/ADT/Statistic.h"
34#include "llvm/CodeGen/Passes.h"
35#include "llvm/IR/Function.h"
39#include "llvm/Transforms/IPO.h"
50#include <cstdlib>
51
52namespace llvm {
53class Triple;
54}
55
56namespace {
57struct ForcePassLinking {
58 ForcePassLinking() {
59 // We must reference the passes in such a way that compilers will not delete
60 // it all as dead code, even with whole program optimization, yet is
61 // effectively a NO-OP. This is so that globals in the translation units
62 // where these functions are defined are forced to be initialized,
63 // populating various registries.
65 return;
66
121 (void)llvm::createSROAPass();
128 (void)llvm::createGVNPass();
133 std::string buf;
134 llvm::raw_string_ostream os(buf);
151
152 (void)new llvm::ScalarEvolutionWrapperPass();
154 ->viewCFGOnly();
155 llvm::RGPassManager RGM;
156 llvm::TargetLibraryInfoImpl TLII((llvm::Triple()));
157 llvm::TargetLibraryInfo TLI(TLII);
158 llvm::AliasAnalysis AA(TLI);
159 llvm::BatchAAResults BAA(AA);
160 llvm::AliasSetTracker X(BAA);
161 X.add(llvm::MemoryLocation()); // for -print-alias-sets
164 }
165} ForcePassLinking; // Force link by creating a global definition.
166} // namespace
167
168#endif
This file implements a simple N^2 alias analysis accuracy evaluator.
Provides passes to inlining "always_inline" functions.
This is the interface for LLVM's primary stateless and local alias analysis.
This file provides the interface for LLVM's Global Value Numbering pass which eliminates fully redund...
This is the interface for a simple mod/ref and alias analysis over globals.
This file contains an interface for creating legacy passes to print out IR in various granularities.
This file provides the primary interface to the instcombine pass.
This is the interface for a SCEV-based alias analysis.
This pass converts vector operations into scalar operations (or, optionally, operations on smaller ve...
This is the interface for a metadata-based scoped no-alias analysis.
This file defines the 'Statistic' class, which is designed to be an easy way to expose various metric...
static TableGen::Emitter::OptClass< SkeletonEmitter > X("gen-skeleton-class", "Generate example skeleton class")
This is the interface for a metadata-based TBAA.
static Function * Create(FunctionType *Ty, LinkageTypes Linkage, unsigned AddrSpace, const Twine &N="", Module *M=nullptr)
Definition Function.h:166
void viewCFGOnly() const
viewCFGOnly - This function is meant for use from the debugger.
@ ExternalLinkage
Externally visible function.
Definition GlobalValue.h:53
Triple - Helper class for working with autoconf configuration names.
Definition Triple.h:47
LLVM_ABI bool RunningOnValgrind()
Definition Valgrind.cpp:32
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI ModulePass * createLowerGlobalDtorsLegacyPass()
LLVM_ABI FunctionPass * createDomOnlyPrinterWrapperPassPass()
LLVM_ABI FunctionPass * createDeadStoreEliminationPass()
LLVM_ABI ModulePass * createCallGraphDOTPrinterPass()
LLVM_ABI FunctionPass * createPostDomOnlyViewerWrapperPassPass()
LLVM_ABI FunctionPass * createCFGSimplificationPass(SimplifyCFGOptions Options=SimplifyCFGOptions(), std::function< bool(const Function &)> Ftor=nullptr)
LLVM_ABI Pass * createLCSSAPass()
Definition LCSSA.cpp:525
LLVM_ABI FunctionPass * createRegionOnlyViewerPass()
LLVM_ABI FunctionPass * createTailCallEliminationPass()
LLVM_ABI ModulePass * createJMCInstrumenterPass()
JMC instrument pass.
LLVM_ABI FunctionPass * createPromoteMemoryToRegisterPass()
Definition Mem2Reg.cpp:114
LLVM_ABI FunctionPass * createInstructionCombiningPass()
LLVM_ABI ModulePass * createGlobalMergeFuncPass()
This pass performs merging similar functions globally.
LLVM_ABI FunctionPass * createConstantHoistingPass()
LLVM_ABI FunctionPass * createSafeStackPass()
This pass splits the stack into a safe stack and an unsafe stack to protect against stack-based overf...
LLVM_ABI FunctionPass * createBreakCriticalEdgesPass()
LLVM_ABI FunctionPass * createRegToMemWrapperPass()
Definition Reg2Mem.cpp:148
LLVM_ABI FunctionPass * createDeadCodeEliminationPass()
Definition DCE.cpp:145
LLVM_ABI FunctionPass * createSelectOptimizePass()
This pass converts conditional moves to conditional jumps when profitable.
LLVM_ABI FunctionPass * createRegionPrinterPass()
LLVM_ABI FunctionPass * createSpeculativeExecutionIfHasBranchDivergencePass()
LLVM_ABI FunctionPass * createPostInlineEntryExitInstrumenterPass()
LLVM_ABI FunctionPass * createPostDomViewerWrapperPassPass()
LLVM_ABI Pass * createLoadStoreVectorizerPass()
Create a legacy pass manager instance of the LoadStoreVectorizer pass.
LLVM_ABI FunctionPass * createDomPrinterWrapperPassPass()
LLVM_ABI FunctionPass * createSCEVAAWrapperPass()
Creates an instance of SCEVAAWrapperPass.
LLVM_ABI FunctionPass * createNaryReassociatePass()
LLVM_ABI FunctionPass * createScalarizeMaskedMemIntrinLegacyPass()
LLVM_ABI ModulePass * createDXILResourceTypeWrapperPassPass()
LLVM_ABI Pass * createLowerAtomicPass()
LLVM_ABI FunctionPass * createPostDomOnlyPrinterWrapperPassPass()
LLVM_ABI Pass * createLoopTermFoldPass()
LLVM_ABI Pass * createStructurizeCFGPass(bool SkipUniformRegions=false)
When SkipUniformRegions is true the structizer will not structurize regions that only contain uniform...
LLVM_ABI Pass * createLICMPass()
Definition LICM.cpp:384
LLVM_ABI ModulePass * createGlobalDCEPass()
LLVM_ABI Pass * createLoopUnrollPass(int OptLevel=2, bool OnlyWhenForced=false, bool ForgetAllSCEV=false, int Threshold=-1, int Count=-1, int AllowPartial=-1, int Runtime=-1, int UpperBound=-1, int AllowPeeling=-1)
LLVM_ABI FunctionPass * createLazyValueInfoPass()
createLazyValueInfoPass - This creates an instance of the LazyValueInfo pass.
LLVM_ABI Pass * createLoopExtractorPass()
createLoopExtractorPass - This pass extracts all natural loops from the program into a function if it...
LLVM_ABI ModulePass * createGlobalsAAWrapperPass()
LLVM_ABI FunctionPass * createSinkingPass()
Definition Sink.cpp:275
LLVM_ABI FunctionPass * createExpandMemCmpLegacyPass()
LLVM_ABI FunctionPass * createPostDomTree()
LLVM_ABI FunctionPass * createLowerInvokePass()
LLVM_ABI FunctionPass * createKCFIPass()
Lowers KCFI operand bundles for indirect calls.
Definition KCFI.cpp:61
LLVM_ABI ImmutablePass * createScopedNoAliasAAWrapperPass()
LLVM_ABI FunctionPass * createRegionOnlyPrinterPass()
LLVM_ABI FunctionPass * createSpeculativeExecutionPass()
LLVM_ABI Pass * createSingleLoopExtractorPass()
createSingleLoopExtractorPass - This pass extracts one natural loop from the program into a function ...
LLVM_ABI FunctionPass * createUnifyLoopExitsPass()
LLVM_ABI bool AreStatisticsEnabled()
Check if statistics are enabled.
LLVM_ABI FunctionPass * createFixIrreduciblePass()
LLVM_ABI FunctionPass * createCodeGenPrepareLegacyPass()
createCodeGenPrepareLegacyPass - Transform the code to expose more pattern matching during instructio...
LLVM_ABI FunctionPass * createBasicAAWrapperPass()
LLVM_ABI Pass * createAlwaysInlinerLegacyPass(bool InsertLifetime=true)
Create a legacy pass manager instance of a pass to inline and remove functions marked as "always_inli...
LLVM_ABI FunctionPass * createSeparateConstOffsetFromGEPPass(bool LowerGEP=false)
LLVM_ABI FunctionPass * createExpandLargeDivRemPass()
LLVM_ABI Pass * createMergeICmpsLegacyPass()
LLVM_ABI FunctionPass * createReassociatePass()
LLVM_ABI FunctionPass * createGVNPass()
Create a legacy GVN pass.
Definition GVN.cpp:3449
LLVM_ABI ModulePass * createPrintModulePass(raw_ostream &OS, const std::string &Banner="", bool ShouldPreserveUseListOrder=false)
Create and return a pass that writes the module to the specified raw_ostream.
LLVM_ABI FunctionPass * createDomOnlyViewerWrapperPassPass()
LLVM_ABI ImmutablePass * createTypeBasedAAWrapperPass()
LLVM_ABI Pass * createLoopStrengthReducePass()
LLVM_ABI FunctionPass * createScalarizerPass(const ScalarizerPassOptions &Options=ScalarizerPassOptions())
Create a legacy pass manager instance of the Scalarizer pass.
LLVM_ABI ModulePass * createDeadArgEliminationPass()
createDeadArgEliminationPass - This pass removes arguments from functions which are not used by the b...
LLVM_ABI FunctionPass * createLowerSwitchPass()
LLVM_ABI FunctionPass * createRegionViewerPass()
LLVM_ABI FunctionPass * createPartiallyInlineLibCallsPass()
LLVM_ABI FunctionPass * createAtomicExpandLegacyPass()
AtomicExpandPass - At IR level this pass replace atomic instructions with __atomic_* library calls,...
LLVM_ABI FunctionPass * createStraightLineStrengthReducePass()
LLVM_ABI FunctionPass * createPostDomPrinterWrapperPassPass()
LLVM_ABI FunctionPass * createEarlyCSEPass(bool UseMemorySSA=false)
AAResults AliasAnalysis
Temporary typedef for legacy code that uses a generic AliasAnalysis pointer or reference.
LLVM_ABI FunctionPass * createRegionInfoPass()
LLVM_ABI ModulePass * createCallGraphViewerPass()
LLVM_ABI Pass * createObjCARCContractPass()
LLVM_ABI FunctionPass * createSROAPass(bool PreserveCFG=true)
Definition SROA.cpp:6104
LLVM_ABI FunctionPass * createPrintFunctionPass(raw_ostream &OS, const std::string &Banner="")
Create and return a pass that prints functions to the specified raw_ostream as they are processed.
LLVM_ABI FunctionPass * createDomViewerWrapperPassPass()
LLVM_ABI Pass * createLoopSimplifyPass()
LLVM_ABI ModulePass * createDXILResourceWrapperPassPass()
LLVM_ABI FunctionPass * createDependenceAnalysisWrapperPass()
createDependenceAnalysisPass - This creates an instance of the DependenceAnalysis wrapper pass.
LLVM_ABI FunctionPass * createHardwareLoopsLegacyPass()
Create Hardware Loop pass.
bool getNonFoldableAlwaysTrue()
Definition AlwaysTrue.h:15
LLVM_ABI FunctionPass * createInstSimplifyLegacyPass()