LLVM  14.0.0git
Scalar.cpp
Go to the documentation of this file.
1 //===-- Scalar.cpp --------------------------------------------------------===//
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 file implements common infrastructure for libLLVMScalarOpts.a, which
10 // implements several scalar transformations over the LLVM intermediate
11 // representation, including the C bindings for that library.
12 //
13 //===----------------------------------------------------------------------===//
14 
15 #include "llvm/Transforms/Scalar.h"
16 #include "llvm-c/Initialization.h"
19 #include "llvm/Analysis/Passes.h"
22 #include "llvm/IR/DataLayout.h"
24 #include "llvm/IR/Verifier.h"
25 #include "llvm/InitializePasses.h"
30 
31 using namespace llvm;
32 
33 /// initializeScalarOptsPasses - Initialize all passes linked into the
34 /// ScalarOpts library.
119 }
120 
122  unwrap(PM)->add(createLoopSimplifyCFGPass());
123 }
124 
127 }
128 
130  unwrap(PM)->add(createAggressiveDCEPass());
131 }
132 
135 }
136 
138  unwrap(PM)->add(createBitTrackingDCEPass());
139 }
140 
143 }
144 
147 }
148 
151 }
152 
154  unwrap(PM)->add(createScalarizerPass());
155 }
156 
158  unwrap(PM)->add(createGVNPass());
159 }
160 
162  unwrap(PM)->add(createNewGVNPass());
163 }
164 
167 }
168 
170  unwrap(PM)->add(createIndVarSimplifyPass());
171 }
172 
175 }
176 
178  unwrap(PM)->add(createJumpThreadingPass());
179 }
180 
182  unwrap(PM)->add(createLoopSinkPass());
183 }
184 
186  unwrap(PM)->add(createLICMPass());
187 }
188 
190  unwrap(PM)->add(createLoopDeletionPass());
191 }
192 
194  unwrap(PM)->add(createLoopFlattenPass());
195 }
196 
198  unwrap(PM)->add(createLoopIdiomPass());
199 }
200 
202  unwrap(PM)->add(createLoopRotatePass());
203 }
204 
206  unwrap(PM)->add(createLoopRerollPass());
207 }
208 
210  unwrap(PM)->add(createLoopUnrollPass());
211 }
212 
215 }
216 
218  unwrap(PM)->add(createLoopUnswitchPass());
219 }
220 
222  unwrap(PM)->add(createLowerAtomicPass());
223 }
224 
226  unwrap(PM)->add(createMemCpyOptPass());
227 }
228 
231 }
232 
234  unwrap(PM)->add(createReassociatePass());
235 }
236 
238  unwrap(PM)->add(createSCCPPass());
239 }
240 
242  unwrap(PM)->add(createSROAPass());
243 }
244 
246  unwrap(PM)->add(createSROAPass());
247 }
248 
250  int Threshold) {
251  unwrap(PM)->add(createSROAPass());
252 }
253 
255  // NOTE: The simplify-libcalls pass has been removed.
256 }
257 
260 }
261 
264 }
265 
267  unwrap(PM)->add(createVerifierPass());
268 }
269 
272 }
273 
275  unwrap(PM)->add(createEarlyCSEPass(false/*=UseMemorySSA*/));
276 }
277 
279  unwrap(PM)->add(createEarlyCSEPass(true/*=UseMemorySSA*/));
280 }
281 
283  unwrap(PM)->add(createGVNHoistPass());
284 }
285 
288 }
289 
292 }
293 
295  unwrap(PM)->add(createBasicAAWrapperPass());
296 }
297 
300 }
301 
304 }
305 
308 }
llvm::initializeLoopInterchangeLegacyPassPass
void initializeLoopInterchangeLegacyPassPass(PassRegistry &)
TypeBasedAliasAnalysis.h
llvm::createMergedLoadStoreMotionPass
FunctionPass * createMergedLoadStoreMotionPass(bool SplitFooterBB=false)
createMergedLoadStoreMotionPass - The public interface to this file.
Definition: MergedLoadStoreMotion.cpp:401
LLVMAddCorrelatedValuePropagationPass
void LLVMAddCorrelatedValuePropagationPass(LLVMPassManagerRef PM)
See llvm::createCorrelatedValuePropagationPass function.
Definition: Scalar.cpp:270
llvm::initializeConstraintEliminationPass
void initializeConstraintEliminationPass(PassRegistry &)
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AllocatorList.h:23
llvm::initializeStructurizeCFGLegacyPassPass
void initializeStructurizeCFGLegacyPassPass(PassRegistry &)
llvm::createTailCallEliminationPass
FunctionPass * createTailCallEliminationPass()
Definition: TailRecursionElimination.cpp:920
LLVMAddCFGSimplificationPass
void LLVMAddCFGSimplificationPass(LLVMPassManagerRef PM)
See llvm::createCFGSimplificationPass function.
Definition: Scalar.cpp:145
llvm::initializeAlignmentFromAssumptionsPass
void initializeAlignmentFromAssumptionsPass(PassRegistry &)
llvm::initializeLegacyLICMPassPass
void initializeLegacyLICMPassPass(PassRegistry &)
llvm::initializeCallSiteSplittingLegacyPassPass
void initializeCallSiteSplittingLegacyPassPass(PassRegistry &)
LLVMAddPartiallyInlineLibCallsPass
void LLVMAddPartiallyInlineLibCallsPass(LLVMPassManagerRef PM)
See llvm::createPartiallyInlineLibCallsPass function.
Definition: Scalar.cpp:229
LLVMPassRegistryRef
struct LLVMOpaquePassRegistry * LLVMPassRegistryRef
Definition: Types.h:130
Scalar.h
llvm::initializeRewriteStatepointsForGCLegacyPassPass
void initializeRewriteStatepointsForGCLegacyPassPass(PassRegistry &)
LLVMAddScopedNoAliasAAPass
void LLVMAddScopedNoAliasAAPass(LLVMPassManagerRef PM)
See llvm::createScopedNoAliasAAPass function.
Definition: Scalar.cpp:290
llvm::initializeIndVarSimplifyLegacyPassPass
void initializeIndVarSimplifyLegacyPassPass(PassRegistry &)
llvm::initializeLowerAtomicLegacyPassPass
void initializeLowerAtomicLegacyPassPass(PassRegistry &)
llvm::createCFGSimplificationPass
FunctionPass * createCFGSimplificationPass(SimplifyCFGOptions Options=SimplifyCFGOptions(), std::function< bool(const Function &)> Ftor=nullptr)
Definition: SimplifyCFGPass.cpp:418
llvm::initializeLegacyLoopSinkPassPass
void initializeLegacyLoopSinkPassPass(PassRegistry &)
llvm::initializeInferAddressSpacesPass
void initializeInferAddressSpacesPass(PassRegistry &)
llvm::createLoopSimplifyCFGPass
Pass * createLoopSimplifyCFGPass()
Definition: LoopSimplifyCFG.cpp:766
llvm::initializeInstSimplifyLegacyPassPass
void initializeInstSimplifyLegacyPassPass(PassRegistry &)
llvm::initializeLowerExpectIntrinsicPass
void initializeLowerExpectIntrinsicPass(PassRegistry &)
llvm::initializeFloat2IntLegacyPassPass
void initializeFloat2IntLegacyPassPass(PassRegistry &)
LLVMAddReassociatePass
void LLVMAddReassociatePass(LLVMPassManagerRef PM)
See llvm::createReassociatePass function.
Definition: Scalar.cpp:233
UnifyFunctionExitNodes.h
llvm::initializeSCCPLegacyPassPass
void initializeSCCPLegacyPassPass(PassRegistry &)
LLVMAddLoopRerollPass
void LLVMAddLoopRerollPass(LLVMPassManagerRef PM)
See llvm::createLoopRerollPass function.
Definition: Scalar.cpp:205
llvm::initializeLoopIdiomRecognizeLegacyPassPass
void initializeLoopIdiomRecognizeLegacyPassPass(PassRegistry &)
llvm::createEarlyCSEPass
FunctionPass * createEarlyCSEPass(bool UseMemorySSA=false)
Definition: EarlyCSE.cpp:1735
llvm::initializeLoopUnrollPass
void initializeLoopUnrollPass(PassRegistry &)
llvm::createLoopIdiomPass
Pass * createLoopIdiomPass()
Definition: LoopIdiomRecognize.cpp:346
llvm::createDeadStoreEliminationPass
FunctionPass * createDeadStoreEliminationPass()
Definition: DeadStoreElimination.cpp:2217
llvm::initializeLoopDataPrefetchLegacyPassPass
void initializeLoopDataPrefetchLegacyPassPass(PassRegistry &)
llvm::initializeIRCELegacyPassPass
void initializeIRCELegacyPassPass(PassRegistry &)
llvm::createMemCpyOptPass
FunctionPass * createMemCpyOptPass()
The public interface to this file...
Definition: MemCpyOptimizer.cpp:297
llvm::initializeCorrelatedValuePropagationPass
void initializeCorrelatedValuePropagationPass(PassRegistry &)
llvm::createGVNPass
FunctionPass * createGVNPass(bool NoMemDepAnalysis=false)
Create a legacy GVN pass.
Definition: GVN.cpp:3119
LLVMAddTypeBasedAliasAnalysisPass
void LLVMAddTypeBasedAliasAnalysisPass(LLVMPassManagerRef PM)
See llvm::createTypeBasedAliasAnalysisPass function.
Definition: Scalar.cpp:286
LLVMAddLowerConstantIntrinsicsPass
void LLVMAddLowerConstantIntrinsicsPass(LLVMPassManagerRef PM)
See llvm::createLowerConstantIntrinsicsPass function.
Definition: Scalar.cpp:298
LLVMAddJumpThreadingPass
void LLVMAddJumpThreadingPass(LLVMPassManagerRef PM)
See llvm::createJumpThreadingPass function.
Definition: Scalar.cpp:177
llvm::initializeLowerMatrixIntrinsicsMinimalLegacyPassPass
void initializeLowerMatrixIntrinsicsMinimalLegacyPassPass(PassRegistry &)
llvm::initializeEntryExitInstrumenterPass
void initializeEntryExitInstrumenterPass(PassRegistry &)
BasicAliasAnalysis.h
LegacyPassManager.h
llvm::initializeLoopDistributeLegacyPass
void initializeLoopDistributeLegacyPass(PassRegistry &)
llvm::initializeNaryReassociateLegacyPassPass
void initializeNaryReassociateLegacyPassPass(PassRegistry &)
LLVMAddLoopFlattenPass
void LLVMAddLoopFlattenPass(LLVMPassManagerRef PM)
Definition: Scalar.cpp:193
llvm::RISCVFenceField::R
@ R
Definition: RISCVBaseInfo.h:207
LLVMAddSimplifyLibCallsPass
void LLVMAddSimplifyLibCallsPass(LLVMPassManagerRef PM)
See llvm::createSimplifyLibCallsPass function.
Definition: Scalar.cpp:254
LLVMAddLoopUnswitchPass
void LLVMAddLoopUnswitchPass(LLVMPassManagerRef PM)
See llvm::createLoopUnswitchPass function.
Definition: Scalar.cpp:217
Scalarizer.h
LLVMAddLoopSimplifyCFGPass
void LLVMAddLoopSimplifyCFGPass(LLVMPassManagerRef PM)
Definition: Scalar.cpp:121
LLVMAddUnifyFunctionExitNodesPass
void LLVMAddUnifyFunctionExitNodesPass(LLVMPassManagerRef PM)
See llvm::createUnifyFunctionExitNodesPass function.
Definition: Scalar.cpp:306
llvm::initializeScalarOpts
void initializeScalarOpts(PassRegistry &)
Initialize all passes linked into the ScalarOpts library.
Definition: Scalar.cpp:35
llvm::initializeTailCallElimPass
void initializeTailCallElimPass(PassRegistry &)
llvm::initializeLoopStrengthReducePass
void initializeLoopStrengthReducePass(PassRegistry &)
llvm::initializeStraightLineStrengthReduceLegacyPassPass
void initializeStraightLineStrengthReduceLegacyPassPass(PassRegistry &)
llvm::createLoopUnswitchPass
Pass * createLoopUnswitchPass(bool OptimizeForSize=false, bool hasBranchDivergence=false)
Definition: LoopUnswitch.cpp:410
llvm::initializeLoopPredicationLegacyPassPass
void initializeLoopPredicationLegacyPassPass(PassRegistry &)
llvm::initializeLoopSimplifyCFGLegacyPassPass
void initializeLoopSimplifyCFGLegacyPassPass(PassRegistry &)
llvm::createLoopSinkPass
Pass * createLoopSinkPass()
llvm::initializeJumpThreadingPass
void initializeJumpThreadingPass(PassRegistry &)
llvm::initializeNewGVNLegacyPassPass
void initializeNewGVNLegacyPassPass(PassRegistry &)
LLVMAddLoopSinkPass
void LLVMAddLoopSinkPass(LLVMPassManagerRef PM)
Definition: Scalar.cpp:181
llvm::initializeMemCpyOptLegacyPassPass
void initializeMemCpyOptLegacyPassPass(PassRegistry &)
llvm::createNewGVNPass
FunctionPass * createNewGVNPass()
Definition: NewGVN.cpp:4208
LLVMAddDemoteMemoryToRegisterPass
void LLVMAddDemoteMemoryToRegisterPass(LLVMPassManagerRef PM)
See llvm::demotePromoteMemoryToRegisterPass function.
Definition: Scalar.cpp:262
LLVMAddLoopUnrollAndJamPass
void LLVMAddLoopUnrollAndJamPass(LLVMPassManagerRef PM)
See llvm::createLoopUnrollAndJamPass function.
Definition: Scalar.cpp:213
llvm::initializeLoopRerollLegacyPassPass
void initializeLoopRerollLegacyPassPass(PassRegistry &)
llvm::PassRegistry
PassRegistry - This class manages the registration and intitialization of the pass subsystem as appli...
Definition: PassRegistry.h:38
llvm::unwrap
Attribute unwrap(LLVMAttributeRef Attr)
Definition: Attributes.h:259
llvm::initializeLoopVersioningLICMLegacyPassPass
void initializeLoopVersioningLICMLegacyPassPass(PassRegistry &)
llvm::initializeLoopGuardWideningLegacyPassPass
void initializeLoopGuardWideningLegacyPassPass(PassRegistry &)
llvm::initializeWarnMissedTransformationsLegacyPass
void initializeWarnMissedTransformationsLegacyPass(PassRegistry &)
llvm::initializeLowerGuardIntrinsicLegacyPassPass
void initializeLowerGuardIntrinsicLegacyPassPass(PassRegistry &)
LLVMAddScalarizerPass
void LLVMAddScalarizerPass(LLVMPassManagerRef PM)
See llvm::createScalarizerPass function.
Definition: Scalar.cpp:153
llvm::createIndVarSimplifyPass
Pass * createIndVarSimplifyPass()
Definition: IndVarSimplify.cpp:2132
GVN.h
ScopedNoAliasAA.h
llvm::initializeGuardWideningLegacyPassPass
void initializeGuardWideningLegacyPassPass(PassRegistry &)
llvm::initializeReassociateLegacyPassPass
void initializeReassociateLegacyPassPass(PassRegistry &)
LLVMAddAlignmentFromAssumptionsPass
void LLVMAddAlignmentFromAssumptionsPass(LLVMPassManagerRef PM)
See llvm::createAlignmentFromAssumptionsPass function.
Definition: Scalar.cpp:141
LLVMAddLoopDeletionPass
void LLVMAddLoopDeletionPass(LLVMPassManagerRef PM)
See llvm::createLoopDeletionPass function.
Definition: Scalar.cpp:189
llvm::initializeLoopAccessLegacyAnalysisPass
void initializeLoopAccessLegacyAnalysisPass(PassRegistry &)
llvm::createLoopRerollPass
Pass * createLoopRerollPass()
Definition: LoopRerollPass.cpp:506
llvm::createGVNHoistPass
FunctionPass * createGVNHoistPass()
Definition: GVNHoist.cpp:1263
LLVMAddTailCallEliminationPass
void LLVMAddTailCallEliminationPass(LLVMPassManagerRef PM)
See llvm::createTailCallEliminationPass function.
Definition: Scalar.cpp:258
LLVMAddBitTrackingDCEPass
void LLVMAddBitTrackingDCEPass(LLVMPassManagerRef PM)
See llvm::createBitTrackingDCEPass function.
Definition: Scalar.cpp:137
llvm::createLowerExpectIntrinsicPass
FunctionPass * createLowerExpectIntrinsicPass()
llvm::createLowerAtomicPass
Pass * createLowerAtomicPass()
LLVMAddVerifierPass
void LLVMAddVerifierPass(LLVMPassManagerRef PM)
See llvm::createVerifierPass function.
Definition: Scalar.cpp:266
llvm::createPartiallyInlineLibCallsPass
FunctionPass * createPartiallyInlineLibCallsPass()
Definition: PartiallyInlineLibCalls.cpp:211
llvm::initializeFlattenCFGPassPass
void initializeFlattenCFGPassPass(PassRegistry &)
llvm::initializeGVNSinkLegacyPassPass
void initializeGVNSinkLegacyPassPass(PassRegistry &)
LLVMAddIndVarSimplifyPass
void LLVMAddIndVarSimplifyPass(LLVMPassManagerRef PM)
See llvm::createIndVarSimplifyPass function.
Definition: Scalar.cpp:169
llvm::createCorrelatedValuePropagationPass
Pass * createCorrelatedValuePropagationPass()
Definition: CorrelatedValuePropagation.cpp:133
SimpleLoopUnswitch.h
llvm::initializeLoopFuseLegacyPass
void initializeLoopFuseLegacyPass(PassRegistry &)
LLVMInitializeScalarOpts
void LLVMInitializeScalarOpts(LLVMPassRegistryRef R)
Definition: Scalar.cpp:125
llvm::initializeLoopUnrollAndJamPass
void initializeLoopUnrollAndJamPass(PassRegistry &)
llvm::initializeLoopUnswitchPass
void initializeLoopUnswitchPass(PassRegistry &)
llvm::createScalarizerPass
FunctionPass * createScalarizerPass()
Create a legacy pass manager instance of the Scalarizer pass.
Definition: Scalarizer.cpp:340
llvm::initializeBDCELegacyPassPass
void initializeBDCELegacyPassPass(PassRegistry &)
llvm::createDemoteRegisterToMemoryPass
FunctionPass * createDemoteRegisterToMemoryPass()
Definition: Reg2Mem.cpp:139
LLVMAddEarlyCSEPass
void LLVMAddEarlyCSEPass(LLVMPassManagerRef PM)
See llvm::createEarlyCSEPass function.
Definition: Scalar.cpp:274
llvm::createTypeBasedAAWrapperPass
ImmutablePass * createTypeBasedAAWrapperPass()
llvm::initializeMergedLoadStoreMotionLegacyPassPass
void initializeMergedLoadStoreMotionLegacyPassPass(PassRegistry &)
LLVMAddDCEPass
void LLVMAddDCEPass(LLVMPassManagerRef PM)
See llvm::createDeadCodeEliminationPass function.
Definition: Scalar.cpp:133
llvm::initializeCFGSimplifyPassPass
void initializeCFGSimplifyPassPass(PassRegistry &)
llvm::createSCCPPass
FunctionPass * createSCCPPass()
Definition: SCCP.cpp:291
LLVMPassManagerRef
struct LLVMOpaquePassManager * LLVMPassManagerRef
Definition: Types.h:127
DataLayout.h
llvm::initializeGVNHoistLegacyPassPass
void initializeGVNHoistLegacyPassPass(PassRegistry &)
llvm::initializeRegToMemLegacyPass
void initializeRegToMemLegacyPass(PassRegistry &)
LLVMAddMergedLoadStoreMotionPass
void LLVMAddMergedLoadStoreMotionPass(LLVMPassManagerRef PM)
See llvm::createMergedLoadStoreMotionPass function.
Definition: Scalar.cpp:165
llvm::initializeEarlyCSEMemSSALegacyPassPass
void initializeEarlyCSEMemSSALegacyPassPass(PassRegistry &)
llvm::initializeSimpleLoopUnswitchLegacyPassPass
void initializeSimpleLoopUnswitchLegacyPassPass(PassRegistry &)
llvm::initializeLoopDeletionLegacyPassPass
void initializeLoopDeletionLegacyPassPass(PassRegistry &)
llvm::initializeDCELegacyPassPass
void initializeDCELegacyPassPass(PassRegistry &)
llvm::initializeScalarizerLegacyPassPass
void initializeScalarizerLegacyPassPass(PassRegistry &)
llvm::initializeSeparateConstOffsetFromGEPLegacyPassPass
void initializeSeparateConstOffsetFromGEPLegacyPassPass(PassRegistry &)
LLVMAddDeadStoreEliminationPass
void LLVMAddDeadStoreEliminationPass(LLVMPassManagerRef PM)
See llvm::createDeadStoreEliminationPass function.
Definition: Scalar.cpp:149
LLVMAddSCCPPass
void LLVMAddSCCPPass(LLVMPassManagerRef PM)
See llvm::createSCCPPass function.
Definition: Scalar.cpp:237
llvm::createVerifierPass
FunctionPass * createVerifierPass(bool FatalErrors=true)
Definition: Verifier.cpp:6291
llvm::createUnifyFunctionExitNodesPass
Pass * createUnifyFunctionExitNodesPass()
llvm::initializeSpeculativeExecutionLegacyPassPass
void initializeSpeculativeExecutionLegacyPassPass(PassRegistry &)
llvm::initializePostInlineEntryExitInstrumenterPass
void initializePostInlineEntryExitInstrumenterPass(PassRegistry &)
llvm::createReassociatePass
FunctionPass * createReassociatePass()
llvm::initializeDivRemPairsLegacyPassPass
void initializeDivRemPairsLegacyPassPass(PassRegistry &)
llvm::createBasicAAWrapperPass
FunctionPass * createBasicAAWrapperPass()
Definition: BasicAliasAnalysis.cpp:1885
llvm::initializeDFAJumpThreadingLegacyPassPass
void initializeDFAJumpThreadingLegacyPassPass(PassRegistry &)
Verifier.h
llvm::initializeLowerWidenableConditionLegacyPassPass
void initializeLowerWidenableConditionLegacyPassPass(PassRegistry &)
llvm::createAggressiveDCEPass
FunctionPass * createAggressiveDCEPass()
Definition: ADCE.cpp:754
llvm::initializeConstantHoistingLegacyPassPass
void initializeConstantHoistingLegacyPassPass(PassRegistry &)
LLVMAddGVNHoistLegacyPass
void LLVMAddGVNHoistLegacyPass(LLVMPassManagerRef PM)
Definition: Scalar.cpp:282
LLVMAddInstructionSimplifyPass
void LLVMAddInstructionSimplifyPass(LLVMPassManagerRef PM)
See llvm::createInstSimplifyLegacyPass function.
Definition: Scalar.cpp:173
LLVMAddScalarReplAggregatesPass
void LLVMAddScalarReplAggregatesPass(LLVMPassManagerRef PM)
See llvm::createSROAPass function.
Definition: Scalar.cpp:241
LLVMAddLoopIdiomPass
void LLVMAddLoopIdiomPass(LLVMPassManagerRef PM)
See llvm::createLoopIdiomPass function.
Definition: Scalar.cpp:197
llvm::initializeDSELegacyPassPass
void initializeDSELegacyPassPass(PassRegistry &)
llvm::initializeSROALegacyPassPass
void initializeSROALegacyPassPass(PassRegistry &)
llvm::createScopedNoAliasAAWrapperPass
ImmutablePass * createScopedNoAliasAAWrapperPass()
llvm::createBitTrackingDCEPass
FunctionPass * createBitTrackingDCEPass()
Definition: BDCE.cpp:207
llvm::createAlignmentFromAssumptionsPass
FunctionPass * createAlignmentFromAssumptionsPass()
Definition: AlignmentFromAssumptions.cpp:86
llvm::initializeEarlyCSELegacyPassPass
void initializeEarlyCSELegacyPassPass(PassRegistry &)
llvm::initializeLowerConstantIntrinsicsPass
void initializeLowerConstantIntrinsicsPass(PassRegistry &)
llvm::initializeLoopInstSimplifyLegacyPassPass
void initializeLoopInstSimplifyLegacyPassPass(PassRegistry &)
llvm::initializeLoopFlattenLegacyPassPass
void initializeLoopFlattenLegacyPassPass(PassRegistry &)
llvm::initializeAnnotationRemarksLegacyPass
void initializeAnnotationRemarksLegacyPass(PassRegistry &)
LLVMAddLoopRotatePass
void LLVMAddLoopRotatePass(LLVMPassManagerRef PM)
See llvm::createLoopRotatePass function.
Definition: Scalar.cpp:201
LLVMAddBasicAliasAnalysisPass
void LLVMAddBasicAliasAnalysisPass(LLVMPassManagerRef PM)
See llvm::createBasicAliasAnalysisPass function.
Definition: Scalar.cpp:294
llvm::createLoopRotatePass
Pass * createLoopRotatePass(int MaxHeaderSize=-1, bool PrepareForLTO=false)
Definition: LoopRotation.cpp:153
llvm::initializePartiallyInlineLibCallsLegacyPassPass
void initializePartiallyInlineLibCallsLegacyPassPass(PassRegistry &)
llvm::createInstSimplifyLegacyPass
FunctionPass * createInstSimplifyLegacyPass()
Definition: InstSimplifyPass.cpp:129
Scalar.h
llvm::initializeRedundantDbgInstEliminationPass
void initializeRedundantDbgInstEliminationPass(PassRegistry &)
LLVMAddLowerExpectIntrinsicPass
void LLVMAddLowerExpectIntrinsicPass(LLVMPassManagerRef PM)
See llvm::createLowerExpectIntrinsicPass function.
Definition: Scalar.cpp:302
llvm::initializePlaceSafepointsPass
void initializePlaceSafepointsPass(PassRegistry &)
llvm::initializeMergeICmpsLegacyPassPass
void initializeMergeICmpsLegacyPassPass(PassRegistry &)
LLVMAddScalarReplAggregatesPassWithThreshold
void LLVMAddScalarReplAggregatesPassWithThreshold(LLVMPassManagerRef PM, int Threshold)
See llvm::createSROAPass function.
Definition: Scalar.cpp:249
llvm::createLICMPass
Pass * createLICMPass()
Definition: LICM.cpp:322
LLVMAddLowerAtomicPass
void LLVMAddLowerAtomicPass(LLVMPassManagerRef PM)
See llvm::createLowerAtomicPass function.
Definition: Scalar.cpp:221
llvm::initializeGVNLegacyPassPass
void initializeGVNLegacyPassPass(PassRegistry &)
llvm::Registry
A global registry used in conjunction with static constructors to make pluggable components (like tar...
Definition: Registry.h:44
llvm::initializeLowerMatrixIntrinsicsLegacyPassPass
void initializeLowerMatrixIntrinsicsLegacyPassPass(PassRegistry &)
llvm::createLowerConstantIntrinsicsPass
FunctionPass * createLowerConstantIntrinsicsPass()
Definition: LowerConstantIntrinsics.cpp:203
LLVMAddNewGVNPass
void LLVMAddNewGVNPass(LLVMPassManagerRef PM)
See llvm::createGVNPass function.
Definition: Scalar.cpp:161
llvm::initializeMakeGuardsExplicitLegacyPassPass
void initializeMakeGuardsExplicitLegacyPassPass(PassRegistry &)
llvm::createLoopFlattenPass
FunctionPass * createLoopFlattenPass()
Definition: LoopFlatten.cpp:857
Threshold
static cl::opt< unsigned > Threshold("loop-unswitch-threshold", cl::desc("Max loop size to unswitch"), cl::init(100), cl::Hidden)
LLVMAddLoopUnrollPass
void LLVMAddLoopUnrollPass(LLVMPassManagerRef PM)
See llvm::createLoopUnrollPass function.
Definition: Scalar.cpp:209
llvm::initializeLoopVersioningLegacyPassPass
void initializeLoopVersioningLegacyPassPass(PassRegistry &)
llvm::initializeLoopRotateLegacyPassPass
void initializeLoopRotateLegacyPassPass(PassRegistry &)
llvm::createDeadCodeEliminationPass
FunctionPass * createDeadCodeEliminationPass()
Definition: DCE.cpp:178
llvm::initializeADCELegacyPassPass
void initializeADCELegacyPassPass(PassRegistry &)
LLVMAddMemCpyOptPass
void LLVMAddMemCpyOptPass(LLVMPassManagerRef PM)
See llvm::createMemCpyOptPass function.
Definition: Scalar.cpp:225
LLVMAddGVNPass
void LLVMAddGVNPass(LLVMPassManagerRef PM)
See llvm::createGVNPass function.
Definition: Scalar.cpp:157
LLVMAddEarlyCSEMemSSAPass
void LLVMAddEarlyCSEMemSSAPass(LLVMPassManagerRef PM)
See llvm::createEarlyCSEPass function.
Definition: Scalar.cpp:278
LLVMAddScalarReplAggregatesPassSSA
void LLVMAddScalarReplAggregatesPassSSA(LLVMPassManagerRef PM)
See llvm::createSROAPass function.
Definition: Scalar.cpp:245
LLVMAddLICMPass
void LLVMAddLICMPass(LLVMPassManagerRef PM)
See llvm::createLICMPass function.
Definition: Scalar.cpp:185
llvm::initializeLoopLoadEliminationPass
void initializeLoopLoadEliminationPass(PassRegistry &)
llvm::createLoopDeletionPass
Pass * createLoopDeletionPass()
Definition: LoopDeletion.cpp:575
llvm::createSROAPass
FunctionPass * createSROAPass()
Definition: SROA.cpp:4802
llvm::initializeScalarizeMaskedMemIntrinLegacyPassPass
void initializeScalarizeMaskedMemIntrinLegacyPassPass(PassRegistry &)
InitializePasses.h
llvm::initializeSinkingLegacyPassPass
void initializeSinkingLegacyPassPass(PassRegistry &)
LLVMAddAggressiveDCEPass
void LLVMAddAggressiveDCEPass(LLVMPassManagerRef PM)
See llvm::createAggressiveDCEPass function.
Definition: Scalar.cpp:129
llvm::createLoopUnrollAndJamPass
Pass * createLoopUnrollAndJamPass(int OptLevel=2)
Definition: LoopUnrollAndJamPass.cpp:523
llvm::createJumpThreadingPass
FunctionPass * createJumpThreadingPass(bool FreezeSelectCond=false, int Threshold=-1)
Definition: JumpThreading.cpp:178
llvm::initializePlaceBackedgeSafepointsImplPass
void initializePlaceBackedgeSafepointsImplPass(PassRegistry &)
llvm::createLoopUnrollPass
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)
Definition: LoopUnrollPass.cpp:1416
Initialization.h
Passes.h